Skip to content
Permalink
Browse files

[interface] - Corrected casing; docblocks, use cases and interface al…

…ignments
  • Loading branch information...
niden committed Oct 25, 2019
1 parent eab77a9 commit 58ba948644018422cdf6f5d3b60cf6b2ee16fc14
Showing with 133 additions and 151 deletions.
  1. +3 −3 CHANGELOG-4.0.md
  2. +9 −9 CHANGELOG.md
  3. +5 −2 composer.json
  4. +3 −0 phalcon/Acl/Adapter/AdapterInterface.zep
  5. +11 −11 phalcon/Cache.zep
  6. +1 −1 phalcon/Container.zep
  7. +1 −1 phalcon/Db/Adapter/AdapterInterface.zep
  8. +6 −6 phalcon/Db/Adapter/Pdo/AbstractPdo.zep
  9. +1 −1 phalcon/Domain/Payload/ReadableInterface.zep
  10. +1 −3 phalcon/Exception.zep
  11. +1 −1 phalcon/Filter/Sanitize/Lower.zep
  12. +1 −1 phalcon/Filter/Sanitize/LowerFirst.zep
  13. +1 −1 phalcon/Filter/Sanitize/Striptags.zep
  14. +1 −1 phalcon/Filter/Sanitize/Upper.zep
  15. +1 −1 phalcon/Filter/Sanitize/UpperFirst.zep
  16. +1 −1 phalcon/Filter/Sanitize/UpperWords.zep
  17. +1 −1 phalcon/Firewall/Adapter/AbstractAdapter.zep
  18. +2 −2 phalcon/Flash/Session.zep
  19. +1 −0 phalcon/Forms/Element/AbstractElement.zep
  20. +1 −1 phalcon/Forms/Form.zep
  21. +1 −1 phalcon/Helper/Arr.zep
  22. +1 −1 phalcon/Html/Helper/AbstractHelper.zep
  23. +1 −1 phalcon/Html/TagFactory.zep
  24. +2 −14 phalcon/Http/Message/AbstractMessage.zep
  25. +1 −1 phalcon/Http/Message/Uri.zep
  26. +15 −18 phalcon/Image/Adapter/Imagick.zep
  27. +5 −7 phalcon/Logger.zep
  28. +1 −1 phalcon/Logger/Adapter/AbstractAdapter.zep
  29. +0 −2 phalcon/Mvc/Model/Criteria.zep
  30. +0 −2 phalcon/Mvc/Model/CriteriaInterface.zep
  31. +4 −7 phalcon/Mvc/Model/MetaData.zep
  32. +1 −1 phalcon/Mvc/Model/MetaData/Strategy/Annotations.zep
  33. +1 −1 phalcon/Mvc/Model/MetaData/Strategy/Introspection.zep
  34. +1 −1 phalcon/Mvc/Model/MetaData/{ → Strategy}/StrategyInterface.zep
  35. +1 −1 phalcon/Mvc/Model/MetaDataInterface.zep
  36. +0 −1 phalcon/Mvc/Model/Query/BuilderInterface.zep
  37. +7 −6 phalcon/Mvc/Model/Resultset/Complex.zep
  38. +2 −2 phalcon/Mvc/Model/Resultset/Simple.zep
  39. +1 −1 phalcon/Mvc/Model/Row.zep
  40. +1 −1 phalcon/Session/Adapter/AbstractAdapter.zep
  41. +2 −2 phalcon/Session/Manager.zep
  42. +2 −2 phalcon/Storage/Adapter/AbstractAdapter.zep
  43. +3 −3 phalcon/Storage/Adapter/Apcu.zep
  44. +2 −2 phalcon/Storage/Adapter/Libmemcached.zep
  45. +2 −1 phalcon/Storage/AdapterFactory.zep
  46. +1 −1 phalcon/Storage/SerializerFactory.zep
  47. +1 −1 phalcon/Url.zep
  48. +2 −2 phalcon/Validation/AbstractValidator.zep
  49. +6 −6 phalcon/Validation/Validator/File/AbstractFile.zep
  50. +1 −1 phalcon/Validation/Validator/File/MimeType.zep
  51. +9 −9 resources/CHANGELOG-1.x.md
  52. +3 −3 resources/CHANGELOG-4.0.md
  53. +1 −1 tests/_ci/generate-api-docs.php
@@ -126,7 +126,7 @@
- Fixed `Phalcon\Di::remove()` to remove service. [#14396](https://github.com/phalcon/cphalcon/issues/14396)

## Removed
- Removed `Phalcon\Plugin` - duplicate of `Phalcon\DI\Injectable` [#14359](https://github.com/phalcon/cphalcon/issues/14359)
- Removed `Phalcon\Plugin` - duplicate of `Phalcon\Di\Injectable` [#14359](https://github.com/phalcon/cphalcon/issues/14359)
- Removed `Phalcon\Mvc\Collection` and all related references. 4.0 will not support mongo as it is being re-implemented to take advantage of the latest Mongo driver (see [#13697](https://github.com/phalcon/cphalcon/issues/13697)) [#14361](https://github.com/phalcon/cphalcon/pull/14361)
- Removed `Phalcon\Session\Manager::registerHandler` - duplicate functionality [#14381](https://github.com/phalcon/cphalcon/pull/14381)
- Removed `Phalcon\Html\Tag` - duplicate functionality [#14381](https://github.com/phalcon/cphalcon/pull/14381)
@@ -571,7 +571,7 @@ The implementation offers PSR-7/PSR-17 compatible components in a different name
- `Phalcon\Validation\MessageInteraface` - `getCode`, `setCode`
- `Phalcon\CryptInterface` - `setPadding`
- `Phalcon\Mvc\RouterInterface` - `attach` [#12676](https://github.com/phalcon/cphalcon/issues/12676)
- Added `Phalcon\Container`, a proxy container class to the `Phalcon\DI` implementing PSR-11 [#12295](https://github.com/phalcon/cphalcon/issues/12295)
- Added `Phalcon\Container`, a proxy container class to the `Phalcon\Di` implementing PSR-11 [#12295](https://github.com/phalcon/cphalcon/issues/12295)
- Added `Phalcon\Acl\Adapter\Memory::getActiveKey`, `Phalcon\Acl\Adapter\Memory::activeFunctionCustomArgumentsCount` and `Phalcon\Acl\Adapter\Memory::getActiveFunction` to get latest key, number of custom arguments, and function used to acquire access [#12547](https://github.com/phalcon/cphalcon/pull/12547)

## Changed
@@ -636,7 +636,7 @@ The implementation offers PSR-7/PSR-17 compatible components in a different name
- Renamed `Phalcon\Acl\Adapter\Memory::getRoless` to `Phalcon\Acl\Adapter\Memory::getOperations` [#13639](https://github.com/phalcon/cphalcon/issues/13639)
- Renamed `Phalcon\Acl\Adapter\Memory::getResources` to `Phalcon\Acl\Adapter\Memory::getSubjects` [#13639](https://github.com/phalcon/cphalcon/issues/13639)
- Changed `Phalcon\Http\Response::setHeaders` now merges the headers with any pre-existing ones in the internal collection [#12836](https://github.com/phalcon/cphalcon/issues/12836)
- Changed `Phalcon\DI\FactoryDefault` to not load by default
- Changed `Phalcon\Di\FactoryDefault` to not load by default
- the `Phalcon\Session\Adapter\Files` using the name `session`
- the `Phalcon\Session\Bag` using the name `sessionBag` [#12921](https://github.com/phalcon/cphalcon/issues/12921)
[#12921](https://github.com/phalcon/cphalcon/issues/12921)
@@ -790,7 +790,7 @@ belongs to the uniqueId or the whole session data
- Phalcon\Debug::uri now supports both http and https ([#987](https://github.com/phalcon/cphalcon/issues/987))
- Fixed array to string conversion notice ([#1103](https://github.com/phalcon/cphalcon/issues/1103))
- Add support for xdebug.file_link_format ([#1401](https://github.com/phalcon/cphalcon/issues/1401))
- Phalcon\DI:
- Phalcon\Di:
- Phalcon\Di optimizations ([#1014](https://github.com/phalcon/cphalcon/issues/1014)) with workarounds for NuSphere DBG ([#1714](https://github.com/phalcon/cphalcon/issues/1714))
- Added Phalcon\Di\Service::isResolved() method ([#1242](https://github.com/phalcon/cphalcon/issues/1242))
- Make sure that 'persistent' is resolved only when accessed for the first time ([#1637](https://github.com/phalcon/cphalcon/issues/1637))
@@ -938,7 +938,7 @@ belongs to the uniqueId or the whole session data
- Added kick(), bury(), release(), touch() to Phalcon\Queue\Beanstalk\Job ([#1650](https://github.com/phalcon/cphalcon/issues/1650))
- Phalcon\Registry ([#1209](https://github.com/phalcon/cphalcon/issues/1209), [#1935](https://github.com/phalcon/cphalcon/issues/1935))
- Phalcon\Security:
- Phalcon\Security\Exception inherits from Phalcon\Exception, not from \Phalcon\DI\Exception
- Phalcon\Security\Exception inherits from Phalcon\Exception, not from \Phalcon\Di\Exception
- Added Phalcon\Security::computeHmac() ([#1347](https://github.com/phalcon/cphalcon/issues/1347))
- Bug fixes ([#1347](https://github.com/phalcon/cphalcon/issues/1347))
- Constant-time string comparison in Phalcon\Security::checkHash() to prevent timing attacks ([#1755](https://github.com/phalcon/cphalcon/issues/1755))
@@ -1124,7 +1124,7 @@ belongs to the uniqueId or the whole session data
- Support for 'cascade' action in addition to 'restrict' in Virtual Foreign Keys (ORM)
- Added missing Phalcon\Http\Request\File::getType()
- Phalcon\Tag is not abstract anymore allowing to create instances of it
- Phalcon\Tag is now registered as 'tag' in Phalcon\DI\FactoryDefault
- Phalcon\Tag is now registered as 'tag' in Phalcon\Di\FactoryDefault
- In a handler in Phalcon\Mvc\Micro returns an object that implements Phalcon\Http\ResponseInterface the response is automatically send()
- Phalcon\Mvc\View now have a chaineable API
- Phalcon\Mvc\Micro now can optionally receive the DI in its constructor
@@ -1158,7 +1158,7 @@ belongs to the uniqueId or the whole session data
will be aborted if the validator fails
- Added Phalcon\Validation\Validator\Between to check a value between a range of two values
- Added Phalcon\Validation\Validator\Confirmation to check that a value match its confirmation value (another attribute in the data to validate)
- Phalcon\Forms\Form now extends from Phalcon\DI\Injectable allowing developers to use application services in the form initialization
- Phalcon\Forms\Form now extends from Phalcon\Di\Injectable allowing developers to use application services in the form initialization
- Now calls to Phalcon\Mvc\Router can be chained
- Phalcon\Mvc\Router::getRewriteUri is now public
- Added Phalcon\Mvc\Router\Route::beforeMatch to implement arbitrary conditions to unmatch a matched route
@@ -1178,7 +1178,7 @@ belongs to the uniqueId or the whole session data
- Added Phalcon\Tag::tagHtml and Phalcon\Tag::tagHtmlClose to generate any kind of HTML tags
- Phalcon\Http\Response\Cookies is now fixed
- Added support for automatic crypting of cookies in Phalcon\Http\Response\Cookies
- Phalcon\DI\FactoryDefault now provides the 'crypt' service
- Phalcon\Di\FactoryDefault now provides the 'crypt' service
- Volt's paths are now automatically normalized to realpaths
- Fixed bug in convert_encoding in Volt
- Added Phalcon\Filter\UserFilterInterface to be used in custom filters
@@ -1284,7 +1284,7 @@ belongs to the uniqueId or the whole session data
- Added Phalcon\Mvc\View::getRender to return contents of a template into a string
- Added methods to support HTTP method PATCH
- Now Phalcon\Mvc\Model uses the last part of a namespaced class name as source name
- Phalcon\DI now implements ArrayAccess to get/set services
- Phalcon\Di now implements ArrayAccess to get/set services
- Phalcon\Mvc\Micro now implements ArrayAccess to get services from the related services container
- Improved building of complex service definitions in the DI
- Added toArray method to Phalcon\Mvc\Model instances
@@ -1405,9 +1405,9 @@ belongs to the uniqueId or the whole session data
- Implemented fast copy/ctor to return_value reducing the overall memory usage
- Added Phalcon\Tag::friendlyTitle to create friendly titles
- Added a new C-based template engine highly coupled with Phalcon called Volt
- Registered Phalcon\Mvc\Model\Transaction\Manager in Phalcon\DI\FactoryDefault as 'transactionManager'
- Registered Phalcon\Mvc\Model\Transaction\Manager in Phalcon\Di\FactoryDefault as 'transactionManager'
- Added Phalcon\Escaper to add contextual escaping of different kinds of texts
- Registered Phalcon\Escaper in Phalcon\DI\FactoryDefault as 'escaper'
- Registered Phalcon\Escaper in Phalcon\Di\FactoryDefault as 'escaper'
- Phalcon\Tag now caches resolved services such as 'url' and 'dispatcher' making the view generation faster
- Added support to the OFFSET clause in PHQL
- Optimized Phalcon\Mvc\Model\Metadata to use fewer memory when using a high number of tables
@@ -1457,7 +1457,7 @@ belongs to the uniqueId or the whole session data
- Added Phalcon\Di\FactoryDefault that has the Phalcon Components registered as Default
# 0.5.0a3
- Added Phalcon\DI as dependency injector container
- Added Phalcon\Di as dependency injector container
- Added Phalcon\Events as events management component
- Removed Phalcon\Router\Rewrite
- Phalcon\Router\Regex moved to Phalcon\Mvc\Router
@@ -41,8 +41,8 @@
"psr/simple-cache": "^1.0"
},
"require-dev": {
"ext-gd": "*",
"ext-dom": "*",
"ext-gd": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
@@ -51,9 +51,11 @@
"codeception/codeception": "^2.5",
"friendsofphp/php-cs-fixer": "~2.0",
"mustache/mustache": "^2.12",
"phpstan/phpstan": "^0.11.19",
"predis/predis": "^1.1",
"squizlabs/php_codesniffer": "^3.4",
"twig/twig": "~1.36",
"vimeo/psalm": "^3.6",
"vlucas/phpdotenv": "^2.5"
},
"config": {
@@ -71,7 +73,8 @@
"Phalcon\\Test\\Models\\": "tests/_data/fixtures/models/",
"Phalcon\\Test\\Module\\": "tests/_support/Module/",
"Phalcon\\Test\\Listener\\": "tests/_data/listener/",
"Phalcon\\Test\\Db\\": "tests/_data/db/"
"Phalcon\\Test\\Db\\": "tests/_data/db/",
"Phalcon\\": "ide/4.0.0-rc.1/Phalcon"
}
},
"support": {
@@ -10,6 +10,9 @@

namespace Phalcon\Acl\Adapter;

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

/**
* Interface for Phalcon\Acl adapters
*/
@@ -56,7 +56,7 @@ class Cache implements CacheInterface
*
* @return bool True if the item was successfully removed. False if there was an error.
*
* @throws Phalcon\Cache\Exception\InvalidArgumentException MUST be thrown if the $key string is not a legal value.
* @throws InvalidArgumentException MUST be thrown if the $key string is not a legal value.
*/
public function delete(var key) -> bool
{
@@ -72,7 +72,7 @@ class Cache implements CacheInterface
*
* @return bool True if the items were successfully removed. False if there was an error.
*
* @throws Phalcon\Cache\Exception\InvalidArgumentException MUST be thrown if $keys is neither an array nor a Traversable, or if any of the $keys are not a legal value.
* @throws InvalidArgumentException MUST be thrown if $keys is neither an array nor a Traversable, or if any of the $keys are not a legal value.
*/
public function deleteMultiple(var keys) -> bool
{
@@ -94,12 +94,12 @@ class Cache implements CacheInterface
/**
* Fetches a value from the cache.
*
* @param string $key The unique key of this item in the cache.
* @param mixed $default Default value to return if the key does not exist.
* @param string $key The unique key of this item in the cache.
* @param mixed $defaultValue Default value to return if the key does not exist.
*
* @return mixed The value of the item from the cache, or $default in case of cache miss.
*
* @throws Phalcon\Cache\Exception\InvalidArgumentException MUST be thrown if the $key string is not a legal value.
* @throws InvalidArgumentException MUST be thrown if the $key string is not a legal value.
*/
public function get(var key, var defaultValue = null) -> var
{
@@ -111,12 +111,12 @@ class Cache implements CacheInterface
/**
* Obtains multiple cache items by their unique keys.
*
* @param iterable $keys A list of keys that can obtained in a single operation.
* @param mixed $default Default value to return for keys that do not exist.
* @param iterable $keys A list of keys that can obtained in a single operation.
* @param mixed $defaultValue Default value to return for keys that do not exist.
*
* @return iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value.
*
* @throws Phalcon\Cache\Exception\InvalidArgumentException MUST be thrown if $keys is neither an array nor a Traversable, or if any of the $keys are not a legal value.
* @throws InvalidArgumentException MUST be thrown if $keys is neither an array nor a Traversable, or if any of the $keys are not a legal value.
*/
public function getMultiple(var keys, var defaultValue = null) -> var
{
@@ -140,7 +140,7 @@ class Cache implements CacheInterface
*
* @return bool
*
* @throws Phalcon\Cache\Exception\InvalidArgumentException MUST be thrown if the $key string is not a legal value.
* @throws InvalidArgumentException MUST be thrown if the $key string is not a legal value.
*/
public function has(var key) -> bool
{
@@ -160,7 +160,7 @@ class Cache implements CacheInterface
*
* @return bool True on success and false on failure.
*
* @throws Phalcon\Cache\Exception\InvalidArgumentException MUST be thrown if the $key string is not a legal value.
* @throws InvalidArgumentException MUST be thrown if the $key string is not a legal value.
*/
public function set(var key, var value, var ttl = null) -> bool
{
@@ -179,7 +179,7 @@ class Cache implements CacheInterface
*
* @return bool True on success and false on failure.
*
* @throws Phalcon\Cache\Exception\InvalidArgumentException MUST be thrown if $values is neither an array nor a Traversable, or if any of the $values are not a legal value.
* @throws InvalidArgumentException MUST be thrown if $values is neither an array nor a Traversable, or if any of the $values are not a legal value.
*/
public function setMultiple(var values, var ttl = null) -> bool
{
@@ -19,7 +19,7 @@ use Phalcon\Di\DiInterface;
class Container implements ContainerInterface
{
/**
* @var <DiInterface>
* @var DiInterface
*/
protected container;

@@ -223,7 +223,7 @@ interface AdapterInterface
/**
* Return internal PDO handler
*/
public function getInternalHandler() -> <\Pdo>;
public function getInternalHandler() -> <\PDO>;

/**
* Returns the savepoint name to use for nested transactions
@@ -45,7 +45,7 @@ abstract class AbstractPdo extends AbstractAdapter
/**
* PDO Handler
*
* @var \Pdo
* @var \PDO
*/
protected pdo;

@@ -269,7 +269,7 @@ abstract class AbstractPdo extends AbstractAdapter
}

// Set PDO to throw exceptions when an error is encountered.
let options[\Pdo::ATTR_ERRMODE] = \Pdo::ERRMODE_EXCEPTION;
let options[\PDO::ATTR_ERRMODE] = \PDO::ERRMODE_EXCEPTION;

let dsnParts = [];

@@ -299,7 +299,7 @@ abstract class AbstractPdo extends AbstractAdapter
let dsnAttributes = join(";", dsnParts);

// Create the connection using PDO
let this->pdo = new \Pdo(
let this->pdo = new \PDO(
this->type . ":" . dsnAttributes,
username,
password,
@@ -419,7 +419,7 @@ abstract class AbstractPdo extends AbstractAdapter
*/
let affectedRows = 0;

let pdo = <\Pdo> this->pdo;
let pdo = <\PDO> this->pdo;

if typeof bindParams == "array" {
let statement = pdo->prepare(sqlStatement);
@@ -578,7 +578,7 @@ abstract class AbstractPdo extends AbstractAdapter
/**
* Return internal PDO handler
*/
public function getInternalHandler() -> <\Pdo>
public function getInternalHandler() -> <\PDO>
{
return this->pdo;
}
@@ -715,7 +715,7 @@ abstract class AbstractPdo extends AbstractAdapter
}
}

let pdo = <\Pdo> this->pdo;
let pdo = <\PDO> this->pdo;
if typeof bindParams == "array" {
let params = bindParams;
let types = bindTypes;
@@ -54,7 +54,7 @@ interface ReadableInterface
/**
* Gets arbitrary extra values produced by the domain layer.
*
* @param mixed
* @return mixed
*/
public function getExtras() -> var;
}
@@ -10,14 +10,12 @@

namespace Phalcon;

use Throwable;

/**
* Phalcon\Exception
*
* All framework exceptions should use or extend this exception
*/
class Exception extends \Exception implements Throwable
class Exception extends \Exception implements \Throwable
{
public static function containerServiceNotFound(string! service) -> string
{
@@ -18,7 +18,7 @@ namespace Phalcon\Filter\Sanitize;
class Lower
{
/**
* @var mixed input The text to sanitize
* @var string input The text to sanitize
*/
public function __invoke(string! input)
{
@@ -18,7 +18,7 @@ namespace Phalcon\Filter\Sanitize;
class LowerFirst
{
/**
* @var mixed input The text to sanitize
* @var string input The text to sanitize
*/
public function __invoke(string! input)
{
@@ -18,7 +18,7 @@ namespace Phalcon\Filter\Sanitize;
class Striptags
{
/**
* @var mixed input The text to sanitize
* @var string input The text to sanitize
*/
public function __invoke(string! input)
{
@@ -18,7 +18,7 @@ namespace Phalcon\Filter\Sanitize;
class Upper
{
/**
* @var mixed input The text to sanitize
* @var string input The text to sanitize
*/
public function __invoke(string! input)
{
@@ -18,7 +18,7 @@ namespace Phalcon\Filter\Sanitize;
class UpperFirst
{
/**
* @var mixed input The text to sanitize
* @var string input The text to sanitize
*/
public function __invoke(string! input)
{
@@ -18,7 +18,7 @@ namespace Phalcon\Filter\Sanitize;
class UpperWords
{
/**
* @var mixed input The text to sanitize
* @var string input The text to sanitize
*/
public function __invoke(string! input)
{
@@ -43,7 +43,7 @@ abstract class AbstractAdapter implements AdapterInterface, EventsAwareInterface

/**
* Cache for caching access
* @var <CacheAdapterInterface>
* @var CacheAdapterInterface
*/
protected cache;

@@ -13,7 +13,7 @@ namespace Phalcon\Flash;
use Phalcon\Di\DiInterface;
use Phalcon\Flash\AbstractFlash;
use Phalcon\Flash\Exception;
use Phalcon\Session\ManagerInterface as SessionInterface;
use Phalcon\Session\ManagerInterface;

/**
* Temporarily stores the messages in session, then messages can be printed in
@@ -144,7 +144,7 @@ class Session extends AbstractFlash
/**
* Returns the Session Service
*/
public function getSessionService() -> <SessionInterface>
public function getSessionService() -> <ManagerInterface>
{
var container;

0 comments on commit 58ba948

Please sign in to comment.
You can’t perform that action at this time.