Skip to content

Commit

Permalink
Merge pull request #75 from phalcon/v5.0.0RC1
Browse files Browse the repository at this point in the history
Update stubs of Phalcon v5.0.0-RC1
  • Loading branch information
Jeckerson authored May 31, 2022
2 parents 2991721 + 7fc5945 commit e0dcfc2
Show file tree
Hide file tree
Showing 600 changed files with 3,269 additions and 4,669 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:

strategy:
matrix:
php-versions: [7.4, 8.0]
php-versions: ["7.4", "8.0", "8.1"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
Expand All @@ -24,8 +24,9 @@ jobs:
- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
Expand Down
3 changes: 2 additions & 1 deletion src/Acl/Adapter/AbstractAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
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
*
Expand Down Expand Up @@ -93,7 +94,7 @@ public function getDefaultAction(): int
}

/**
* Sets the default access level (Phalcon\Acl::ALLOW or Phalcon\Acl::DENY)
* Sets the default access level (Phalcon\Acl\Enum::ALLOW or Phalcon\Acl\Enum::DENY)
*
* @param int $defaultAccess
* @return void
Expand Down
2 changes: 2 additions & 0 deletions src/Acl/Adapter/AdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
*/
interface AdapterInterface
{


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

/**
* Access
*
Expand Down
1 change: 1 addition & 0 deletions src/Acl/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
class Component implements \Phalcon\Acl\ComponentInterface
{

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


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


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


}
1 change: 1 addition & 0 deletions src/Acl/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
class Role implements \Phalcon\Acl\RoleInterface
{

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


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


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

/**
* @var array
*/
Expand All @@ -41,23 +42,23 @@ public function get($className): Reflection
}

/**
* Returns the annotations found in a specific method
* Returns the annotations found in a specific constant
*
* @param string $className
* @param string $methodName
* @param string $constantName
* @return Collection
*/
public function getMethod(string $className, string $methodName): Collection
public function getConstant(string $className, string $constantName): Collection
{
}

/**
* Returns the annotations found in all the class' methods
* Returns the annotations found in all the class' constants
*
* @param string $className
* @return array
*/
public function getMethods(string $className): array
public function getConstants(string $className): array
{
}

Expand All @@ -73,7 +74,7 @@ public function getProperty(string $className, string $propertyName): Collection
}

/**
* Returns the annotations found in all the class' methods
* Returns the annotations found in all the class' properties
*
* @param string $className
* @return array
Expand All @@ -82,6 +83,27 @@ public function getProperties(string $className): array
{
}

/**
* Returns the annotations found in a specific method
*
* @param string $className
* @param string $methodName
* @return Collection
*/
public function getMethod(string $className, string $methodName): Collection
{
}

/**
* Returns the annotations found in all the class' methods
*
* @param string $className
* @return array
*/
public function getMethods(string $className): array
{
}

/**
* Returns the annotation reader
*
Expand Down
29 changes: 24 additions & 5 deletions src/Annotations/Adapter/AdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
interface AdapterInterface
{


/**
* Parses or retrieves all the annotations found in a class
*
Expand All @@ -27,21 +29,21 @@ interface AdapterInterface
public function get(string $className): Reflection;

/**
* Returns the annotations found in a specific method
* Returns the annotations found in a specific constant
*
* @param string $className
* @param string $methodName
* @param string $constantName
* @return Collection
*/
public function getMethod(string $className, string $methodName): Collection;
public function getConstant(string $className, string $constantName): Collection;

/**
* Returns the annotations found in all the class' methods
* Returns the annotations found in all the class' constants
*
* @param string $className
* @return array
*/
public function getMethods(string $className): array;
public function getConstants(string $className): array;

/**
* Returns the annotations found in a specific property
Expand All @@ -60,6 +62,23 @@ public function getProperty(string $className, string $propertyName): Collection
*/
public function getProperties(string $className): array;

/**
* Returns the annotations found in a specific method
*
* @param string $className
* @param string $methodName
* @return Collection
*/
public function getMethod(string $className, string $methodName): Collection;

/**
* Returns the annotations found in all the class' methods
*
* @param string $className
* @return array
*/
public function getMethods(string $className): array;

/**
* Returns the annotation reader
*
Expand Down
1 change: 1 addition & 0 deletions src/Annotations/Adapter/Apcu.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/
class Apcu extends \Phalcon\Annotations\Adapter\AbstractAdapter
{

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

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

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

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


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

/**
* @var array
*/
Expand Down Expand Up @@ -62,7 +63,7 @@ public function count(): int
/**
* Returns the current annotation in the iterator
*
* @return bool|Annotation
* @return mixed
*/
public function current()
{
Expand Down
2 changes: 2 additions & 0 deletions src/Annotations/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@
*/
class Exception extends \Exception
{


}
2 changes: 2 additions & 0 deletions src/Annotations/Reader.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
class Reader implements \Phalcon\Annotations\ReaderInterface
{


/**
* Reads annotations from the class docblocks, its methods and/or properties
*
Expand Down
4 changes: 3 additions & 1 deletion src/Annotations/ReaderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
*/
interface ReaderInterface
{


/**
* Reads annotations from the class docblocks, its methods and/or properties
* Reads annotations from the class docblocks, its constants, properties and methods
*
* @param string $className
* @return array
Expand Down
22 changes: 19 additions & 3 deletions src/Annotations/Reflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
*/
class Reflection
{

/**
* @var array
* TODO: Make always array
Expand All @@ -39,14 +40,20 @@ class Reflection
* @var array
* TODO: Make always array
*/
protected $methodAnnotations;
protected $constantAnnotations;

/**
* @var array
* TODO: Make always array
*/
protected $propertyAnnotations;

/**
* @var array
* TODO: Make always array
*/
protected $methodAnnotations;

/**
* @var array
*/
Expand All @@ -71,11 +78,11 @@ public function getClassAnnotations()
}

/**
* Returns the annotations found in the methods' docblocks
* Returns the annotations found in the constants' docblocks
*
* @return array|bool|Collection[]
*/
public function getMethodsAnnotations()
public function getConstantsAnnotations()
{
}

Expand All @@ -88,6 +95,15 @@ public function getPropertiesAnnotations()
{
}

/**
* Returns the annotations found in the methods' docblocks
*
* @return array|bool|Collection[]
*/
public function getMethodsAnnotations()
{
}

/**
* Returns the raw parsing intermediate definitions used to construct the
* reflection
Expand Down
Loading

0 comments on commit e0dcfc2

Please sign in to comment.