Skip to content

Commit

Permalink
Merge pull request #35 from ruudboon/4.x
Browse files Browse the repository at this point in the history
Bumbed stubs to latest Phalcon
  • Loading branch information
ruudboon authored Jan 21, 2020
2 parents bcd70d4 + 8f98719 commit d7b858d
Show file tree
Hide file tree
Showing 319 changed files with 1,184 additions and 2,057 deletions.
2 changes: 1 addition & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<ImplementedParamTypeMismatch errorLevel="info" />
<MismatchingDocblockParamType errorLevel="info" />
<UndefinedDocblockClass errorLevel="info" />
<PropertyNotSetInConstructor errorLevel="info" />
<PropertyNotSetInConstructor errorLevel="suppress" />
<UndefinedClass errorLevel="info" />
<OverriddenPropertyAccess errorLevel="info" />
<InvalidPropertyAssignmentValue errorLevel="info" />
Expand Down
7 changes: 3 additions & 4 deletions src/Phalcon/Acl/Adapter/AbstractAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
namespace Phalcon\Acl\Adapter;

use Phalcon\Events\ManagerInterface;
use Phalcon\Events\EventsAwareInterface;

/**
* Adapter for Phalcon\Acl adapters
*/
abstract class AbstractAdapter implements AdapterInterface, EventsAwareInterface
abstract class AbstractAdapter 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 @@ -121,10 +120,10 @@ public function setDefaultAction(int $defaultAccess)
/**
* Sets the events manager
*
* @param ManagerInterface $eventsManager
* @param \Phalcon\Events\ManagerInterface $eventsManager
* @return void
*/
public function setEventsManager(ManagerInterface $eventsManager)
public function setEventsManager(\Phalcon\Events\ManagerInterface $eventsManager)
{
}
}
7 changes: 2 additions & 5 deletions src/Phalcon/Acl/Adapter/AdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
*/
namespace Phalcon\Acl\Adapter;

use Phalcon\Acl\ComponentInterface;
use Phalcon\Acl\RoleInterface;

/**
* Interface for Phalcon\Acl adapters
*/
Expand Down Expand Up @@ -130,14 +127,14 @@ public function getNoArgumentsDefaultAction(): int;
/**
* Return an array with every role registered in the list
*
* @return array|RoleInterface[]
* @return array|\Phalcon\Acl\RoleInterface[]
*/
public function getRoles(): array;

/**
* Return an array with every component registered in the list
*
* @return array|ComponentInterface[]
* @return array|\Phalcon\Acl\ComponentInterface[]
*/
public function getComponents(): array;

Expand Down
15 changes: 3 additions & 12 deletions src/Phalcon/Acl/Adapter/Memory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@
namespace Phalcon\Acl\Adapter;

use Phalcon\Acl\Enum;
use Phalcon\Acl\Role;
use Phalcon\Acl\RoleInterface;
use Phalcon\Acl\Component;
use Phalcon\Acl\Exception;
use Phalcon\Events\Manager as EventsManager;
use Phalcon\Acl\RoleAware;
use Phalcon\Acl\ComponentAware;
use Phalcon\Acl\ComponentInterface;
use ReflectionFunction;

/**
* Manages ACL lists in memory
Expand Down Expand Up @@ -83,7 +74,7 @@
* }
* ```
*/
class Memory extends AbstractAdapter
class Memory extends \Phalcon\Acl\Adapter\AbstractAdapter
{
/**
* Access
Expand Down Expand Up @@ -371,7 +362,7 @@ public function getNoArgumentsDefaultAction(): int
/**
* Return an array with every role registered in the list
*
* @return array|RoleInterface[]
* @return array|\Phalcon\Acl\RoleInterface[]
*/
public function getRoles(): array
{
Expand All @@ -380,7 +371,7 @@ public function getRoles(): array
/**
* Return an array with every component registered in the list
*
* @return array|ComponentInterface[]
* @return array|\Phalcon\Acl\ComponentInterface[]
*/
public function getComponents(): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/Phalcon/Acl/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* This class defines component entity and its description
*/
class Component implements ComponentInterface
class Component implements \Phalcon\Acl\ComponentInterface
{
/**
* Component description
Expand Down
2 changes: 1 addition & 1 deletion src/Phalcon/Acl/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* This class defines role entity and its description
*/
class Role implements RoleInterface
class Role implements \Phalcon\Acl\RoleInterface
{
/**
* Role name
Expand Down
11 changes: 5 additions & 6 deletions src/Phalcon/Annotations/Adapter/AbstractAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@
*/
namespace Phalcon\Annotations\Adapter;

use Phalcon\Annotations\Reader;
use Phalcon\Annotations\Exception;
use Phalcon\Annotations\Collection;
use Phalcon\Annotations\Reflection;
use Phalcon\Annotations\Reader;
use Phalcon\Annotations\ReaderInterface;
use Phalcon\Annotations\Reflection;

/**
* This is the base class for Phalcon\Annotations adapters
*/
abstract class AbstractAdapter implements AdapterInterface
abstract class AbstractAdapter implements \Phalcon\Annotations\Adapter\AdapterInterface
{
/**
* @var array
Expand Down Expand Up @@ -95,9 +94,9 @@ public function getReader(): ReaderInterface
/**
* Sets the annotations parser
*
* @param ReaderInterface $reader
* @param \Phalcon\Annotations\ReaderInterface $reader
*/
public function setReader(ReaderInterface $reader)
public function setReader(\Phalcon\Annotations\ReaderInterface $reader)
{
}
}
6 changes: 3 additions & 3 deletions src/Phalcon/Annotations/Adapter/AdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
*/
namespace Phalcon\Annotations\Adapter;

use Phalcon\Annotations\Reflection;
use Phalcon\Annotations\Collection;
use Phalcon\Annotations\ReaderInterface;
use Phalcon\Annotations\Reflection;

/**
* This interface must be implemented by adapters in Phalcon\Annotations
Expand Down Expand Up @@ -71,7 +71,7 @@ public function getReader(): ReaderInterface;
/**
* Sets the annotations parser
*
* @param ReaderInterface $reader
* @param \Phalcon\Annotations\ReaderInterface $reader
*/
public function setReader(ReaderInterface $reader);
public function setReader(\Phalcon\Annotations\ReaderInterface $reader);
}
8 changes: 3 additions & 5 deletions src/Phalcon/Annotations/Adapter/Apcu.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*/
namespace Phalcon\Annotations\Adapter;

use Phalcon\Annotations\Reflection;

/**
* Stores the parsed annotations in APCu. This adapter is suitable for production
*
Expand All @@ -20,7 +18,7 @@
* $annotations = new Apcu();
* ```
*/
class Apcu extends AbstractAdapter
class Apcu extends \Phalcon\Annotations\Adapter\AbstractAdapter
{
/**
* @var string
Expand Down Expand Up @@ -59,10 +57,10 @@ public function read(string $key)
* Writes parsed annotations to APCu
*
* @param string $key
* @param Reflection $data
* @param \Phalcon\Annotations\Reflection $data
* @return bool
*/
public function write(string $key, Reflection $data): bool
public function write(string $key, \Phalcon\Annotations\Reflection $data): bool
{
}
}
8 changes: 3 additions & 5 deletions src/Phalcon/Annotations/Adapter/Memory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
*/
namespace Phalcon\Annotations\Adapter;

use Phalcon\Annotations\Reflection;

/**
* Stores the parsed annotations in memory. This adapter is the suitable
* development/testing
*/
class Memory extends AbstractAdapter
class Memory extends \Phalcon\Annotations\Adapter\AbstractAdapter
{
/**
* @var mixed
Expand All @@ -37,10 +35,10 @@ public function read(string $key)
* Writes parsed annotations to memory
*
* @param string $key
* @param Reflection $data
* @param \Phalcon\Annotations\Reflection $data
* @return void
*/
public function write(string $key, Reflection $data)
public function write(string $key, \Phalcon\Annotations\Reflection $data)
{
}
}
10 changes: 3 additions & 7 deletions src/Phalcon/Annotations/Adapter/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
*/
namespace Phalcon\Annotations\Adapter;

use Phalcon\Annotations\Reflection;
use Phalcon\Annotations\Exception;
use RuntimeException;

/**
* Stores the parsed annotations in files. This adapter is suitable for production
*
Expand All @@ -26,7 +22,7 @@
* );
* ```
*/
class Stream extends AbstractAdapter
class Stream extends \Phalcon\Annotations\Adapter\AbstractAdapter
{
/**
* @var string
Expand Down Expand Up @@ -59,10 +55,10 @@ public function read(string $key)
* Writes parsed annotations to files
*
* @param string $key
* @param Reflection $data
* @param \Phalcon\Annotations\Reflection $data
* @return void
*/
public function write(string $key, Reflection $data)
public function write(string $key, \Phalcon\Annotations\Reflection $data)
{
}
}
4 changes: 1 addition & 3 deletions src/Phalcon/Annotations/AnnotationsFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
namespace Phalcon\Annotations;

use Phalcon\Annotations\Adapter\AdapterInterface;
use Phalcon\Config;
use Phalcon\Factory\AbstractFactory;
use Phalcon\Helper\Arr;

/**
* Factory to create annotations components
Expand All @@ -30,7 +28,7 @@ public function __construct(array $services = array())
}

/**
* @param array|Config $config = [
* @param array|\Phalcon\Config $config = [
* 'adapter' => 'apcu',
* 'options' => [
* 'prefix' => 'phalcon',
Expand Down
5 changes: 1 addition & 4 deletions src/Phalcon/Annotations/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
*/
namespace Phalcon\Annotations;

use Countable;
use Iterator;

/**
* Represents a collection of annotations. This class allows to traverse a group
* of annotations easily
Expand All @@ -29,7 +26,7 @@
* $annotation = $classAnnotations->get("Cacheable");
* ```
*/
class Collection implements Iterator, Countable
class Collection implements \Iterator, \Countable
{
/**
* @var array
Expand Down
4 changes: 1 addition & 3 deletions src/Phalcon/Annotations/Reader.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
*/
namespace Phalcon\Annotations;

use ReflectionClass;

/**
* Parses docblocks returning an array with the found annotations
*/
class Reader implements ReaderInterface
class Reader implements \Phalcon\Annotations\ReaderInterface
{

/**
Expand Down
11 changes: 5 additions & 6 deletions src/Phalcon/Application/AbstractApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@

use Phalcon\Di\DiInterface;
use Phalcon\Di\Injectable;
use Phalcon\Events\EventsAwareInterface;
use Phalcon\Events\ManagerInterface;

/**
* Base class for Phalcon\Cli\Console and Phalcon\Mvc\Application.
*/
abstract class AbstractApplication extends Injectable implements EventsAwareInterface
abstract class AbstractApplication extends Injectable implements \Phalcon\Events\EventsAwareInterface
{
/**
* @var DiInterface
Expand All @@ -43,9 +42,9 @@ abstract class AbstractApplication extends Injectable implements EventsAwareInte
/**
* Phalcon\AbstractApplication constructor
*
* @param DiInterface $container
* @param \Phalcon\Di\DiInterface $container
*/
public function __construct(DiInterface $container = null)
public function __construct(\Phalcon\Di\DiInterface $container = null)
{
}

Expand Down Expand Up @@ -125,10 +124,10 @@ public function setDefaultModule(string $defaultModule): AbstractApplication
/**
* Sets the events manager
*
* @param ManagerInterface $eventsManager
* @param \Phalcon\Events\ManagerInterface $eventsManager
* @return void
*/
public function setEventsManager(ManagerInterface $eventsManager)
public function setEventsManager(\Phalcon\Events\ManagerInterface $eventsManager)
{
}
}
2 changes: 1 addition & 1 deletion src/Phalcon/Assets/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* $asset = new \Phalcon\Assets\Asset("js", "javascripts/jquery.js");
* ```
*/
class Asset implements AssetInterface
class Asset implements \Phalcon\Assets\AssetInterface
{
/**
* @var array | null
Expand Down
4 changes: 1 addition & 3 deletions src/Phalcon/Assets/Asset/Css.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
*/
namespace Phalcon\Assets\Asset;

use Phalcon\Assets\Asset as AssetBase;

/**
* Represents CSS assets
*/
class Css extends AssetBase
class Css extends \Phalcon\Assets\Asset
{

/**
Expand Down
4 changes: 1 addition & 3 deletions src/Phalcon/Assets/Asset/Js.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
*/
namespace Phalcon\Assets\Asset;

use Phalcon\Assets\Asset as AssetBase;

/**
* Represents Javascript assets
*/
class Js extends AssetBase
class Js extends \Phalcon\Assets\Asset
{

/**
Expand Down
Loading

0 comments on commit d7b858d

Please sign in to comment.