Skip to content

Commit

Permalink
Merge pull request #78 from niden/master
Browse files Browse the repository at this point in the history
v5.0.0 stable
  • Loading branch information
Jeckerson authored Sep 22, 2022
2 parents e0dcfc2 + 74bc73d commit d2a961d
Show file tree
Hide file tree
Showing 578 changed files with 2,776 additions and 2,523 deletions.
34 changes: 16 additions & 18 deletions src/Acl/Adapter/AbstractAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@
*/
abstract class AbstractAdapter extends AbstractEventsAware implements \Phalcon\Acl\Adapter\AdapterInterface, \Phalcon\Events\EventsAwareInterface
{

/**
* Active access which the list is checking if some role can access it
*
* @var string|null
*/
protected $activeAccess;

/**
* Access Granted
*
Expand All @@ -34,19 +26,26 @@ abstract class AbstractAdapter extends AbstractEventsAware implements \Phalcon\A
protected $accessGranted = false;

/**
* Role which the list is checking if it's allowed to certain
* component/access
* Active access which the list is checking if some role can access it
*
* @var string|null
*/
protected $activeRole;
protected $activeAccess = null;

/**
* Component which the list is checking if some role can access it
*
* @var string|null
*/
protected $activeComponent;
protected $activeComponent = null;

/**
* Role which the list is checking if it's allowed to certain
* component/access
*
* @var string|null
*/
protected $activeRole = null;

/**
* Default access
Expand All @@ -65,22 +64,21 @@ public function getActiveAccess(): ?string
}

/**
* Role which the list is checking if it's allowed to certain
*
* component/access
* Component which the list is checking if some role can access it
*
* @return string|null
*/
public function getActiveRole(): ?string
public function getActiveComponent(): ?string
{
}

/**
* Component which the list is checking if some role can access it
* Role which the list is checking if it's allowed to certain
* component/access
*
* @return string|null
*/
public function getActiveComponent(): ?string
public function getActiveRole(): ?string
{
}

Expand Down
2 changes: 0 additions & 2 deletions src/Acl/Adapter/AdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
*/
interface AdapterInterface
{


/**
* Do a role inherit from another existing role
*
Expand Down
57 changes: 28 additions & 29 deletions src/Acl/Adapter/Memory.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
*/
class Memory extends \Phalcon\Acl\Adapter\AbstractAdapter
{

/**
* Access
*
Expand Down Expand Up @@ -118,7 +117,7 @@ class Memory extends \Phalcon\Acl\Adapter\AbstractAdapter
*
* @var string|null
*/
protected $activeKey;
protected $activeKey = null;

/**
* Components
Expand Down Expand Up @@ -162,33 +161,6 @@ class Memory extends \Phalcon\Acl\Adapter\AbstractAdapter
*/
protected $roleInherits;

/**
* Returns latest function used to acquire access
*
* @return mixed
*/
public function getActiveFunction()
{
}

/**
* Returns number of additional arguments(excluding role and resource) for active function
*
* @return int
*/
public function getActiveFunctionCustomArgumentsCount(): int
{
}

/**
* Returns latest key used to acquire access
*
* @return string|null
*/
public function getActiveKey(): ?string
{
}

/**
* Phalcon\Acl\Adapter\Memory constructor
*/
Expand Down Expand Up @@ -350,6 +322,33 @@ public function dropComponentAccess(string $componentName, $accessList): void
{
}

/**
* Returns latest function used to acquire access
*
* @return mixed
*/
public function getActiveFunction()
{
}

/**
* Returns number of additional arguments(excluding role and resource) for active function
*
* @return int
*/
public function getActiveFunctionCustomArgumentsCount(): int
{
}

/**
* Returns latest key used to acquire access
*
* @return string|null
*/
public function getActiveKey(): ?string
{
}

/**
* Return an array with every component registered in the list
*
Expand Down
23 changes: 8 additions & 15 deletions src/Acl/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*/
class Component implements \Phalcon\Acl\ComponentInterface
{

/**
* Component description
*
Expand All @@ -30,39 +29,33 @@ class Component implements \Phalcon\Acl\ComponentInterface
private $name;

/**
* Component description
* Phalcon\Acl\Component constructor
*
* @return string
* @param string $name
* @param string $description
*/
public function getDescription(): string
public function __construct(string $name, string $description = null)
{
}

/**
* Component name
*
* @return string
*/
public function getName(): string
public function __toString(): string
{
}

/**
* Component name
*
* @return string
*/
public function __toString(): string
public function getDescription(): string
{
}

/**
* Phalcon\Acl\Component constructor
*
* @param string $name
* @param string $description
* @return string
*/
public function __construct(string $name, string $description = null)
public function getName(): string
{
}
}
2 changes: 0 additions & 2 deletions src/Acl/ComponentAwareInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
*/
interface ComponentAwareInterface
{


/**
* Returns component name
*
Expand Down
2 changes: 0 additions & 2 deletions src/Acl/ComponentInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
*/
interface ComponentInterface
{


/**
* Returns component description
*
Expand Down
2 changes: 0 additions & 2 deletions src/Acl/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@
*/
class Exception extends \Exception
{


}
27 changes: 10 additions & 17 deletions src/Acl/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,55 +14,48 @@
*/
class Role implements \Phalcon\Acl\RoleInterface
{

/**
* Role name
* Role description
*
* @var string
*/
private $name;
private $description;

/**
* Role description
* Role name
*
* @var string
*/
private $description;
private $name;

/**
* Role name
* Phalcon\Acl\Role constructor
*
* @return string
* @param string $name
* @param string $description
*/
public function getName(): string
public function __construct(string $name, string $description = null)
{
}

/**
* Role name
*
* @return string
*/
public function __toString(): string
{
}

/**
* Role description
*
* @return string
*/
public function getDescription(): string
{
}

/**
* Phalcon\Acl\Role constructor
*
* @param string $name
* @param string $description
* @return string
*/
public function __construct(string $name, string $description = null)
public function getName(): string
{
}
}
2 changes: 0 additions & 2 deletions src/Acl/RoleAwareInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
*/
interface RoleAwareInterface
{


/**
* Returns role name
*
Expand Down
2 changes: 0 additions & 2 deletions src/Acl/RoleInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
*/
interface RoleInterface
{


/**
* Returns the role name
*
Expand Down
1 change: 0 additions & 1 deletion src/Annotations/Adapter/AbstractAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
abstract class AbstractAdapter implements \Phalcon\Annotations\Adapter\AdapterInterface
{

/**
* @var array
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Annotations/Adapter/AdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
*/
interface AdapterInterface
{


/**
* Parses or retrieves all the annotations found in a class
*
Expand Down
1 change: 0 additions & 1 deletion src/Annotations/Adapter/Apcu.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
*/
class Apcu extends \Phalcon\Annotations\Adapter\AbstractAdapter
{

/**
* @var string
*/
Expand Down
1 change: 0 additions & 1 deletion src/Annotations/Adapter/Memory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
class Memory extends \Phalcon\Annotations\Adapter\AbstractAdapter
{

/**
* @var mixed
*/
Expand Down
1 change: 0 additions & 1 deletion src/Annotations/Adapter/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
*/
class Stream extends \Phalcon\Annotations\Adapter\AbstractAdapter
{

/**
* @var string
*/
Expand Down
1 change: 0 additions & 1 deletion src/Annotations/Annotation.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*/
class Annotation
{

/**
* Annotation Arguments
*
Expand Down
2 changes: 0 additions & 2 deletions src/Annotations/AnnotationsFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
*/
class AnnotationsFactory extends AbstractFactory
{


/**
* AdapterFactory constructor.
*
Expand Down
1 change: 0 additions & 1 deletion src/Annotations/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
*/
class Collection implements \Iterator, \Countable
{

/**
* @var array
*/
Expand Down
Loading

0 comments on commit d2a961d

Please sign in to comment.