From b0aad56ed3389109fb1ea099f28c11d9a7fe8043 Mon Sep 17 00:00:00 2001 From: Rougin Gutib Date: Wed, 27 Mar 2024 11:56:59 +0800 Subject: [PATCH] Improve code documentation from "php-cs-fixer" --- phpstyle.php | 43 ++++++- src/Application.php | 3 +- src/Application/Application.php | 3 +- src/Component/AbstractComponent.php | 3 +- src/Component/Collection.php | 51 ++++++--- src/Component/Collector.php | 11 +- src/Component/ComponentInterface.php | 3 +- src/ComponentCollection.php | 3 +- src/Components.php | 3 +- src/Configuration.php | 3 +- src/Container/AurynContainer.php | 26 +++-- src/Container/Container.php | 24 ++-- src/Container/ContainerException.php | 3 +- src/Container/ContainerInterface.php | 8 +- .../Exception/ContainerException.php | 3 +- src/Container/Exception/NotFoundException.php | 3 +- src/Container/LeagueContainer.php | 10 +- src/Container/NotFoundException.php | 3 +- src/Container/Parameter.php | 4 +- src/Container/ReflectionContainer.php | 20 ++-- src/Container/VanillaContainer.php | 3 +- src/Debug/Debugger.php | 3 +- src/Debug/DebuggerInterface.php | 3 +- src/Debug/ErrorHandler.php | 6 +- src/Debug/ErrorHandlerIntegration.php | 8 +- src/Debug/ErrorHandlerInterface.php | 3 +- src/Debug/Vanilla/Debugger.php | 3 +- src/Debug/VanillaErrorHandler.php | 3 +- src/Debug/Whoops/Debugger.php | 3 +- src/Debug/WhoopsDebugger.php | 3 +- src/Debug/WhoopsErrorHandler.php | 14 ++- src/Dispatching/BaseRouter.php | 3 +- src/Dispatching/Dispatcher.php | 3 +- src/Dispatching/DispatcherInterface.php | 3 +- src/Dispatching/FastRoute/Dispatcher.php | 3 +- src/Dispatching/FastRoute/Router.php | 3 +- src/Dispatching/Phroute/Dispatcher.php | 3 +- src/Dispatching/Phroute/Router.php | 3 +- src/Dispatching/Router.php | 3 +- src/Dispatching/RouterInterface.php | 3 +- src/Dispatching/Vanilla/Dispatcher.php | 3 +- src/Dispatching/Vanilla/Router.php | 3 +- src/ErrorHandler/ErrorHandlerInterface.php | 3 +- src/ErrorHandler/Whoops.php | 3 +- src/Http/HttpIntegration.php | 25 +++-- src/Http/Message.php | 33 ++++-- src/Http/Request.php | 14 ++- src/Http/Response.php | 10 +- src/Http/ServerRequest.php | 36 +++--- src/Http/Stream.php | 21 ++-- src/Http/UploadedFile.php | 19 ++-- src/Http/Uri.php | 33 ++++-- src/Integration/Configuration.php | 25 +++-- src/Integration/ConfigurationIntegration.php | 10 +- src/Integration/IntegrationInterface.php | 9 +- src/IoC/Auryn.php | 3 +- src/IoC/Auryn/Container.php | 3 +- src/IoC/AurynContainer.php | 3 +- src/IoC/BaseContainer.php | 3 +- src/IoC/Container.php | 3 +- src/IoC/ContainerInterface.php | 3 +- src/IoC/DependencyInjectorInterface.php | 3 +- src/IoC/League/Container.php | 3 +- src/IoC/LeagueContainer.php | 3 +- src/IoC/Vanilla/Container.php | 3 +- .../Vanilla/Exception/NotFoundException.php | 3 +- src/Middleware/Callback.php | 11 +- src/Middleware/Delegate.php | 3 +- src/Middleware/Dispatcher.php | 20 ++-- src/Middleware/DispatcherInterface.php | 9 +- src/Middleware/Doublepass.php | 10 +- src/Middleware/Handler.php | 9 +- src/Middleware/HandlerInterface.php | 6 +- src/Middleware/Handlers/Handler030.php | 10 +- src/Middleware/Handlers/Handler041.php | 10 +- src/Middleware/Handlers/Handler050.php | 10 +- src/Middleware/Handlers/Handler100.php | 10 +- src/Middleware/Interop.php | 20 ++-- src/Middleware/Middleware.php | 3 +- src/Middleware/MiddlewareIntegration.php | 8 +- src/Middleware/MiddlewareInterface.php | 8 +- src/Middleware/Stratigility/Middleware.php | 3 +- src/Middleware/StratigilityDispatcher.php | 24 ++-- src/Middleware/StratigilityMiddleware.php | 3 +- src/Middleware/Vanilla/Delegate.php | 3 +- src/Middleware/Vanilla/Middleware.php | 3 +- src/Middleware/VanillaDelegate.php | 3 +- src/Middleware/VanillaMiddleware.php | 3 +- src/Middleware/Version.php | 4 +- src/Middleware/Wrapper.php | 8 +- src/Routing/Dispatcher.php | 19 ++-- src/Routing/DispatcherInterface.php | 11 +- src/Routing/FastRoute/Dispatcher.php | 3 +- src/Routing/FastRoute/Router.php | 3 +- src/Routing/FastRouteDispatcher.php | 11 +- src/Routing/FastRouteRouter.php | 14 ++- src/Routing/Phroute/Dispatcher.php | 3 +- src/Routing/Phroute/Router.php | 3 +- src/Routing/PhrouteDispatcher.php | 11 +- src/Routing/PhrouteResolver.php | 6 +- src/Routing/PhrouteRouter.php | 23 ++-- src/Routing/PhrouteWrapper.php | 8 +- src/Routing/Route.php | 13 ++- src/Routing/RouteInterface.php | 6 +- src/Routing/Router.php | 106 ++++++++++-------- src/Routing/RouterInterface.php | 18 +-- src/Routing/RoutingIntegration.php | 11 +- src/Routing/Vanilla/Dispatcher.php | 3 +- src/Routing/Vanilla/Router.php | 3 +- src/System.php | 14 ++- src/System/Handler.php | 12 +- src/System/Lastone.php | 6 +- src/System/Routing.php | 8 +- src/Template/Renderer.php | 25 +++-- src/Template/RendererIntegration.php | 8 +- src/Template/RendererInterface.php | 8 +- src/Template/Twig.php | 3 +- src/Template/Twig/Renderer.php | 3 +- src/Template/TwigLoader.php | 6 +- src/Template/TwigRenderer.php | 15 ++- src/Template/Vanilla/Renderer.php | 3 +- src/Template/VanillaRenderer.php | 3 +- tests/Application/ApplicationTest.php | 10 +- tests/Application/ApplicationTestCases.php | 12 +- tests/Application/AurynContainerTest.php | 3 +- tests/Application/ContainerInterfaceTest.php | 3 +- .../Application/IntegrationInterfaceTest.php | 3 +- tests/Component/CollectionTest.php | 4 +- tests/Container/AurynContainerTest.php | 3 +- tests/Container/ContainerTest.php | 3 +- tests/Container/LeagueContainerTest.php | 4 +- tests/Container/ReflectionContainerTest.php | 5 +- tests/Debug/Vanilla/DebuggerTest.php | 4 +- tests/Debug/Whoops/DebuggerTest.php | 4 +- .../Dispatching/FastRoute/DispatcherTest.php | 3 +- tests/Dispatching/FastRoute/RouterTest.php | 3 +- tests/Dispatching/Phroute/DispatcherTest.php | 5 +- tests/Dispatching/Phroute/RouterTest.php | 3 +- tests/Dispatching/Vanilla/DispatcherTest.php | 3 +- tests/Dispatching/Vanilla/RouterTest.php | 3 +- tests/Fixture/Classes/AnotherClass.php | 3 +- tests/Fixture/Classes/NewClass.php | 3 +- tests/Fixture/Classes/NewInterface.php | 3 +- tests/Fixture/Classes/ParameterClass.php | 3 +- .../Fixture/Classes/WithEmptyConstructor.php | 3 +- tests/Fixture/Classes/WithInterface.php | 3 +- .../Classes/WithInterfaceParameter.php | 3 +- .../Classes/WithMultipleParameters.php | 3 +- .../Fixture/Classes/WithOptionalParameter.php | 3 +- tests/Fixture/Classes/WithParameter.php | 3 +- tests/Fixture/Classes/WithPutHttpMethod.php | 3 +- .../Fixture/Classes/WithResponseInterface.php | 8 +- .../Classes/WithServerRequestInterface.php | 3 +- .../Fixture/Components/ContainerComponent.php | 3 +- .../Fixture/Components/DebuggerComponent.php | 3 +- .../Components/DispatcherComponent.php | 3 +- tests/Fixture/Components/HttpComponent.php | 4 +- .../Components/MiddlewareComponent.php | 3 +- .../Fixture/Components/TemplateComponent.php | 3 +- tests/Fixture/Middlewares/FinalMiddleware.php | 10 +- tests/Fixture/Middlewares/FirstMiddleware.php | 10 +- .../Fixture/Middlewares/InteropMiddleware.php | 8 +- tests/Fixture/Middlewares/LastMiddleware.php | 10 +- .../Fixture/Middlewares/SecondMiddleware.php | 10 +- tests/Forward/Builder.php | 8 +- tests/Forward/ForwardTest.php | 3 +- tests/Http/MessageTest.php | 3 +- tests/Http/RequestTest.php | 3 +- tests/Http/ResponseTest.php | 3 +- tests/Http/ServerRequestTest.php | 3 +- tests/Http/StreamTest.php | 6 +- tests/Http/UploadedFileTest.php | 3 +- tests/Http/UriTest.php | 3 +- tests/Integration/ConfigurationTest.php | 3 +- tests/IoC/Auryn/ContainerTest.php | 3 +- tests/IoC/League/ContainerTest.php | 3 +- tests/IoC/Vanilla/ContainerTest.php | 3 +- tests/Middleware/DispatcherTest.php | 3 +- tests/Middleware/DispatcherTestCases.php | 5 +- tests/Middleware/Multiple/Interop05.php | 8 +- tests/Middleware/Multiple/Slytherin.php | 8 +- .../Stratigility/MiddlewareTest.php | 4 +- .../Middleware/StratigilityDispatcherTest.php | 3 +- tests/Middleware/Vanilla/MiddlewareTest.php | 4 +- tests/Previous/Builder.php | 13 ++- tests/Previous/Handlers/Hello.php | 10 +- tests/Previous/PreviousTest.php | 4 +- tests/Previous/Routes/Hello.php | 6 +- tests/Routing/DispatcherTest.php | 3 +- tests/Routing/DispatcherTestCases.php | 12 +- tests/Routing/FastRouteDispatcherTest.php | 3 +- tests/Routing/FastRouteRouterTest.php | 3 +- tests/Routing/PhrouteDispatcherTest.php | 3 +- tests/Routing/PhrouteRouterTest.php | 3 +- tests/Routing/RouterTest.php | 3 +- tests/Routing/RouterTestCases.php | 8 +- tests/Sample/Builder.php | 34 ++++-- tests/Sample/Depots/EsteDepot.php | 6 +- tests/Sample/Depots/SestDepot.php | 6 +- tests/Sample/Depots/TestDepot.php | 6 +- tests/Sample/Handlers/Cors.php | 8 +- tests/Sample/Handlers/Interop.php | 8 +- tests/Sample/Handlers/Parsed/Request.php | 3 +- tests/Sample/Handlers/Parsed/Response.php | 3 +- tests/Sample/Packages/HttpPackage.php | 3 +- tests/Sample/Packages/MiddlewarePackage.php | 3 +- tests/Sample/Packages/RoutingPackage.php | 3 +- tests/Sample/Packages/SamplePackage.php | 8 +- tests/Sample/Retuor.php | 3 +- tests/Sample/Router.php | 3 +- tests/Sample/Routes/Hello.php | 11 +- tests/Sample/Routes/Home.php | 6 +- tests/Sample/Routes/Route.php | 8 +- tests/Sample/SampleTest.php | 4 +- tests/Template/RendererTest.php | 3 +- tests/Template/Twig/RendererTest.php | 3 +- tests/Template/Vanilla/RendererTest.php | 3 +- tests/Testcase.php | 4 +- 218 files changed, 1059 insertions(+), 601 deletions(-) diff --git a/phpstyle.php b/phpstyle.php index 81a0f0ea..214b0478 100644 --- a/phpstyle.php +++ b/phpstyle.php @@ -9,7 +9,7 @@ $rules = array('@PSR12' => true); $cscp = 'control_structure_continuation_position'; -$rules[$cscp] = array('position' => 'next_line'); +$rules[$cscp] = ['position' => 'next_line']; $braces = array(); $braces['control_structures_opening_brace'] = 'next_line_unless_newline_at_signature_end'; @@ -18,14 +18,49 @@ $braces['anonymous_classes_opening_brace'] = 'next_line_unless_newline_at_signature_end'; $braces['allow_single_line_empty_anonymous_classes'] = false; $braces['allow_single_line_anonymous_functions'] = false; - $rules['braces_position'] = $braces; -$rules['new_with_parentheses'] = array('named_class' => false); - $visibility = array('elements' => array()); $visibility['elements'] = array('method', 'property'); $rules['visibility_required'] = $visibility; + +$rules['phpdoc_var_annotation_correct_order'] = true; + +$rules['single_quote'] = ['strings_containing_single_quote_chars' => true]; + +$rules['no_unused_imports'] = true; + +$rules['align_multiline_comment'] = true; + +$rules['trim_array_spaces'] = true; + +$order = ['case_sensitive' => true]; +$order['null_adjustment'] = 'always_last'; +$rules['phpdoc_types_order'] = $order; + +$rules['new_with_parentheses'] = ['named_class' => false]; + +$rules['concat_space'] = ['spacing' => 'one']; + +$rules['no_empty_phpdoc'] = true; + +$groups = []; +$groups[] = ['deprecated', 'link', 'see', 'since']; +$groups[] = ['property', 'property-read', 'property-write']; +$groups[] = ['method']; +$groups[] = ['author', 'copyright', 'license']; +$groups[] = ['category', 'package', 'subpackage']; +$groups[] = ['param']; +$groups[] = ['return']; +$rules['phpdoc_separation'] = ['groups' => $groups]; + +$align = ['align' => 'vertical']; +$align['tags'] = ['method', 'param', 'property', 'throws', 'type', 'var']; +$rules['phpdoc_align'] = $align; + +$rules['statement_indentation'] = false; + +$rules['align_multiline_comment'] = true; // ----------------------------------------------- $finder = new \PhpCsFixer\Finder; diff --git a/src/Application.php b/src/Application.php index 6a98ae8c..116d5b41 100644 --- a/src/Application.php +++ b/src/Application.php @@ -10,7 +10,8 @@ * Application * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Application extends Routing { diff --git a/src/Application/Application.php b/src/Application/Application.php index c16005ab..cba34a94 100644 --- a/src/Application/Application.php +++ b/src/Application/Application.php @@ -10,7 +10,8 @@ * Application * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Application extends Slytherin { diff --git a/src/Component/AbstractComponent.php b/src/Component/AbstractComponent.php index 36b67ae9..398ed95d 100644 --- a/src/Component/AbstractComponent.php +++ b/src/Component/AbstractComponent.php @@ -8,7 +8,8 @@ * Methods used for integrating a component to Slytherin. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ abstract class AbstractComponent implements ComponentInterface { diff --git a/src/Component/Collection.php b/src/Component/Collection.php index b00b3f65..37101caf 100644 --- a/src/Component/Collection.php +++ b/src/Component/Collection.php @@ -18,7 +18,8 @@ * Contains all the required components for Slytherin. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Collection implements ContainerInterface { @@ -37,8 +38,9 @@ public function __construct() * * Adds an instance to the container. * - * @param string $id - * @param object $concrete + * @param string $id + * @param object $concrete + * * @return self */ public function add($id, $concrete) @@ -49,7 +51,8 @@ public function add($id, $concrete) /** * Returns the specified component. * - * @param string $id + * @param string $id + * * @return object */ public function get($id) @@ -171,7 +174,8 @@ public function getTemplate() /** * Checks if a specified component exists. * - * @param string $id + * @param string $id + * * @return boolean */ public function has($id) @@ -182,8 +186,9 @@ public function has($id) /** * Sets an instance to the collection. * - * @param string $id - * @param mixed $concrete + * @param string $id + * @param mixed $concrete + * * @return self */ public function set($id, $concrete = null) @@ -196,7 +201,8 @@ public function set($id, $concrete = null) /** * Sets the container. * - * @param \Rougin\Slytherin\Container\ContainerInterface $container + * @param \Rougin\Slytherin\Container\ContainerInterface $container + * * @return self */ public function setContainer(ContainerInterface $container) @@ -209,7 +215,8 @@ public function setContainer(ContainerInterface $container) /** * Sets the debugger. * - * @param \Rougin\Slytherin\Debug\ErrorHandlerInterface $debugger + * @param \Rougin\Slytherin\Debug\ErrorHandlerInterface $debugger + * * @return self */ public function setDebugger(ErrorHandlerInterface $debugger) @@ -222,7 +229,8 @@ public function setDebugger(ErrorHandlerInterface $debugger) * * Sets the dependency injector. * - * @param \Rougin\Slytherin\Container\ContainerInterface $injector + * @param \Rougin\Slytherin\Container\ContainerInterface $injector + * * @return self */ public function setDependencyInjector(ContainerInterface $injector) @@ -233,7 +241,8 @@ public function setDependencyInjector(ContainerInterface $injector) /** * Sets the dispatcher. * - * @param \Rougin\Slytherin\Routing\DispatcherInterface $dispatcher + * @param \Rougin\Slytherin\Routing\DispatcherInterface $dispatcher + * * @return self */ public function setDispatcher(Routing $dispatcher) @@ -246,7 +255,8 @@ public function setDispatcher(Routing $dispatcher) * * Sets the error handler. * - * @param \Rougin\Slytherin\Debug\ErrorHandlerInterface $debugger + * @param \Rougin\Slytherin\Debug\ErrorHandlerInterface $debugger + * * @return self */ public function setErrorHandler(ErrorHandlerInterface $debugger) @@ -257,8 +267,9 @@ public function setErrorHandler(ErrorHandlerInterface $debugger) /** * Sets the HTTP components. * - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Psr\Http\Message\ResponseInterface $response + * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ResponseInterface $response + * * @return self */ public function setHttp(ServerRequestInterface $request, ResponseInterface $response) @@ -271,7 +282,8 @@ public function setHttp(ServerRequestInterface $request, ResponseInterface $resp /** * Sets the HTTP request. * - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return self */ public function setHttpRequest(ServerRequestInterface $request) @@ -284,7 +296,8 @@ public function setHttpRequest(ServerRequestInterface $request) /** * Sets the HTTP response. * - * @param \Psr\Http\Message\ResponseInterface $response + * @param \Psr\Http\Message\ResponseInterface $response + * * @return self */ public function setHttpResponse(ResponseInterface $response) @@ -297,7 +310,8 @@ public function setHttpResponse(ResponseInterface $response) /** * Sets the middleware. * - * @param \Rougin\Slytherin\Middleware\DispatcherInterface $middleware + * @param \Rougin\Slytherin\Middleware\DispatcherInterface $middleware + * * @return self */ public function setMiddleware(Middleware $middleware) @@ -308,7 +322,8 @@ public function setMiddleware(Middleware $middleware) /** * Sets the template. * - * @param \Rougin\Slytherin\Template\RendererInterface $template + * @param \Rougin\Slytherin\Template\RendererInterface $template + * * @return self */ public function setTemplate(RendererInterface $template) diff --git a/src/Component/Collector.php b/src/Component/Collector.php index 14423e69..dacf48a2 100644 --- a/src/Component/Collector.php +++ b/src/Component/Collector.php @@ -11,7 +11,8 @@ * Collects all defined components into a Collection. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Collector { @@ -40,7 +41,8 @@ public function __construct(array $items = array()) /** * Creates a new collection. * - * @param \Rougin\Slytherin\Container\ContainerInterface $container + * @param \Rougin\Slytherin\Container\ContainerInterface $container + * * @return \Rougin\Slytherin\Component\Collection */ public function make(ContainerInterface $container) @@ -117,8 +119,9 @@ public function make(ContainerInterface $container) /** * Initializes the specified components. * - * @param \Rougin\Slytherin\Component\ComponentInterface[]|string[] $components - * @param \Rougin\Slytherin\IoC\ContainerInterface $container + * @param \Rougin\Slytherin\Component\ComponentInterface[]|string[] $components + * @param \Rougin\Slytherin\IoC\ContainerInterface $container + * * @return \Rougin\Slytherin\Component\Collection */ public static function get(array $components, ContainerInterface $container = null) diff --git a/src/Component/ComponentInterface.php b/src/Component/ComponentInterface.php index b5a3f745..875747b2 100644 --- a/src/Component/ComponentInterface.php +++ b/src/Component/ComponentInterface.php @@ -8,7 +8,8 @@ * An interface for handling components. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ interface ComponentInterface { diff --git a/src/ComponentCollection.php b/src/ComponentCollection.php index b65e3f3d..173007fe 100644 --- a/src/ComponentCollection.php +++ b/src/ComponentCollection.php @@ -8,7 +8,8 @@ * Component Collection * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ComponentCollection extends Components { diff --git a/src/Components.php b/src/Components.php index 2f4cdb79..283d3052 100644 --- a/src/Components.php +++ b/src/Components.php @@ -10,7 +10,8 @@ * Component Collection * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Components extends Collection { diff --git a/src/Configuration.php b/src/Configuration.php index 9312809d..b230da60 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -8,7 +8,8 @@ * Configuration * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Configuration extends Integration\Configuration { diff --git a/src/Container/AurynContainer.php b/src/Container/AurynContainer.php index 04224951..22ed61fa 100644 --- a/src/Container/AurynContainer.php +++ b/src/Container/AurynContainer.php @@ -11,8 +11,9 @@ * Daniel Lowrey's Auryn Inversion Of Control (IoC) Dependency Injector. * * @package Slytherin - * @author Matthew Turland - * @author Rougin Gutib + * + * @author Matthew Turland + * @author Rougin Gutib * * @link https://github.com/rdlowrey/auryn * @link https://github.com/elazar/auryn-container-interop @@ -50,8 +51,9 @@ public function __construct(Injector $injector) * * Adds a new instance to the container. * - * @param string $id - * @param mixed|null $concrete + * @param string $id + * @param mixed|null $concrete + * * @return self */ public function add($id, $concrete = null) @@ -62,7 +64,8 @@ public function add($id, $concrete = null) /** * Finds an entry of the container by its identifier and returns it. * - * @param string $id + * @param string $id + * * @return mixed * * @throws \Psr\Container\NotFoundExceptionInterface @@ -88,7 +91,8 @@ public function get($id) /** * Returns true if the container can return an entry for the given identifier. * - * @param string $id + * @param string $id + * * @return boolean */ public function has($id) @@ -114,8 +118,9 @@ public function has($id) /** * Sets a new instance to the container. * - * @param string $id - * @param mixed $concrete + * @param string $id + * @param mixed $concrete + * * @return self */ public function set($id, $concrete) @@ -135,8 +140,9 @@ public function set($id, $concrete) /** * Calls methods from the \Auryn\Injector instance. * - * @param string $method - * @param mixed[] $params + * @param string $method + * @param mixed[] $params + * * @return mixed */ public function __call($method, $params) diff --git a/src/Container/Container.php b/src/Container/Container.php index b3c40cdd..ad196b0a 100644 --- a/src/Container/Container.php +++ b/src/Container/Container.php @@ -8,7 +8,8 @@ * A simple container that is implemented on PSR-11. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Container implements ContainerInterface { @@ -32,8 +33,9 @@ public function __construct(array $items = array()) * * Adds a new instance to the container. * - * @param string $id - * @param mixed $concrete + * @param string $id + * @param mixed $concrete + * * @return self */ public function add($id, $concrete) @@ -44,8 +46,9 @@ public function add($id, $concrete) /** * Creates an alias for a specified class. * - * @param string $id - * @param string $original + * @param string $id + * @param string $original + * * @return self */ public function alias($id, $original) @@ -58,7 +61,8 @@ public function alias($id, $original) /** * Finds an entry of the container by its identifier and returns it. * - * @param string $id + * @param string $id + * * @return mixed * * @throws \Psr\Container\NotFoundExceptionInterface @@ -88,7 +92,8 @@ public function get($id) /** * Returns true if the container can return an entry for the given identifier. * - * @param string $id + * @param string $id + * * @return boolean */ public function has($id) @@ -99,8 +104,9 @@ public function has($id) /** * Sets a new instance to the container. * - * @param string $id - * @param mixed $concrete + * @param string $id + * @param mixed $concrete + * * @return self */ public function set($id, $concrete) diff --git a/src/Container/ContainerException.php b/src/Container/ContainerException.php index a53eb7b4..184c48bc 100644 --- a/src/Container/ContainerException.php +++ b/src/Container/ContainerException.php @@ -10,7 +10,8 @@ * A specified exception in handling errors in containers. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ContainerException extends \Exception implements ContainerExceptionInterface { diff --git a/src/Container/ContainerInterface.php b/src/Container/ContainerInterface.php index 53e96f28..782bab9d 100644 --- a/src/Container/ContainerInterface.php +++ b/src/Container/ContainerInterface.php @@ -10,15 +10,17 @@ * An interface for handling PSR-11 containers. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ interface ContainerInterface extends PsrContainerInterface { /** * Sets a new instance to the container. * - * @param string $id - * @param mixed $concrete + * @param string $id + * @param mixed $concrete + * * @return self */ public function set($id, $concrete); diff --git a/src/Container/Exception/ContainerException.php b/src/Container/Exception/ContainerException.php index 35c22e4c..44331675 100644 --- a/src/Container/Exception/ContainerException.php +++ b/src/Container/Exception/ContainerException.php @@ -10,7 +10,8 @@ * Container Exception * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ContainerException extends Slytherin { diff --git a/src/Container/Exception/NotFoundException.php b/src/Container/Exception/NotFoundException.php index db05d4a0..8cef40a1 100644 --- a/src/Container/Exception/NotFoundException.php +++ b/src/Container/Exception/NotFoundException.php @@ -10,7 +10,8 @@ * Not Found Exception * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class NotFoundException extends Slytherin { diff --git a/src/Container/LeagueContainer.php b/src/Container/LeagueContainer.php index c0809d32..5cb0a8c4 100644 --- a/src/Container/LeagueContainer.php +++ b/src/Container/LeagueContainer.php @@ -10,7 +10,8 @@ * A simple implementation of a container that is based on League\Container. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib * * @link https://container.thephpleague.com */ @@ -19,9 +20,10 @@ class LeagueContainer extends League implements ContainerInterface /** * Sets a new instance to the container. * - * @param string $id - * @param mixed $concrete - * @param boolean $shared + * @param string $id + * @param mixed $concrete + * @param boolean $shared + * * @return self */ public function set($id, $concrete, $shared = false) diff --git a/src/Container/NotFoundException.php b/src/Container/NotFoundException.php index 2028fbd2..5ba7cf02 100644 --- a/src/Container/NotFoundException.php +++ b/src/Container/NotFoundException.php @@ -10,7 +10,8 @@ * A specified exception in handling errors in containers. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class NotFoundException extends \InvalidArgumentException implements NotFoundExceptionInterface { diff --git a/src/Container/Parameter.php b/src/Container/Parameter.php index da8a7ed6..f59b7334 100644 --- a/src/Container/Parameter.php +++ b/src/Container/Parameter.php @@ -8,7 +8,8 @@ * A backward compatible class for handling ReflectionParameter. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Parameter { @@ -31,6 +32,7 @@ public function __construct(\ReflectionParameter $param) * Returns a \ReflectionClass object for the parameter being reflected or "null". * * @return \ReflectionClass|null + * * @codeCoverageIgnore */ public function getClass() diff --git a/src/Container/ReflectionContainer.php b/src/Container/ReflectionContainer.php index ee33e701..64498a4f 100644 --- a/src/Container/ReflectionContainer.php +++ b/src/Container/ReflectionContainer.php @@ -10,7 +10,8 @@ * A simple container utilizing PHP's Reflection classes. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ReflectionContainer implements PsrContainer { @@ -30,7 +31,8 @@ public function __construct(PsrContainer $container = null) /** * Finds an entry of the container by its identifier and returns it. * - * @param string $id + * @param string $id + * * @return mixed * * @throws \Psr\Container\NotFoundExceptionInterface @@ -68,8 +70,9 @@ public function get($id) /** * Resolves the specified parameters from a container. * - * @param \ReflectionFunctionAbstract $reflector - * @param array $parameters + * @param \ReflectionFunctionAbstract $reflector + * @param array $parameters + * * @return array */ public function getArguments(\ReflectionFunctionAbstract $reflector, $parameters = array()) @@ -101,7 +104,8 @@ public function getArguments(\ReflectionFunctionAbstract $reflector, $parameters /** * Returns true if the container can return an entry for the given identifier. * - * @param string $id + * @param string $id + * * @return boolean */ public function has($id) @@ -119,7 +123,8 @@ public function has($id) /** * Returns an argument based on the given parameter. * - * @param \ReflectionParameter $parameter + * @param \ReflectionParameter $parameter + * * @return mixed|null */ protected function getArgument(\ReflectionParameter $parameter) @@ -148,7 +153,8 @@ protected function getArgument(\ReflectionParameter $parameter) /** * Resolves the specified parameters from a container. * - * @param \ReflectionFunction|\ReflectionMethod $reflection + * @param \ReflectionFunction|\ReflectionMethod $reflection + * * @return array */ protected function resolve($reflection) diff --git a/src/Container/VanillaContainer.php b/src/Container/VanillaContainer.php index 9ddd6324..cbd5dea3 100644 --- a/src/Container/VanillaContainer.php +++ b/src/Container/VanillaContainer.php @@ -8,7 +8,8 @@ * Container * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class VanillaContainer extends Container { diff --git a/src/Debug/Debugger.php b/src/Debug/Debugger.php index ed251f77..070b4032 100644 --- a/src/Debug/Debugger.php +++ b/src/Debug/Debugger.php @@ -10,7 +10,8 @@ * Debugger * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Debugger extends Slytherin { diff --git a/src/Debug/DebuggerInterface.php b/src/Debug/DebuggerInterface.php index 9adefa6a..44ea7e15 100644 --- a/src/Debug/DebuggerInterface.php +++ b/src/Debug/DebuggerInterface.php @@ -8,7 +8,8 @@ * Debugger Interface * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ interface DebuggerInterface extends ErrorHandlerInterface { diff --git a/src/Debug/ErrorHandler.php b/src/Debug/ErrorHandler.php index 3b302e11..9b11559f 100644 --- a/src/Debug/ErrorHandler.php +++ b/src/Debug/ErrorHandler.php @@ -8,7 +8,8 @@ * A simple implementation of an error handler. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ErrorHandler implements ErrorHandlerInterface { @@ -30,7 +31,8 @@ public function __construct($environment = 'development') * * Sets up the environment to be used. * - * @param string $environment + * @param string $environment + * * @return self */ public function setEnvironment($environment) diff --git a/src/Debug/ErrorHandlerIntegration.php b/src/Debug/ErrorHandlerIntegration.php index eae3caa0..0db836e2 100644 --- a/src/Debug/ErrorHandlerIntegration.php +++ b/src/Debug/ErrorHandlerIntegration.php @@ -13,15 +13,17 @@ * An integration for defined error handlers to be included in Slytherin. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ErrorHandlerIntegration implements IntegrationInterface { /** * Defines the specified integration. * - * @param \Rougin\Slytherin\Container\ContainerInterface $container - * @param \Rougin\Slytherin\Integration\Configuration $config + * @param \Rougin\Slytherin\Container\ContainerInterface $container + * @param \Rougin\Slytherin\Integration\Configuration $config + * * @return \Rougin\Slytherin\Container\ContainerInterface */ public function define(ContainerInterface $container, Configuration $config) diff --git a/src/Debug/ErrorHandlerInterface.php b/src/Debug/ErrorHandlerInterface.php index ff83a69b..b2e8ef76 100644 --- a/src/Debug/ErrorHandlerInterface.php +++ b/src/Debug/ErrorHandlerInterface.php @@ -8,7 +8,8 @@ * An interface for handling third-party error handlers. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ interface ErrorHandlerInterface { diff --git a/src/Debug/Vanilla/Debugger.php b/src/Debug/Vanilla/Debugger.php index 8479e416..5e431351 100644 --- a/src/Debug/Vanilla/Debugger.php +++ b/src/Debug/Vanilla/Debugger.php @@ -10,7 +10,8 @@ * Debugger * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Debugger extends VanillaErrorHandler { diff --git a/src/Debug/VanillaErrorHandler.php b/src/Debug/VanillaErrorHandler.php index 412943c4..091a25a4 100644 --- a/src/Debug/VanillaErrorHandler.php +++ b/src/Debug/VanillaErrorHandler.php @@ -8,7 +8,8 @@ * Error Handler * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class VanillaErrorHandler extends ErrorHandler { diff --git a/src/Debug/Whoops/Debugger.php b/src/Debug/Whoops/Debugger.php index 46a286e0..9daf78d5 100644 --- a/src/Debug/Whoops/Debugger.php +++ b/src/Debug/Whoops/Debugger.php @@ -10,7 +10,8 @@ * Debugger * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Debugger extends WhoopsErrorHandler { diff --git a/src/Debug/WhoopsDebugger.php b/src/Debug/WhoopsDebugger.php index 8dcb4568..c269a072 100644 --- a/src/Debug/WhoopsDebugger.php +++ b/src/Debug/WhoopsDebugger.php @@ -10,7 +10,8 @@ * Whoops Debugger * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class WhoopsDebugger extends Slytherin { diff --git a/src/Debug/WhoopsErrorHandler.php b/src/Debug/WhoopsErrorHandler.php index edd4109c..a7a32758 100644 --- a/src/Debug/WhoopsErrorHandler.php +++ b/src/Debug/WhoopsErrorHandler.php @@ -11,7 +11,8 @@ * A simple implementation of an error handler built on top of Whoops. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib * * @link https://filp.github.io/whoops */ @@ -43,7 +44,8 @@ public function __construct(Run $whoops, $environment = 'development') * * Sets up the environment to be used. * - * @param string $environment + * @param string $environment + * * @return self */ public function setEnvironment($environment) @@ -98,7 +100,8 @@ public function display() * * Sets a handler. * - * @param \Whoops\Handler\HandlerInterface|callable $handler + * @param \Whoops\Handler\HandlerInterface|callable $handler + * * @return void */ public function setHandler($handler) @@ -109,8 +112,9 @@ public function setHandler($handler) /** * Calls methods from the \Whoops\Run instance. * - * @param string $method - * @param mixed[] $params + * @param string $method + * @param mixed[] $params + * * @return mixed */ public function __call($method, $params) diff --git a/src/Dispatching/BaseRouter.php b/src/Dispatching/BaseRouter.php index c81cd917..3b6e1e07 100644 --- a/src/Dispatching/BaseRouter.php +++ b/src/Dispatching/BaseRouter.php @@ -10,7 +10,8 @@ * Base Router * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ abstract class BaseRouter extends Slytherin { diff --git a/src/Dispatching/Dispatcher.php b/src/Dispatching/Dispatcher.php index 59773914..c5904e55 100644 --- a/src/Dispatching/Dispatcher.php +++ b/src/Dispatching/Dispatcher.php @@ -10,7 +10,8 @@ * Dispatcher * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Dispatcher extends Slytherin { diff --git a/src/Dispatching/DispatcherInterface.php b/src/Dispatching/DispatcherInterface.php index 7cb728f1..69912bfe 100644 --- a/src/Dispatching/DispatcherInterface.php +++ b/src/Dispatching/DispatcherInterface.php @@ -10,7 +10,8 @@ * Dispatcher Interface * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ interface DispatcherInterface extends Slytherin { diff --git a/src/Dispatching/FastRoute/Dispatcher.php b/src/Dispatching/FastRoute/Dispatcher.php index d9fd4f9b..355f3d32 100644 --- a/src/Dispatching/FastRoute/Dispatcher.php +++ b/src/Dispatching/FastRoute/Dispatcher.php @@ -10,7 +10,8 @@ * FastRoute Dispatcher * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Dispatcher extends Slytherin { diff --git a/src/Dispatching/FastRoute/Router.php b/src/Dispatching/FastRoute/Router.php index bf30c39e..1fcbc014 100644 --- a/src/Dispatching/FastRoute/Router.php +++ b/src/Dispatching/FastRoute/Router.php @@ -10,7 +10,8 @@ * FastRoute Router * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Router extends Slytherin { diff --git a/src/Dispatching/Phroute/Dispatcher.php b/src/Dispatching/Phroute/Dispatcher.php index 7f5d9d57..64414711 100644 --- a/src/Dispatching/Phroute/Dispatcher.php +++ b/src/Dispatching/Phroute/Dispatcher.php @@ -10,7 +10,8 @@ * Phroute Dispatcher * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Dispatcher extends Slytherin { diff --git a/src/Dispatching/Phroute/Router.php b/src/Dispatching/Phroute/Router.php index cf0a0d99..53dba2b6 100644 --- a/src/Dispatching/Phroute/Router.php +++ b/src/Dispatching/Phroute/Router.php @@ -10,7 +10,8 @@ * Phroute Router * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Router extends Slytherin { diff --git a/src/Dispatching/Router.php b/src/Dispatching/Router.php index c0910af0..ddf59072 100644 --- a/src/Dispatching/Router.php +++ b/src/Dispatching/Router.php @@ -10,7 +10,8 @@ * Dispatcher * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Router extends Slytherin { diff --git a/src/Dispatching/RouterInterface.php b/src/Dispatching/RouterInterface.php index 129238f8..25c72d0c 100644 --- a/src/Dispatching/RouterInterface.php +++ b/src/Dispatching/RouterInterface.php @@ -10,7 +10,8 @@ * Router Interface * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ interface RouterInterface extends Slytherin { diff --git a/src/Dispatching/Vanilla/Dispatcher.php b/src/Dispatching/Vanilla/Dispatcher.php index b09773a4..3c867859 100644 --- a/src/Dispatching/Vanilla/Dispatcher.php +++ b/src/Dispatching/Vanilla/Dispatcher.php @@ -10,7 +10,8 @@ * Dispatcher * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Dispatcher extends Slytherin { diff --git a/src/Dispatching/Vanilla/Router.php b/src/Dispatching/Vanilla/Router.php index c0a8ee74..30ab43f1 100644 --- a/src/Dispatching/Vanilla/Router.php +++ b/src/Dispatching/Vanilla/Router.php @@ -10,7 +10,8 @@ * Dispatcher * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Router extends Slytherin { diff --git a/src/ErrorHandler/ErrorHandlerInterface.php b/src/ErrorHandler/ErrorHandlerInterface.php index af4bd558..35de2f8f 100644 --- a/src/ErrorHandler/ErrorHandlerInterface.php +++ b/src/ErrorHandler/ErrorHandlerInterface.php @@ -10,7 +10,8 @@ * Error Handler Interface * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ interface ErrorHandlerInterface extends DebuggerInterface { diff --git a/src/ErrorHandler/Whoops.php b/src/ErrorHandler/Whoops.php index d6e672cb..3f5ca405 100644 --- a/src/ErrorHandler/Whoops.php +++ b/src/ErrorHandler/Whoops.php @@ -10,7 +10,8 @@ * Debugger * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Whoops extends Debugger { diff --git a/src/Http/HttpIntegration.php b/src/Http/HttpIntegration.php index 00f81f0b..b9c601b9 100644 --- a/src/Http/HttpIntegration.php +++ b/src/Http/HttpIntegration.php @@ -5,8 +5,6 @@ use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Rougin\Slytherin\Container\ContainerInterface; -use Rougin\Slytherin\Http\Response; -use Rougin\Slytherin\Http\ServerRequest; use Rougin\Slytherin\Integration\Configuration; use Rougin\Slytherin\Integration\IntegrationInterface; use Rougin\Slytherin\System; @@ -19,7 +17,8 @@ * An integration for Slytherin's simple HTTP package. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class HttpIntegration implements IntegrationInterface { @@ -31,8 +30,9 @@ class HttpIntegration implements IntegrationInterface /** * Defines the specified integration. * - * @param \Rougin\Slytherin\Container\ContainerInterface $container - * @param \Rougin\Slytherin\Integration\Configuration $config + * @param \Rougin\Slytherin\Container\ContainerInterface $container + * @param \Rougin\Slytherin\Integration\Configuration $config + * * @return \Rougin\Slytherin\Container\ContainerInterface */ public function define(ContainerInterface $container, Configuration $config) @@ -51,7 +51,7 @@ public function define(ContainerInterface $container, Configuration $config) /** @var array> */ $files = $globals[3]; - /** @var array|null|object */ + /** @var array|object|null */ $parsed = $globals[4]; $headers = $this->headers($server); @@ -69,7 +69,8 @@ public function define(ContainerInterface $container, Configuration $config) /** * Returns the PHP's global variables. * - * @param \Rougin\Slytherin\Integration\Configuration $config + * @param \Rougin\Slytherin\Integration\Configuration $config + * * @return array */ protected function globals(Configuration $config) @@ -90,7 +91,8 @@ protected function globals(Configuration $config) /** * Converts $_SERVER parameters to message header values. * - * @param array $server + * @param array $server + * * @return array */ protected function headers(array $server) @@ -118,9 +120,10 @@ protected function headers(array $server) /** * Checks on what object will be defined to container. * - * @param \Rougin\Slytherin\Container\ContainerInterface $container - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Psr\Http\Message\ResponseInterface $response + * @param \Rougin\Slytherin\Container\ContainerInterface $container + * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ResponseInterface $response + * * @return \Rougin\Slytherin\Container\ContainerInterface */ protected function resolve(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response) diff --git a/src/Http/Message.php b/src/Http/Message.php index 98f180f9..1ac24db8 100644 --- a/src/Http/Message.php +++ b/src/Http/Message.php @@ -18,8 +18,9 @@ * Message * * @package Slytherin - * @author Kévin Dunglas - * @author Rougin Gutib + * + * @author Kévin Dunglas + * @author Rougin Gutib */ class Message implements MessageInterface { @@ -76,7 +77,8 @@ public function getBody() /** * Retrieves a message header value by the given case-insensitive name. * - * @param string $name + * @param string $name + * * @return string[] */ public function getHeader($name) @@ -87,7 +89,8 @@ public function getHeader($name) /** * Retrieves a comma-separated string of the values for a single header. * - * @param string $name + * @param string $name + * * @return string */ public function getHeaderLine($name) @@ -118,7 +121,8 @@ public function getProtocolVersion() /** * Retrieves a message header value by the given case-insensitive name. * - * @param string $name + * @param string $name + * * @return boolean */ public function hasHeader($name) @@ -129,8 +133,9 @@ public function hasHeader($name) /** * Returns an instance with the specified header appended with the given value. * - * @param string $name - * @param string|string[] $value + * @param string $name + * @param string|string[] $value + * * @return static * * @throws \InvalidArgumentException @@ -160,7 +165,8 @@ public function withAddedHeader($name, $value) /** * Returns an instance with the specified message body. * - * @param \Psr\Http\Message\StreamInterface $body + * @param \Psr\Http\Message\StreamInterface $body + * * @return static * * @throws \InvalidArgumentException @@ -177,8 +183,9 @@ public function withBody(StreamInterface $body) /** * Returns an instance with the provided value replacing the specified header. * - * @param string $name - * @param string|string[] $value + * @param string $name + * @param string|string[] $value + * * @return static * * @throws \InvalidArgumentException @@ -197,7 +204,8 @@ public function withHeader($name, $value) /** * Returns an instance with the specified HTTP protocol version. * - * @param string $version + * @param string $version + * * @return static */ public function withProtocolVersion($version) @@ -212,7 +220,8 @@ public function withProtocolVersion($version) /** * Returns an instance without the specified header. * - * @param string $name + * @param string $name + * * @return static */ public function withoutHeader($name) diff --git a/src/Http/Request.php b/src/Http/Request.php index 1989a2de..5f083af8 100644 --- a/src/Http/Request.php +++ b/src/Http/Request.php @@ -19,7 +19,8 @@ * Request * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Request extends Message implements RequestInterface { @@ -92,7 +93,8 @@ public function getUri() /** * Returns an instance with the provided HTTP method. * - * @param string $method + * @param string $method + * * @return static * * @throws \InvalidArgumentException @@ -111,7 +113,8 @@ public function withMethod($method) /** * Returns an instance with the specific request-target. * - * @param string $target + * @param string $target + * * @return static */ public function withRequestTarget($target) @@ -126,8 +129,9 @@ public function withRequestTarget($target) /** * Returns an instance with the provided URI. * - * @param \Psr\Http\Message\UriInterface $uri - * @param boolean $preserve + * @param \Psr\Http\Message\UriInterface $uri + * @param boolean $preserve + * * @return static */ public function withUri(UriInterface $uri, $preserve = false) diff --git a/src/Http/Response.php b/src/Http/Response.php index 2e763ac2..98cc32ed 100644 --- a/src/Http/Response.php +++ b/src/Http/Response.php @@ -18,8 +18,9 @@ * Response * * @package Slytherin - * @author Kévin Dunglas - * @author Rougin Gutib + * + * @author Kévin Dunglas + * @author Rougin Gutib */ class Response extends Message implements ResponseInterface { @@ -140,8 +141,9 @@ public function getStatusCode() /** * Returns an instance with the specified status code and, optionally, reason phrase. * - * @param integer $code - * @param string $reason + * @param integer $code + * @param string $reason + * * @return static * * @throws \InvalidArgumentException diff --git a/src/Http/ServerRequest.php b/src/Http/ServerRequest.php index ee521807..8908a3fc 100644 --- a/src/Http/ServerRequest.php +++ b/src/Http/ServerRequest.php @@ -19,8 +19,9 @@ * Server Request * * @package Slytherin - * @author Kévin Dunglas - * @author Rougin Gutib + * + * @author Kévin Dunglas + * @author Rougin Gutib */ class ServerRequest extends Request implements ServerRequestInterface { @@ -35,7 +36,7 @@ class ServerRequest extends Request implements ServerRequestInterface protected $cookies = array(); /** - * @var array|null|object + * @var array|object|null */ protected $data; @@ -61,7 +62,7 @@ class ServerRequest extends Request implements ServerRequestInterface * @param array $cookies * @param array $query * @param array> $uploaded - * @param array|null|object $data + * @param array|object|null $data * @param array $attributes * @param \Psr\Http\Message\UriInterface|null $uri * @param \Psr\Http\Message\StreamInterface|null $body @@ -101,8 +102,9 @@ public function __construct(array $server, array $cookies = array(), array $quer /** * Retrieves a single derived request attribute. * - * @param string $name - * @param mixed $default + * @param string $name + * @param mixed $default + * * @return mixed */ public function getAttribute($name, $default = null) @@ -133,7 +135,7 @@ public function getCookieParams() /** * Retrieve any parameters provided in the request body. * - * @return array|null|object + * @return array|object|null */ public function getParsedBody() { @@ -173,8 +175,9 @@ public function getUploadedFiles() /** * Returns an instance with the specified derived request attribute. * - * @param string $name - * @param string $value + * @param string $name + * @param string $value + * * @return static */ public function withAttribute($name, $value) @@ -189,7 +192,8 @@ public function withAttribute($name, $value) /** * Returns an instance with the specified cookies. * - * @param array $cookies + * @param array $cookies + * * @return static */ public function withCookieParams(array $cookies) @@ -204,7 +208,8 @@ public function withCookieParams(array $cookies) /** * Returns an instance with the specified body parameters. * - * @param array|null|object $data + * @param array|object|null $data + * * @return static * * @throws \InvalidArgumentException @@ -223,7 +228,8 @@ public function withParsedBody($data) /** * Returns an instance with the specified query string arguments. * - * @param array $query + * @param array $query + * * @return static */ public function withQueryParams(array $query) @@ -238,7 +244,8 @@ public function withQueryParams(array $query) /** * Create a new instance with the specified uploaded files. * - * @param array $uploaded + * @param array $uploaded + * * @return static * * @throws \InvalidArgumentException @@ -257,7 +264,8 @@ public function withUploadedFiles(array $uploaded) /** * Returns an instance that removes the specified derived request attribute. * - * @param string $name + * @param string $name + * * @return static */ public function withoutAttribute($name) diff --git a/src/Http/Stream.php b/src/Http/Stream.php index 79d5a70c..628811f6 100644 --- a/src/Http/Stream.php +++ b/src/Http/Stream.php @@ -17,9 +17,10 @@ * Stream * * @package Slytherin - * @author Kévin Dunglas - * @author Jérémy 'Jejem' Desvages - * @author Rougin Gutib + * + * @author Kévin Dunglas + * @author Jérémy 'Jejem' Desvages + * @author Rougin Gutib */ class Stream implements StreamInterface { @@ -134,7 +135,8 @@ public function getContents() /** * Returns stream metadata as an associative array or retrieve a specific key. * - * @param string $key + * @param string $key + * * @return array|mixed|null */ public function getMetadata($key = null) @@ -210,7 +212,8 @@ public function isWritable() /** * Read data from the stream. * - * @param int<0, max> $length + * @param int<0, max> $length + * * @return string * * @throws \RuntimeException @@ -249,8 +252,9 @@ public function rewind() /** * Seek to a position in the stream. * - * @param integer $offset - * @param integer $whence + * @param integer $offset + * @param integer $whence + * * @return void * * @throws \RuntimeException @@ -295,7 +299,8 @@ public function tell() /** * Write data to the stream. * - * @param string $string + * @param string $string + * * @return integer * * @throws \RuntimeException diff --git a/src/Http/UploadedFile.php b/src/Http/UploadedFile.php index e377ef79..a80310e2 100644 --- a/src/Http/UploadedFile.php +++ b/src/Http/UploadedFile.php @@ -17,8 +17,9 @@ * Uploaded File * * @package Slytherin - * @author Kévin Dunglas - * @author Rougin Gutib + * + * @author Kévin Dunglas + * @author Rougin Gutib */ class UploadedFile implements UploadedFileInterface { @@ -130,7 +131,8 @@ public function getStream() /** * Move the uploaded file to a new location. * - * @param string $target + * @param string $target + * * @return void * * @throws \InvalidArgumentException @@ -147,7 +149,8 @@ public function moveTo($target) /** * Parses the $_FILES into multiple \File instances. * - * @param array> $uploaded + * @param array> $uploaded + * * @return array */ public static function normalize(array $uploaded) @@ -175,8 +178,9 @@ public static function normalize(array $uploaded) /** * Creates a new UploadedFile instance. * - * @param array> $file - * @param integer $key + * @param array> $file + * @param integer $key + * * @return \Psr\Http\Message\UploadedFileInterface */ protected static function create(array $file, $key) @@ -202,7 +206,8 @@ protected static function create(array $file, $key) /** * Diverse the $_FILES into a consistent result. * - * @param array> $uploaded + * @param array> $uploaded + * * @return array> */ protected static function diverse(array $uploaded) diff --git a/src/Http/Uri.php b/src/Http/Uri.php index 6323e1fd..92596cda 100644 --- a/src/Http/Uri.php +++ b/src/Http/Uri.php @@ -17,8 +17,9 @@ * URI * * @package Slytherin - * @author Kévin Dunglas - * @author Rougin Gutib + * + * @author Kévin Dunglas + * @author Rougin Gutib */ class Uri implements UriInterface { @@ -148,7 +149,7 @@ public function getPath() /** * Retrieves the port component of the URI. * - * @return null|integer + * @return integer|null */ public function getPort() { @@ -188,7 +189,8 @@ public function getUserInfo() /** * Returns an instance with the specified URI fragment. * - * @param string $fragment + * @param string $fragment + * * @return static */ public function withFragment($fragment) @@ -203,7 +205,8 @@ public function withFragment($fragment) /** * Returns an instance with the specified host. * - * @param string $host + * @param string $host + * * @return static * * @throws \InvalidArgumentException @@ -222,7 +225,8 @@ public function withHost($host) /** * Returns an instance with the specified path. * - * @param string $path + * @param string $path + * * @return static * * @throws \InvalidArgumentException @@ -241,7 +245,8 @@ public function withPath($path) /** * Returns an instance with the specified port. * - * @param null|integer $port + * @param integer|null $port + * * @return static * * @throws \InvalidArgumentException @@ -260,7 +265,8 @@ public function withPort($port) /** * Returns an instance with the specified query string. * - * @param string $query + * @param string $query + * * @return static * * @throws \InvalidArgumentException @@ -279,7 +285,8 @@ public function withQuery($query) /** * Returns an instance with the specified scheme. * - * @param string $scheme + * @param string $scheme + * * @return static * * @throws \InvalidArgumentException @@ -298,8 +305,9 @@ public function withScheme($scheme) /** * Returns an instance with the specified user information. * - * @param string $user - * @param null|string $password + * @param string $user + * @param string|null $password + * * @return static */ public function withUserInfo($user, $password = null) @@ -314,7 +322,8 @@ public function withUserInfo($user, $password = null) /** * Generates a \Psr\Http\Message\UriInterface from server variables. * - * @param array $server + * @param array $server + * * @return \Psr\Http\Message\UriInterface */ public static function instance(array $server) diff --git a/src/Integration/Configuration.php b/src/Integration/Configuration.php index 19dbf321..2c79fc27 100644 --- a/src/Integration/Configuration.php +++ b/src/Integration/Configuration.php @@ -8,7 +8,8 @@ * Serves as a storage for configuration data. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Configuration { @@ -36,8 +37,9 @@ public function __construct($data = null) /** * Returns the value from the specified key. * - * @param string $key - * @param mixed|null $default + * @param string $key + * @param mixed|null $default + * * @return mixed */ public function get($key, $default = null) @@ -61,7 +63,8 @@ public function get($key, $default = null) /** * Loads the configuration from a specified directory. * - * @param string $directory + * @param string $directory + * * @return array */ public function load($directory) @@ -86,9 +89,10 @@ public function load($directory) /** * Sets the value to the specified key. * - * @param string $key - * @param mixed $value - * @param boolean $fromFile + * @param string $key + * @param mixed $value + * @param boolean $fromFile + * * @return self */ public function set($key, $value, $fromFile = false) @@ -105,9 +109,10 @@ public function set($key, $value, $fromFile = false) /** * Saves the specified key in the list of data. * - * @param array &$keys - * @param array &$data - * @param mixed $value + * @param array &$keys + * @param array &$data + * @param mixed $value + * * @return mixed */ protected function save(array &$keys, &$data, $value) diff --git a/src/Integration/ConfigurationIntegration.php b/src/Integration/ConfigurationIntegration.php index 3934706c..567da94e 100644 --- a/src/Integration/ConfigurationIntegration.php +++ b/src/Integration/ConfigurationIntegration.php @@ -3,8 +3,6 @@ namespace Rougin\Slytherin\Integration; use Rougin\Slytherin\Container\ContainerInterface; -use Rougin\Slytherin\Integration\Configuration; -use Rougin\Slytherin\Integration\IntegrationInterface; use Rougin\Slytherin\System; /** @@ -13,15 +11,17 @@ * Integrates Configuration inside the specified container. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ConfigurationIntegration implements IntegrationInterface { /** * Defines the specified integration. * - * @param \Rougin\Slytherin\Container\ContainerInterface $container - * @param \Rougin\Slytherin\Integration\Configuration $config + * @param \Rougin\Slytherin\Container\ContainerInterface $container + * @param \Rougin\Slytherin\Integration\Configuration $config + * * @return \Rougin\Slytherin\Container\ContainerInterface */ public function define(ContainerInterface $container, Configuration $config) diff --git a/src/Integration/IntegrationInterface.php b/src/Integration/IntegrationInterface.php index 3500d147..0dbbcd33 100644 --- a/src/Integration/IntegrationInterface.php +++ b/src/Integration/IntegrationInterface.php @@ -2,7 +2,6 @@ namespace Rougin\Slytherin\Integration; -use Rougin\Slytherin\Integration\Configuration; use Rougin\Slytherin\Container\ContainerInterface; /** @@ -11,15 +10,17 @@ * An interface for handling integrations to Slytherin. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ interface IntegrationInterface { /** * Defines the specified integration. * - * @param \Rougin\Slytherin\Container\ContainerInterface $container - * @param \Rougin\Slytherin\Integration\Configuration $config + * @param \Rougin\Slytherin\Container\ContainerInterface $container + * @param \Rougin\Slytherin\Integration\Configuration $config + * * @return \Rougin\Slytherin\Container\ContainerInterface */ public function define(ContainerInterface $container, Configuration $config); diff --git a/src/IoC/Auryn.php b/src/IoC/Auryn.php index 7e937782..b744297e 100644 --- a/src/IoC/Auryn.php +++ b/src/IoC/Auryn.php @@ -8,7 +8,8 @@ * Auryn Container * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Auryn extends AurynContainer { diff --git a/src/IoC/Auryn/Container.php b/src/IoC/Auryn/Container.php index 43d382e0..b7b90ce2 100644 --- a/src/IoC/Auryn/Container.php +++ b/src/IoC/Auryn/Container.php @@ -10,7 +10,8 @@ * Auryn Container * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Container extends AurynContainer { diff --git a/src/IoC/AurynContainer.php b/src/IoC/AurynContainer.php index b3ddadb8..3ddd1513 100644 --- a/src/IoC/AurynContainer.php +++ b/src/IoC/AurynContainer.php @@ -8,7 +8,8 @@ * Auryn Container * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class AurynContainer extends Auryn\Container { diff --git a/src/IoC/BaseContainer.php b/src/IoC/BaseContainer.php index 22c36a63..6a209af7 100644 --- a/src/IoC/BaseContainer.php +++ b/src/IoC/BaseContainer.php @@ -8,7 +8,8 @@ * Base Container * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class BaseContainer extends Container { diff --git a/src/IoC/Container.php b/src/IoC/Container.php index 66dfc9d1..51593f6b 100644 --- a/src/IoC/Container.php +++ b/src/IoC/Container.php @@ -8,7 +8,8 @@ * Container * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Container extends Vanilla\Container { diff --git a/src/IoC/ContainerInterface.php b/src/IoC/ContainerInterface.php index d879341c..bc2323be 100644 --- a/src/IoC/ContainerInterface.php +++ b/src/IoC/ContainerInterface.php @@ -10,7 +10,8 @@ * Dependency Injection Container Interface * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ interface ContainerInterface extends Slytherin { diff --git a/src/IoC/DependencyInjectorInterface.php b/src/IoC/DependencyInjectorInterface.php index 64bffd3d..7204f8ad 100644 --- a/src/IoC/DependencyInjectorInterface.php +++ b/src/IoC/DependencyInjectorInterface.php @@ -8,7 +8,8 @@ * Dependency Injector Interface * * @package Slytherin - * @author Rougin Royce Gutib + * + * @author Rougin Royce Gutib */ interface DependencyInjectorInterface extends ContainerInterface { diff --git a/src/IoC/League/Container.php b/src/IoC/League/Container.php index 35ebaa2e..6fe38f81 100644 --- a/src/IoC/League/Container.php +++ b/src/IoC/League/Container.php @@ -10,7 +10,8 @@ * LeagueContainer * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Container extends LeagueContainer { diff --git a/src/IoC/LeagueContainer.php b/src/IoC/LeagueContainer.php index 42d21df0..75790922 100644 --- a/src/IoC/LeagueContainer.php +++ b/src/IoC/LeagueContainer.php @@ -8,7 +8,8 @@ * League Container * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class LeagueContainer extends League\Container { diff --git a/src/IoC/Vanilla/Container.php b/src/IoC/Vanilla/Container.php index a317750c..a113db76 100644 --- a/src/IoC/Vanilla/Container.php +++ b/src/IoC/Vanilla/Container.php @@ -10,7 +10,8 @@ * Container * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Container extends VanillaContainer { diff --git a/src/IoC/Vanilla/Exception/NotFoundException.php b/src/IoC/Vanilla/Exception/NotFoundException.php index 1093e0e5..32a13d40 100644 --- a/src/IoC/Vanilla/Exception/NotFoundException.php +++ b/src/IoC/Vanilla/Exception/NotFoundException.php @@ -10,7 +10,8 @@ * Not Found Exception * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class NotFoundException extends Slytherin { diff --git a/src/Middleware/Callback.php b/src/Middleware/Callback.php index a62ba7e1..45b58540 100644 --- a/src/Middleware/Callback.php +++ b/src/Middleware/Callback.php @@ -11,7 +11,8 @@ * A class that converts callables into Slytherin middlewares. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Callback implements MiddlewareInterface { @@ -41,8 +42,9 @@ public function __construct($middleware, ResponseInterface $response = null) /** * Processes an incoming server request and return a response. * - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Rougin\Slytherin\Middleware\HandlerInterface $handler + * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Rougin\Slytherin\Middleware\HandlerInterface $handler + * * @return \Psr\Http\Message\ResponseInterface */ public function process(ServerRequestInterface $request, HandlerInterface $handler) @@ -75,7 +77,8 @@ public function process(ServerRequestInterface $request, HandlerInterface $handl /** * Checks if the middleware is a single-pass or a double-pass implementation. * - * @param mixed $item + * @param mixed $item + * * @return boolean */ protected function isSinglePass($item) diff --git a/src/Middleware/Delegate.php b/src/Middleware/Delegate.php index 9ac7a936..572b6983 100644 --- a/src/Middleware/Delegate.php +++ b/src/Middleware/Delegate.php @@ -8,7 +8,8 @@ * Delegate * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Delegate extends Handler { diff --git a/src/Middleware/Dispatcher.php b/src/Middleware/Dispatcher.php index 085e6c1e..c3e49eb6 100644 --- a/src/Middleware/Dispatcher.php +++ b/src/Middleware/Dispatcher.php @@ -11,7 +11,8 @@ * A sample implementation of the middleware dispatcher. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Dispatcher implements DispatcherInterface { @@ -50,8 +51,9 @@ public function getStack() * Processes an incoming server request and return a response, optionally * delegating to the next middleware component to create the response. * - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Rougin\Slytherin\Middleware\HandlerInterface $handler + * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Rougin\Slytherin\Middleware\HandlerInterface $handler + * * @return \Psr\Http\Message\ResponseInterface */ public function process(ServerRequestInterface $request, HandlerInterface $handler) @@ -66,7 +68,8 @@ public function process(ServerRequestInterface $request, HandlerInterface $handl /** * Adds a new middleware to the end of the stack. * - * @param mixed $middleware + * @param mixed $middleware + * * @return self */ public function push($middleware) @@ -91,7 +94,8 @@ public function push($middleware) /** * Sets a new stack of middlewares. * - * @param mixed[] $stack + * @param mixed[] $stack + * * @return self */ public function setStack($stack) @@ -123,7 +127,8 @@ public function stack() /** * Transforms the middleware into a Slytherin counterpart. * - * @param mixed $middleware + * @param mixed $middleware + * * @return \Rougin\Slytherin\Middleware\MiddlewareInterface */ protected function transform($middleware) @@ -152,7 +157,8 @@ protected function transform($middleware) /** * Checks if the middleware is a callable. * - * @param mixed $item + * @param mixed $item + * * @return boolean */ protected function isCallable($item) diff --git a/src/Middleware/DispatcherInterface.php b/src/Middleware/DispatcherInterface.php index f589985a..f67136f0 100644 --- a/src/Middleware/DispatcherInterface.php +++ b/src/Middleware/DispatcherInterface.php @@ -8,7 +8,8 @@ * An interface for handling third-party middleware dispatchers. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ interface DispatcherInterface extends MiddlewareInterface { @@ -22,7 +23,8 @@ public function getStack(); /** * Adds a new middleware to the end of the stack. * - * @param mixed $middleware + * @param mixed $middleware + * * @return self */ public function push($middleware); @@ -30,7 +32,8 @@ public function push($middleware); /** * Sets a new stack of middlewares. * - * @param mixed[] $stack + * @param mixed[] $stack + * * @return self */ public function setStack($stack); diff --git a/src/Middleware/Doublepass.php b/src/Middleware/Doublepass.php index 929ed099..4986f70d 100644 --- a/src/Middleware/Doublepass.php +++ b/src/Middleware/Doublepass.php @@ -11,7 +11,9 @@ * A backward compatible handler to double-pass middlewares. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib + * * @codeCoverageIgnore */ class Doublepass implements HandlerInterface @@ -38,7 +40,8 @@ public function __construct($handler, ResponseInterface $response) } /** - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ public function __invoke(ServerRequestInterface $request) @@ -47,7 +50,8 @@ public function __invoke(ServerRequestInterface $request) } /** - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ public function handle(ServerRequestInterface $request) diff --git a/src/Middleware/Handler.php b/src/Middleware/Handler.php index 13086981..4235141e 100644 --- a/src/Middleware/Handler.php +++ b/src/Middleware/Handler.php @@ -10,7 +10,8 @@ * A default route for handling the application logic. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Handler implements HandlerInterface { @@ -43,7 +44,8 @@ public function __construct(array $stack, HandlerInterface $default) /** * Dispatches the next available middleware and return the response. * - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ public function __invoke(ServerRequestInterface $request) @@ -54,7 +56,8 @@ public function __invoke(ServerRequestInterface $request) /** * Dispatches the next available middleware and return the response. * - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ public function handle(ServerRequestInterface $request) diff --git a/src/Middleware/HandlerInterface.php b/src/Middleware/HandlerInterface.php index 807a01de..870bae18 100644 --- a/src/Middleware/HandlerInterface.php +++ b/src/Middleware/HandlerInterface.php @@ -10,14 +10,16 @@ * An interface for handling delegate instances. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ interface HandlerInterface { /** * Dispatches the next available middleware and return the response. * - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ public function handle(ServerRequestInterface $request); diff --git a/src/Middleware/Handlers/Handler030.php b/src/Middleware/Handlers/Handler030.php index 5bdeb6f1..22145c30 100644 --- a/src/Middleware/Handlers/Handler030.php +++ b/src/Middleware/Handlers/Handler030.php @@ -13,7 +13,9 @@ * A handler that is backward compatible for the v0.3.0 version of "http-interop". * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib + * * @codeCoverageIgnore */ class Handler030 implements DelegateInterface @@ -32,7 +34,8 @@ public function __construct(HandlerInterface $handler) } /** - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ public function __invoke(ServerRequestInterface $request) @@ -41,7 +44,8 @@ public function __invoke(ServerRequestInterface $request) } /** - * @param \Psr\Http\Message\RequestInterface $request + * @param \Psr\Http\Message\RequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ public function process(RequestInterface $request) diff --git a/src/Middleware/Handlers/Handler041.php b/src/Middleware/Handlers/Handler041.php index cf907a00..32b270cb 100644 --- a/src/Middleware/Handlers/Handler041.php +++ b/src/Middleware/Handlers/Handler041.php @@ -12,7 +12,9 @@ * A handler that is backward compatible for the v0.4.1 version of "http-interop". * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib + * * @codeCoverageIgnore */ class Handler041 implements DelegateInterface @@ -31,7 +33,8 @@ public function __construct(HandlerInterface $handler) } /** - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ public function __invoke(ServerRequestInterface $request) @@ -40,7 +43,8 @@ public function __invoke(ServerRequestInterface $request) } /** - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ public function process(ServerRequestInterface $request) diff --git a/src/Middleware/Handlers/Handler050.php b/src/Middleware/Handlers/Handler050.php index f3fefd2c..9ce25344 100644 --- a/src/Middleware/Handlers/Handler050.php +++ b/src/Middleware/Handlers/Handler050.php @@ -12,7 +12,9 @@ * A handler that is backward compatible for the v0.5.0 version of "http-interop". * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib + * * @codeCoverageIgnore */ class Handler050 implements RequestHandlerInterface @@ -31,7 +33,8 @@ public function __construct(HandlerInterface $handler) } /** - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ public function __invoke(ServerRequestInterface $request) @@ -40,7 +43,8 @@ public function __invoke(ServerRequestInterface $request) } /** - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ public function handle(ServerRequestInterface $request) diff --git a/src/Middleware/Handlers/Handler100.php b/src/Middleware/Handlers/Handler100.php index 1fef631e..e40efaa8 100644 --- a/src/Middleware/Handlers/Handler100.php +++ b/src/Middleware/Handlers/Handler100.php @@ -13,7 +13,9 @@ * A handler that is backward compatible for the official implementation of PSR-15. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib + * * @codeCoverageIgnore */ class Handler100 implements RequestHandlerInterface @@ -32,7 +34,8 @@ public function __construct(HandlerInterface $handler) } /** - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ public function __invoke(ServerRequestInterface $request): ResponseInterface @@ -41,7 +44,8 @@ public function __invoke(ServerRequestInterface $request): ResponseInterface } /** - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ public function handle(ServerRequestInterface $request): ResponseInterface diff --git a/src/Middleware/Interop.php b/src/Middleware/Interop.php index 98db90da..502f155f 100644 --- a/src/Middleware/Interop.php +++ b/src/Middleware/Interop.php @@ -14,7 +14,9 @@ * A handler that allows all "http-interop" middlewares to interact with Slytherin. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib + * * @codeCoverageIgnore */ class Interop implements HandlerInterface @@ -43,7 +45,8 @@ public function __construct($handler) /** * Dispatches the next available middleware and return the response. * - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ public function __invoke(ServerRequestInterface $request) @@ -54,7 +57,8 @@ public function __invoke(ServerRequestInterface $request) /** * Dispatches the next available middleware and return the response. * - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ public function handle(ServerRequestInterface $request) @@ -88,8 +92,9 @@ public static function exists() /** * Converts the handler into the currently installed PSR-15 implementation. * - * @param mixed $handler - * @param string|null $version + * @param mixed $handler + * @param string|null $version + * * @return mixed */ public static function getHandler($handler, $version = null) @@ -135,8 +140,9 @@ public static function getHandler($handler, $version = null) /** * Checks if the handler is installed in the supported PSR-15 version. * - * @param mixed $handler - * @param string $version + * @param mixed $handler + * @param string $version + * * @return boolean */ public static function hasVersion($handler, $class) diff --git a/src/Middleware/Middleware.php b/src/Middleware/Middleware.php index 2d979dd4..cd66112b 100644 --- a/src/Middleware/Middleware.php +++ b/src/Middleware/Middleware.php @@ -8,7 +8,8 @@ * Middleware * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Middleware extends Dispatcher { diff --git a/src/Middleware/MiddlewareIntegration.php b/src/Middleware/MiddlewareIntegration.php index cc9ef472..7c2d140b 100644 --- a/src/Middleware/MiddlewareIntegration.php +++ b/src/Middleware/MiddlewareIntegration.php @@ -14,7 +14,8 @@ * An integration for Slytherin's Middleware packages. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class MiddlewareIntegration implements IntegrationInterface { @@ -26,8 +27,9 @@ class MiddlewareIntegration implements IntegrationInterface /** * Defines the specified integration. * - * @param \Rougin\Slytherin\Container\ContainerInterface $container - * @param \Rougin\Slytherin\Integration\Configuration $config + * @param \Rougin\Slytherin\Container\ContainerInterface $container + * @param \Rougin\Slytherin\Integration\Configuration $config + * * @return \Rougin\Slytherin\Container\ContainerInterface */ public function define(ContainerInterface $container, Configuration $config) diff --git a/src/Middleware/MiddlewareInterface.php b/src/Middleware/MiddlewareInterface.php index 2f008627..4e3a03e5 100644 --- a/src/Middleware/MiddlewareInterface.php +++ b/src/Middleware/MiddlewareInterface.php @@ -10,7 +10,8 @@ * An interface for handling middlewares to Slytherin. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ interface MiddlewareInterface { @@ -18,8 +19,9 @@ interface MiddlewareInterface * Processes an incoming server request and return a response, optionally * delegating to the next middleware component to create the response. * - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Rougin\Slytherin\Middleware\HandlerInterface $handler + * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Rougin\Slytherin\Middleware\HandlerInterface $handler + * * @return \Psr\Http\Message\ResponseInterface */ public function process(ServerRequestInterface $request, HandlerInterface $handler); diff --git a/src/Middleware/Stratigility/Middleware.php b/src/Middleware/Stratigility/Middleware.php index ddd3939d..afd7bf65 100644 --- a/src/Middleware/Stratigility/Middleware.php +++ b/src/Middleware/Stratigility/Middleware.php @@ -10,7 +10,8 @@ * Stratigility Middleware * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Middleware extends StratigilityDispatcher { diff --git a/src/Middleware/StratigilityDispatcher.php b/src/Middleware/StratigilityDispatcher.php index 15c399eb..416c4ab6 100644 --- a/src/Middleware/StratigilityDispatcher.php +++ b/src/Middleware/StratigilityDispatcher.php @@ -5,10 +5,6 @@ use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Rougin\Slytherin\Http\Response; -use Rougin\Slytherin\Middleware\Doublepass; -use Rougin\Slytherin\Middleware\HandlerInterface; -use Rougin\Slytherin\Middleware\Interop; -use Rougin\Slytherin\Middleware\MiddlewareInterface; use Zend\Stratigility\MiddlewarePipe; /** @@ -17,7 +13,8 @@ * A simple implementation of middleware dispatcher that is built on top of Zend's Stratigility. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib * * @link https://github.com/zendframework/zend-stratigility */ @@ -63,8 +60,9 @@ public function hasPsr() * Processes an incoming server request and return a response, optionally * delegating to the next middleware component to create the response. * - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Rougin\Slytherin\Middleware\HandlerInterface $handler + * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Rougin\Slytherin\Middleware\HandlerInterface $handler + * * @return \Psr\Http\Message\ResponseInterface */ public function process(ServerRequestInterface $request, HandlerInterface $handler) @@ -111,8 +109,10 @@ public function process(ServerRequestInterface $request, HandlerInterface $handl /** * Sets the factory if there is a middleware decorator. * - * @param \Psr\Http\Message\ResponseInterface $response + * @param \Psr\Http\Message\ResponseInterface $response + * * @return void + * * @codeCoverageIgnore */ protected function setFactory(ResponseInterface $response) @@ -138,8 +138,10 @@ protected function setFactory(ResponseInterface $response) /** * Sets the Slytherin middleware into a single-pass or double-pass callable. * - * @param \Rougin\Slytherin\Middleware\MiddlewareInterface $item + * @param \Rougin\Slytherin\Middleware\MiddlewareInterface $item + * * @return callable + * * @codeCoverageIgnore */ protected function setMiddleware(MiddlewareInterface $item) @@ -164,8 +166,10 @@ protected function setMiddleware(MiddlewareInterface $item) /** * Sets the PSR-15 decorator to a middleware. * - * @param callable $item + * @param callable $item + * * @return object + * * @codeCoverageIgnore */ protected function setPsrMiddleware($item) diff --git a/src/Middleware/StratigilityMiddleware.php b/src/Middleware/StratigilityMiddleware.php index 71e51dcc..ebb0131a 100644 --- a/src/Middleware/StratigilityMiddleware.php +++ b/src/Middleware/StratigilityMiddleware.php @@ -8,7 +8,8 @@ * Stratigility Middleware * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class StratigilityMiddleware extends Stratigility\Middleware { diff --git a/src/Middleware/Vanilla/Delegate.php b/src/Middleware/Vanilla/Delegate.php index 23d36775..3561946b 100644 --- a/src/Middleware/Vanilla/Delegate.php +++ b/src/Middleware/Vanilla/Delegate.php @@ -10,7 +10,8 @@ * Delegate * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Delegate extends Slytherin { diff --git a/src/Middleware/Vanilla/Middleware.php b/src/Middleware/Vanilla/Middleware.php index a4eb894f..2c47efda 100644 --- a/src/Middleware/Vanilla/Middleware.php +++ b/src/Middleware/Vanilla/Middleware.php @@ -10,7 +10,8 @@ * Middleware * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Middleware extends Slytherin { diff --git a/src/Middleware/VanillaDelegate.php b/src/Middleware/VanillaDelegate.php index ed0924fb..42127b33 100644 --- a/src/Middleware/VanillaDelegate.php +++ b/src/Middleware/VanillaDelegate.php @@ -8,7 +8,8 @@ * Delegate * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class VanillaDelegate extends Vanilla\Delegate { diff --git a/src/Middleware/VanillaMiddleware.php b/src/Middleware/VanillaMiddleware.php index fcc0a31e..edf6e3d0 100644 --- a/src/Middleware/VanillaMiddleware.php +++ b/src/Middleware/VanillaMiddleware.php @@ -8,7 +8,8 @@ * Middleware * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class VanillaMiddleware extends Vanilla\Middleware { diff --git a/src/Middleware/Version.php b/src/Middleware/Version.php index d6a9b1f4..6f7ccf74 100644 --- a/src/Middleware/Version.php +++ b/src/Middleware/Version.php @@ -8,7 +8,8 @@ * A simple class for getting the current installed version of "http-interop". * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Version { @@ -24,6 +25,7 @@ class Version * Returns the current version installed. * * @return string|null + * * @codeCoverageIgnore */ public static function get() diff --git a/src/Middleware/Wrapper.php b/src/Middleware/Wrapper.php index 32a964c2..99b66378 100644 --- a/src/Middleware/Wrapper.php +++ b/src/Middleware/Wrapper.php @@ -10,7 +10,8 @@ * A middleware that converts various middlewares into its Slytherin counterpart. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Wrapper implements MiddlewareInterface { @@ -32,8 +33,9 @@ public function __construct($middleware) /** * Processes an incoming server request and return a response. * - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Rougin\Slytherin\Middleware\HandlerInterface $handler + * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Rougin\Slytherin\Middleware\HandlerInterface $handler + * * @return \Psr\Http\Message\ResponseInterface */ public function process(ServerRequestInterface $request, HandlerInterface $handler) diff --git a/src/Routing/Dispatcher.php b/src/Routing/Dispatcher.php index ea7fbc2a..6aeda35f 100644 --- a/src/Routing/Dispatcher.php +++ b/src/Routing/Dispatcher.php @@ -8,7 +8,8 @@ * A simple implementation of a route dispatcher that is based on DispatcherInterface. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Dispatcher implements DispatcherInterface { @@ -38,8 +39,9 @@ public function __construct(RouterInterface $router = null) /** * Dispatches against the provided HTTP method verb and URI. * - * @param string $method - * @param string $uri + * @param string $method + * @param string $uri + * * @return \Rougin\Slytherin\Routing\RouteInterface * * @throws \BadMethodCallException @@ -80,7 +82,8 @@ public function dispatch($method, $uri) /** * Sets the router and parse its available routes if needed. * - * @param \Rougin\Slytherin\Routing\RouterInterface $router + * @param \Rougin\Slytherin\Routing\RouterInterface $router + * * @return self * * @throws \UnexpectedValueException @@ -95,7 +98,8 @@ public function setRouter(RouterInterface $router) /** * Checks if the specified method is a valid HTTP method. * - * @param string $method + * @param string $method + * * @return boolean * * @throws \BadMethodCallException @@ -115,8 +119,9 @@ protected function validMethod($method) /** * Matches the route from the parsed URI. * - * @param string $method - * @param string $uri + * @param string $method + * @param string $uri + * * @return \Rougin\Slytherin\Routing\RouteInterface|null */ protected function match($method, $uri) diff --git a/src/Routing/DispatcherInterface.php b/src/Routing/DispatcherInterface.php index c51167fa..05d707e0 100644 --- a/src/Routing/DispatcherInterface.php +++ b/src/Routing/DispatcherInterface.php @@ -8,15 +8,17 @@ * An interface for handling third-party route dispatchers. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ interface DispatcherInterface { /** * Dispatches against the provided HTTP method verb and URI. * - * @param string $method - * @param string $uri + * @param string $method + * @param string $uri + * * @return \Rougin\Slytherin\Routing\RouteInterface * * @throws \BadMethodCallException @@ -26,7 +28,8 @@ public function dispatch($method, $uri); /** * Sets the router and parse its available routes if needed. * - * @param \Rougin\Slytherin\Routing\RouterInterface $router + * @param \Rougin\Slytherin\Routing\RouterInterface $router + * * @return self * * @throws \UnexpectedValueException diff --git a/src/Routing/FastRoute/Dispatcher.php b/src/Routing/FastRoute/Dispatcher.php index 219bc405..73910871 100644 --- a/src/Routing/FastRoute/Dispatcher.php +++ b/src/Routing/FastRoute/Dispatcher.php @@ -10,7 +10,8 @@ * FastRoute Dispatcher * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Dispatcher extends FastRouteDispatcher { diff --git a/src/Routing/FastRoute/Router.php b/src/Routing/FastRoute/Router.php index 3f8f2648..aeda70d1 100644 --- a/src/Routing/FastRoute/Router.php +++ b/src/Routing/FastRoute/Router.php @@ -10,7 +10,8 @@ * FastRoute Router * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Router extends FastRouteRouter { diff --git a/src/Routing/FastRouteDispatcher.php b/src/Routing/FastRouteDispatcher.php index f38884e5..edbb71f2 100644 --- a/src/Routing/FastRouteDispatcher.php +++ b/src/Routing/FastRouteDispatcher.php @@ -8,7 +8,8 @@ * A simple implementation of dispatcher that is built on top of FastRoute. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib * * @link https://github.com/nikic/FastRoute */ @@ -22,8 +23,9 @@ class FastRouteDispatcher extends Dispatcher /** * Dispatches against the provided HTTP method verb and URI. * - * @param string $method - * @param string $uri + * @param string $method + * @param string $uri + * * @return \Rougin\Slytherin\Routing\RouteInterface * * @throws \BadMethodCallException @@ -56,7 +58,8 @@ public function dispatch($method, $uri) /** * Sets the router and parse its available routes if needed. * - * @param \Rougin\Slytherin\Routing\RouterInterface $router + * @param \Rougin\Slytherin\Routing\RouterInterface $router + * * @return self * * @throws \UnexpectedValueException diff --git a/src/Routing/FastRouteRouter.php b/src/Routing/FastRouteRouter.php index 6b6ec9da..0d5ee320 100644 --- a/src/Routing/FastRouteRouter.php +++ b/src/Routing/FastRouteRouter.php @@ -12,7 +12,8 @@ * A simple implementation of router that is built on top of FastRoute. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib * * @link https://github.com/nikic/FastRoute */ @@ -26,7 +27,7 @@ class FastRouteRouter extends Router /** * Initializes the router instance. * - * @param array> $routes + * @param array $routes */ public function __construct(array $routes = array()) { @@ -36,7 +37,8 @@ public function __construct(array $routes = array()) } /** - * @param \Rougin\Slytherin\Routing\RouteInterface[] $routes + * @param \Rougin\Slytherin\Routing\RouteInterface[] $routes + * * @return callable */ public function asParsed(array $routes) @@ -48,7 +50,8 @@ public function asParsed(array $routes) /** * Returns a listing of parsed routes. * - * @param \Rougin\Slytherin\Routing\RouteInterface[] $routes + * @param \Rougin\Slytherin\Routing\RouteInterface[] $routes + * * @return mixed|null */ public function parsed(array $routes = array()) @@ -79,7 +82,8 @@ public function parsed(array $routes = array()) } /** - * @param \FastRoute\RouteCollector $collector + * @param \FastRoute\RouteCollector $collector + * * @return self */ public function setCollector(RouteCollector $collector) diff --git a/src/Routing/Phroute/Dispatcher.php b/src/Routing/Phroute/Dispatcher.php index 53b90bad..f30c1a47 100644 --- a/src/Routing/Phroute/Dispatcher.php +++ b/src/Routing/Phroute/Dispatcher.php @@ -10,7 +10,8 @@ * Phroute Dispatcher * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Dispatcher extends PhrouteDispatcher { diff --git a/src/Routing/Phroute/Router.php b/src/Routing/Phroute/Router.php index 2104108e..ca2609a5 100644 --- a/src/Routing/Phroute/Router.php +++ b/src/Routing/Phroute/Router.php @@ -10,7 +10,8 @@ * Phroute Router * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Router extends PhrouteRouter { diff --git a/src/Routing/PhrouteDispatcher.php b/src/Routing/PhrouteDispatcher.php index 9b395c1e..e19c78ab 100644 --- a/src/Routing/PhrouteDispatcher.php +++ b/src/Routing/PhrouteDispatcher.php @@ -13,7 +13,8 @@ * A simple implementation of dispatcher that is built on top of Phroute. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib * * @link https://github.com/mrjgreen/phroute */ @@ -58,8 +59,9 @@ public function __construct(RouterInterface $router = null, HandlerResolverInter /** * Dispatches against the provided HTTP method verb and URI. * - * @param string $method - * @param string $uri + * @param string $method + * @param string $uri + * * @return \Rougin\Slytherin\Routing\RouteInterface * * @throws \BadMethodCallException @@ -104,7 +106,8 @@ public function dispatch($method, $uri) /** * Sets the router and parse its available routes if needed. * - * @param \Rougin\Slytherin\Routing\RouterInterface $router + * @param \Rougin\Slytherin\Routing\RouterInterface $router + * * @return self * * @throws \UnexpectedValueException diff --git a/src/Routing/PhrouteResolver.php b/src/Routing/PhrouteResolver.php index e49c94aa..26862276 100644 --- a/src/Routing/PhrouteResolver.php +++ b/src/Routing/PhrouteResolver.php @@ -10,14 +10,16 @@ * A handler resolver that wraps the route as the result. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib * * @link https://github.com/mrjgreen/phroute */ class PhrouteResolver implements HandlerResolverInterface { /** - * @param \Rougin\Slytherin\Routing\RouteInterface $handler + * @param \Rougin\Slytherin\Routing\RouteInterface $handler + * * @return array */ public function resolve($handler) diff --git a/src/Routing/PhrouteRouter.php b/src/Routing/PhrouteRouter.php index 6ed39672..294219db 100644 --- a/src/Routing/PhrouteRouter.php +++ b/src/Routing/PhrouteRouter.php @@ -10,7 +10,8 @@ * A simple implementation of router that is built on top of Phroute. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib * * @link https://github.com/mrjgreen/phroute */ @@ -24,7 +25,7 @@ class PhrouteRouter extends Router /** * Initializes the router instance. * - * @param array> $routes + * @param array $routes */ public function __construct(array $routes = array()) { @@ -36,10 +37,11 @@ public function __construct(array $routes = array()) /** * Adds a new raw route. * - * @param string $method - * @param string $uri - * @param callable|string[]|string $handler - * @param callable|mixed[]|string $middlewares + * @param string $method + * @param string $uri + * @param callable|string|string[] $handler + * @param callable|mixed[]|string $middlewares + * * @return self */ public function add($method, $uri, $handler, $middlewares = array()) @@ -56,7 +58,8 @@ public function add($method, $uri, $handler, $middlewares = array()) } /** - * @param \Rougin\Slytherin\Routing\RouteInterface[] $routes + * @param \Rougin\Slytherin\Routing\RouteInterface[] $routes + * * @return \Phroute\Phroute\RouteDataArray */ public function asParsed(array $routes) @@ -86,7 +89,8 @@ public function asParsed(array $routes) /** * Returns a listing of parsed routes. * - * @param \Rougin\Slytherin\Routing\RouteInterface[] $routes + * @param \Rougin\Slytherin\Routing\RouteInterface[] $routes + * * @return mixed|null */ public function parsed(array $routes = array()) @@ -95,7 +99,8 @@ public function parsed(array $routes = array()) } /** - * @param \Phroute\Phroute\RouteCollector $collector + * @param \Phroute\Phroute\RouteCollector $collector + * * @return self */ public function setCollector(RouteCollector $collector) diff --git a/src/Routing/PhrouteWrapper.php b/src/Routing/PhrouteWrapper.php index 0e1a951f..7cba9276 100644 --- a/src/Routing/PhrouteWrapper.php +++ b/src/Routing/PhrouteWrapper.php @@ -8,7 +8,8 @@ * A simple class wrapper for resolving routes in Phroute. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib * * @link https://github.com/mrjgreen/phroute */ @@ -26,8 +27,9 @@ public function __construct(RouteInterface $route) } /** - * @param string $method - * @param mixed[] $params + * @param string $method + * @param mixed[] $params + * * @return mixed */ public function __call($method, $params) diff --git a/src/Routing/Route.php b/src/Routing/Route.php index dd100ad9..13b04ce7 100644 --- a/src/Routing/Route.php +++ b/src/Routing/Route.php @@ -8,7 +8,8 @@ * A simple class for handling routes. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Route implements RouteInterface { @@ -40,7 +41,7 @@ class Route implements RouteInterface /** * @param string $method * @param string $uri - * @param callable|string[]|string $handler + * @param callable|string|string[] $handler * @param callable|mixed[]|string $middlewares */ public function __construct($method, $uri, $handler, $middlewares = array()) @@ -145,7 +146,8 @@ public function getUri() /** * Sets the parameters to the route. * - * @param array $params + * @param array $params + * * @return self */ public function setParams($params) @@ -158,8 +160,9 @@ public function setParams($params) /** * Capture the specified regular expressions. * - * @param string $pattern - * @param string $search + * @param string $pattern + * @param string $search + * * @return string */ protected function capture($pattern, $search) diff --git a/src/Routing/RouteInterface.php b/src/Routing/RouteInterface.php index 312922ea..f19f21a9 100644 --- a/src/Routing/RouteInterface.php +++ b/src/Routing/RouteInterface.php @@ -8,7 +8,8 @@ * An interface for handling the HTTP routes. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ interface RouteInterface { @@ -59,7 +60,8 @@ public function getUri(); /** * Sets the parameters to the route. * - * @param string[] $params + * @param string[] $params + * * @return self */ public function setParams($params); diff --git a/src/Routing/Router.php b/src/Routing/Router.php index 37ccb229..5a729b7a 100644 --- a/src/Routing/Router.php +++ b/src/Routing/Router.php @@ -8,7 +8,8 @@ * A simple implementation of a router that is based on RouterInterface. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Router implements RouterInterface { @@ -55,10 +56,10 @@ public function __construct(array $routes = array()) /** @var string */ $uri = $route[1]; - /** @var callable|string[]|string */ + /** @var callable|string|string[] */ $handler = $route[2]; - /** @var \Rougin\Slytherin\Middleware\MiddlewareInterface[]|string[]|string */ + /** @var \Rougin\Slytherin\Middleware\MiddlewareInterface[]|string|string[] */ $middlewares = isset($route[3]) ? $route[3] : array(); if (is_string($middlewares)) @@ -73,10 +74,11 @@ public function __construct(array $routes = array()) /** * Adds a new raw route. * - * @param string $method - * @param string $uri - * @param callable|string[]|string $handler - * @param callable|mixed[]|string $middlewares + * @param string $method + * @param string $uri + * @param callable|string|string[] $handler + * @param callable|mixed[]|string $middlewares + * * @return self */ public function add($method, $uri, $handler, $middlewares = array()) @@ -113,10 +115,11 @@ public function add($method, $uri, $handler, $middlewares = array()) * * Adds a new raw route. * - * @param string $method - * @param string $route - * @param callable|string[]|string $handler - * @param callable|mixed[]|string $middlewares + * @param string $method + * @param string $route + * @param callable|string|string[] $handler + * @param callable|mixed[]|string $middlewares + * * @return self */ public function addRoute($method, $route, $handler, $middlewares = array()) @@ -129,7 +132,8 @@ public function addRoute($method, $route, $handler, $middlewares = array()) * * Merges a listing of parsed routes to current one. * - * @param \Rougin\Slytherin\Routing\RouteInterface[] $routes + * @param \Rougin\Slytherin\Routing\RouteInterface[] $routes + * * @return self */ public function addRoutes(array $routes) @@ -140,9 +144,10 @@ public function addRoutes(array $routes) /** * Adds a DELETE route. * - * @param string $uri - * @param callable|string[]|string $handler - * @param callable|mixed[]|string $middlewares + * @param string $uri + * @param callable|string|string[] $handler + * @param callable|mixed[]|string $middlewares + * * @return self */ public function delete($uri, $handler, $middlewares = array()) @@ -153,8 +158,9 @@ public function delete($uri, $handler, $middlewares = array()) /** * Finds a specific route based on the specified HTTP method and URI. * - * @param string $method - * @param string $uri + * @param string $method + * @param string $uri + * * @return \Rougin\Slytherin\Routing\RouteInterface|null */ public function find($method, $uri) @@ -179,9 +185,10 @@ public function find($method, $uri) /** * Adds a GET route. * - * @param string $uri - * @param callable|string[]|string $handler - * @param callable|mixed[]|string $middlewares + * @param string $uri + * @param callable|string|string[] $handler + * @param callable|mixed[]|string $middlewares + * * @return self */ public function get($uri, $handler, $middlewares = array()) @@ -194,8 +201,9 @@ public function get($uri, $handler, $middlewares = array()) * * Returns a specific route based on the specified HTTP method and URI. * - * @param string $method - * @param string $uri + * @param string $method + * @param string $uri + * * @return \Rougin\Slytherin\Routing\RouteInterface|null */ public function getRoute($method, $uri) @@ -218,8 +226,9 @@ public function getRoutes() /** * Checks if the specified route is available in the router. * - * @param string $method - * @param string $uri + * @param string $method + * @param string $uri + * * @return boolean */ public function has($method, $uri) @@ -230,7 +239,8 @@ public function has($method, $uri) /** * Merges a listing of parsed routes to current one. * - * @param \Rougin\Slytherin\Routing\RouteInterface[] $routes + * @param \Rougin\Slytherin\Routing\RouteInterface[] $routes + * * @return self */ public function merge(array $routes) @@ -243,7 +253,8 @@ public function merge(array $routes) /** * Returns a listing of parsed routes. * - * @param \Rougin\Slytherin\Routing\RouteInterface[] $routes + * @param \Rougin\Slytherin\Routing\RouteInterface[] $routes + * * @return mixed|null */ public function parsed(array $routes = array()) @@ -254,9 +265,10 @@ public function parsed(array $routes = array()) /** * Adds a PATCH route. * - * @param string $uri - * @param callable|string[]|string $handler - * @param callable|mixed[]|string $middlewares + * @param string $uri + * @param callable|string|string[] $handler + * @param callable|mixed[]|string $middlewares + * * @return self */ public function patch($uri, $handler, $middlewares = array()) @@ -267,9 +279,10 @@ public function patch($uri, $handler, $middlewares = array()) /** * Adds a POST route. * - * @param string $uri - * @param callable|string[]|string $handler - * @param callable|mixed[]|string $middlewares + * @param string $uri + * @param callable|string|string[] $handler + * @param callable|mixed[]|string $middlewares + * * @return self */ public function post($uri, $handler, $middlewares = array()) @@ -280,8 +293,9 @@ public function post($uri, $handler, $middlewares = array()) /** * Sets a prefix for the succeeding route endpoints. * - * @param string $prefix - * @param string|null $namespace + * @param string $prefix + * @param string|null $namespace + * * @return self */ public function prefix($prefix = '', $namespace = null) @@ -303,9 +317,10 @@ public function prefix($prefix = '', $namespace = null) /** * Adds a PUT route. * - * @param string $uri - * @param callable|string[]|string $handler - * @param callable|mixed[]|string $middlewares + * @param string $uri + * @param callable|string|string[] $handler + * @param callable|mixed[]|string $middlewares + * * @return self */ public function put($uri, $handler, $middlewares = array()) @@ -316,9 +331,10 @@ public function put($uri, $handler, $middlewares = array()) /** * Adds a listing of routes specified for RESTful approach. * - * @param string $uri - * @param string $class - * @param mixed[]|string $middlewares + * @param string $uri + * @param string $class + * @param mixed[]|string $middlewares + * * @return self */ public function restful($uri, $class, $middlewares = array()) @@ -339,8 +355,9 @@ public function restful($uri, $class, $middlewares = array()) * * Finds a specific route based on the specified HTTP method and URI. * - * @param string $method - * @param string $uri + * @param string $method + * @param string $uri + * * @return \Rougin\Slytherin\Routing\RouteInterface|null */ public function retrieve($method, $uri) @@ -363,8 +380,9 @@ public function routes() * * Sets a prefix for the succeeding route endpoints. * - * @param string $prefix - * @param string $namespace + * @param string $prefix + * @param string $namespace + * * @return self */ public function setPrefix($prefix = '', $namespace = '') diff --git a/src/Routing/RouterInterface.php b/src/Routing/RouterInterface.php index 1b49e981..ab49783e 100644 --- a/src/Routing/RouterInterface.php +++ b/src/Routing/RouterInterface.php @@ -8,17 +8,19 @@ * An interface for handling third-party routers. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ interface RouterInterface { /** * Adds a new raw route. * - * @param string $method - * @param string $uri - * @param callable|string[]|string $handler - * @param \Rougin\Slytherin\Middleware\MiddlewareInterface[]|string[] $middlewares + * @param string $method + * @param string $uri + * @param callable|string|string[] $handler + * @param callable|mixed[]|string $middlewares + * * @return self */ public function add($method, $uri, $handler, $middlewares = array()); @@ -26,7 +28,8 @@ public function add($method, $uri, $handler, $middlewares = array()); /** * Merges a listing of parsed routes to current one. * - * @param \Rougin\Slytherin\Routing\RouteInterface[] $routes + * @param \Rougin\Slytherin\Routing\RouteInterface[] $routes + * * @return self */ public function merge(array $routes); @@ -34,7 +37,8 @@ public function merge(array $routes); /** * Returns a listing of parsed routes. * - * @param \Rougin\Slytherin\Routing\RouteInterface[] $routes + * @param \Rougin\Slytherin\Routing\RouteInterface[] $routes + * * @return mixed|null */ public function parsed(array $routes = array()); diff --git a/src/Routing/RoutingIntegration.php b/src/Routing/RoutingIntegration.php index ace96a6a..7ccd39b6 100644 --- a/src/Routing/RoutingIntegration.php +++ b/src/Routing/RoutingIntegration.php @@ -13,7 +13,8 @@ * An integration for Slytherin's Routing packages. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class RoutingIntegration implements IntegrationInterface { @@ -25,8 +26,9 @@ class RoutingIntegration implements IntegrationInterface /** * Defines the specified integration. * - * @param \Rougin\Slytherin\Container\ContainerInterface $container - * @param \Rougin\Slytherin\Integration\Configuration $config + * @param \Rougin\Slytherin\Container\ContainerInterface $container + * @param \Rougin\Slytherin\Integration\Configuration $config + * * @return \Rougin\Slytherin\Container\ContainerInterface */ public function define(ContainerInterface $container, Configuration $config) @@ -53,7 +55,8 @@ public function define(ContainerInterface $container, Configuration $config) /** * Checks the preferred package to be used. * - * @param string $type + * @param string $type + * * @return boolean */ protected function wants($type) diff --git a/src/Routing/Vanilla/Dispatcher.php b/src/Routing/Vanilla/Dispatcher.php index c0a5b10b..f386941b 100644 --- a/src/Routing/Vanilla/Dispatcher.php +++ b/src/Routing/Vanilla/Dispatcher.php @@ -10,7 +10,8 @@ * Dispatcher * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Dispatcher extends Slytherin { diff --git a/src/Routing/Vanilla/Router.php b/src/Routing/Vanilla/Router.php index 3421c376..88ca705a 100644 --- a/src/Routing/Vanilla/Router.php +++ b/src/Routing/Vanilla/Router.php @@ -10,7 +10,8 @@ * Router * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Router extends Slytherin { diff --git a/src/System.php b/src/System.php index 0b901266..5d1cd4ec 100644 --- a/src/System.php +++ b/src/System.php @@ -14,7 +14,8 @@ * Integrates all specified components into the application. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class System { @@ -72,7 +73,8 @@ public function __construct(ContainerInterface $container = null, Configuration /** * Handles the ServerRequestInterface to convert it to a ResponseInterface. * - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ public function handle(ServerRequestInterface $request) @@ -116,8 +118,9 @@ public function handle(ServerRequestInterface $request) /** * Adds the specified integrations to the container. * - * @param mixed|mixed[] $items - * @param \Rougin\Slytherin\Integration\Configuration|null $config + * @param mixed|mixed[] $items + * @param \Rougin\Slytherin\Integration\Configuration|null $config + * * @return self */ public function integrate($items, Configuration $config = null) @@ -175,7 +178,8 @@ public function run() /** * Emits the headers based from the response. * - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ protected function emit(ServerRequestInterface $request) diff --git a/src/System/Handler.php b/src/System/Handler.php index d0b9dd66..90590dbc 100644 --- a/src/System/Handler.php +++ b/src/System/Handler.php @@ -16,7 +16,8 @@ * Builds the final callback after handling from application. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Handler implements HandlerInterface { @@ -46,7 +47,8 @@ public function __construct(RouteInterface $route, ContainerInterface $container /** * Returns a callback for handling the application. * - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ public function handle(ServerRequestInterface $request) @@ -92,7 +94,8 @@ public function handle(ServerRequestInterface $request) /** * Parses the reflection parameters against the result parameters. * - * @param \ReflectionFunctionAbstract $reflector + * @param \ReflectionFunctionAbstract $reflector + * * @return array */ protected function setParams(\ReflectionFunctionAbstract $reflector) @@ -125,7 +128,8 @@ protected function setParams(\ReflectionFunctionAbstract $reflector) /** * Converts the result into a \Psr\Http\Message\ResponseInterface instance. * - * @param \Psr\Http\Message\ResponseInterface|mixed $function + * @param \Psr\Http\Message\ResponseInterface|mixed $function + * * @return \Psr\Http\Message\ResponseInterface */ protected function setResponse($function) diff --git a/src/System/Lastone.php b/src/System/Lastone.php index a176c5a0..a06ec1d5 100644 --- a/src/System/Lastone.php +++ b/src/System/Lastone.php @@ -12,12 +12,14 @@ * A handler that only returns an empty HTTP response. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Lastone implements HandlerInterface { /** - * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ServerRequestInterface $request + * * @return \Psr\Http\Message\ResponseInterface */ public function handle(ServerRequestInterface $request) diff --git a/src/System/Routing.php b/src/System/Routing.php index 00b383ca..c746bb34 100644 --- a/src/System/Routing.php +++ b/src/System/Routing.php @@ -13,7 +13,8 @@ * A routing utility for defining HTTP routes directly. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib * * @method add($method, $uri, $handler, $middlewares = array()) * @method delete($uri, $handler, $middlewares = array()) @@ -74,8 +75,9 @@ public function run() /** * Calls methods from the Router instance. * - * @param string $method - * @param mixed[] $params + * @param string $method + * @param mixed[] $params + * * @return mixed */ public function __call($method, $params) diff --git a/src/Template/Renderer.php b/src/Template/Renderer.php index 1086a0de..71107b7e 100644 --- a/src/Template/Renderer.php +++ b/src/Template/Renderer.php @@ -8,7 +8,8 @@ * A simple implementation of a template renderer. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Renderer implements RendererInterface { @@ -30,8 +31,9 @@ public function __construct($paths) /** * Renders a file from a specified template. * - * @param string $template - * @param array $data + * @param string $template + * @param array $data + * * @return string * * @throws \InvalidArgumentException @@ -65,10 +67,11 @@ public function render($template, array $data = array()) /** * Checks if the specified file exists. * - * @param array $files - * @param string $path - * @param string $source - * @param string $template + * @param array $files + * @param string $path + * @param string $source + * @param string $template + * * @return string|null */ protected function check(array $files, $path, $source, $template) @@ -100,8 +103,9 @@ protected function check(array $files, $path, $source, $template) /** * Extracts the contents of the specified file. * - * @param string $filepath - * @param array $data + * @param string $filepath + * @param array $data + * * @return string */ protected function extract($filepath, array $data) @@ -122,7 +126,8 @@ protected function extract($filepath, array $data) /** * Returns an array of filepaths from a specified directory. * - * @param string $path + * @param string $path + * * @return string[] */ protected function files($path) diff --git a/src/Template/RendererIntegration.php b/src/Template/RendererIntegration.php index 21d921c3..a022904b 100644 --- a/src/Template/RendererIntegration.php +++ b/src/Template/RendererIntegration.php @@ -13,7 +13,8 @@ * An integration for template renderers to be included in Slytherin. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class RendererIntegration implements IntegrationInterface { @@ -25,8 +26,9 @@ class RendererIntegration implements IntegrationInterface /** * Defines the specified integration. * - * @param \Rougin\Slytherin\Container\ContainerInterface $container - * @param \Rougin\Slytherin\Integration\Configuration $config + * @param \Rougin\Slytherin\Container\ContainerInterface $container + * @param \Rougin\Slytherin\Integration\Configuration $config + * * @return \Rougin\Slytherin\Container\ContainerInterface */ public function define(ContainerInterface $container, Configuration $config) diff --git a/src/Template/RendererInterface.php b/src/Template/RendererInterface.php index 8c259b37..8ce54f31 100644 --- a/src/Template/RendererInterface.php +++ b/src/Template/RendererInterface.php @@ -8,15 +8,17 @@ * An interface for handling third-party template engines. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ interface RendererInterface { /** * Renders a template. * - * @param string $template - * @param array $data + * @param string $template + * @param array $data + * * @return string */ public function render($template, array $data = array()); diff --git a/src/Template/Twig.php b/src/Template/Twig.php index 8f737051..01af2217 100644 --- a/src/Template/Twig.php +++ b/src/Template/Twig.php @@ -8,7 +8,8 @@ * Twig Renderer * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Twig extends Twig\Renderer { diff --git a/src/Template/Twig/Renderer.php b/src/Template/Twig/Renderer.php index f5938911..a21cbed6 100644 --- a/src/Template/Twig/Renderer.php +++ b/src/Template/Twig/Renderer.php @@ -10,7 +10,8 @@ * Twig Renderer * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Renderer extends TwigRenderer { diff --git a/src/Template/TwigLoader.php b/src/Template/TwigLoader.php index b4ce288e..83e72f06 100644 --- a/src/Template/TwigLoader.php +++ b/src/Template/TwigLoader.php @@ -8,7 +8,8 @@ * A backward compatibility class for the Twig package. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class TwigLoader { @@ -25,7 +26,8 @@ public function exists() /** * Loads the Twig instance. * - * @param string|string[] $path + * @param string|string[] $path + * * @return \Twig\Environment */ public function load($path) diff --git a/src/Template/TwigRenderer.php b/src/Template/TwigRenderer.php index 8d42c51e..bf823030 100644 --- a/src/Template/TwigRenderer.php +++ b/src/Template/TwigRenderer.php @@ -9,7 +9,8 @@ * Sensiolab's Twig - a flexible, fast, and secure template engine for PHP. * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib * * @link https://twig.sensiolabs.org */ @@ -35,8 +36,9 @@ public function __construct($twig, array $globals = array()) } /** - * @param string $name - * @param mixed $value + * @param string $name + * @param mixed $value + * * @return self */ public function addGlobal($name, $value) @@ -49,9 +51,10 @@ public function addGlobal($name, $value) /** * Renders a template. * - * @param string $template - * @param array $data - * @param string $extension + * @param string $template + * @param array $data + * @param string $extension + * * @return string */ public function render($template, array $data = array(), $extension = 'html') diff --git a/src/Template/Vanilla/Renderer.php b/src/Template/Vanilla/Renderer.php index 457d46a2..c9061b6e 100644 --- a/src/Template/Vanilla/Renderer.php +++ b/src/Template/Vanilla/Renderer.php @@ -10,7 +10,8 @@ * Renderer * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Renderer extends Slytherin { diff --git a/src/Template/VanillaRenderer.php b/src/Template/VanillaRenderer.php index 86a71818..7b31cd05 100644 --- a/src/Template/VanillaRenderer.php +++ b/src/Template/VanillaRenderer.php @@ -8,7 +8,8 @@ * Renderer * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class VanillaRenderer extends Vanilla\Renderer { diff --git a/tests/Application/ApplicationTest.php b/tests/Application/ApplicationTest.php index 1cd0b12c..4a92c376 100644 --- a/tests/Application/ApplicationTest.php +++ b/tests/Application/ApplicationTest.php @@ -12,7 +12,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ApplicationTest extends Testcase { @@ -184,9 +185,10 @@ public function test_default_route_with_integrations() /** * Changes the HTTP method and the uri of the request. * - * @param string $method - * @param string $uri - * @param array $data + * @param string $method + * @param string $uri + * @param array $data + * * @return \Rougin\Slytherin\Application */ private function setUrl($method, $uri, $data = array()) diff --git a/tests/Application/ApplicationTestCases.php b/tests/Application/ApplicationTestCases.php index f2c63dab..b2dd83b1 100644 --- a/tests/Application/ApplicationTestCases.php +++ b/tests/Application/ApplicationTestCases.php @@ -8,7 +8,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ApplicationTestCases extends Testcase { @@ -214,10 +215,11 @@ public function test_response_in_run_method() /** * Prepares the HTTP method and the URI of the request. * - * @param string $method - * @param string $uri - * @param array $data - * @param array $server + * @param string $method + * @param string $uri + * @param array $data + * @param array $server + * * @return \Psr\Http\Message\ServerRequestInterface */ protected function request($method, $uri, $data = array(), $server = array()) diff --git a/tests/Application/AurynContainerTest.php b/tests/Application/AurynContainerTest.php index b87bc9a6..383b5337 100644 --- a/tests/Application/AurynContainerTest.php +++ b/tests/Application/AurynContainerTest.php @@ -11,7 +11,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class AurynContainerTest extends ApplicationTestCases { diff --git a/tests/Application/ContainerInterfaceTest.php b/tests/Application/ContainerInterfaceTest.php index ee9164c6..6207a548 100644 --- a/tests/Application/ContainerInterfaceTest.php +++ b/tests/Application/ContainerInterfaceTest.php @@ -11,7 +11,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ContainerInterfaceTest extends ApplicationTestCases { diff --git a/tests/Application/IntegrationInterfaceTest.php b/tests/Application/IntegrationInterfaceTest.php index 1a33a773..d0555ce2 100644 --- a/tests/Application/IntegrationInterfaceTest.php +++ b/tests/Application/IntegrationInterfaceTest.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class IntegrationInterfaceTest extends ApplicationTestCases { diff --git a/tests/Component/CollectionTest.php b/tests/Component/CollectionTest.php index 2b5e26c0..05427bb1 100644 --- a/tests/Component/CollectionTest.php +++ b/tests/Component/CollectionTest.php @@ -2,7 +2,6 @@ namespace Rougin\Slytherin\Component; -use Rougin\Slytherin\Component\Collection; use Rougin\Slytherin\Debug\Vanilla\Debugger; use Rougin\Slytherin\Dispatching\Vanilla\Dispatcher; use Rougin\Slytherin\Dispatching\Vanilla\Router; @@ -18,7 +17,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class CollectionTest extends Testcase { diff --git a/tests/Container/AurynContainerTest.php b/tests/Container/AurynContainerTest.php index 7b77603d..5c3cd94f 100644 --- a/tests/Container/AurynContainerTest.php +++ b/tests/Container/AurynContainerTest.php @@ -7,7 +7,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class AurynContainerTest extends Testcase { diff --git a/tests/Container/ContainerTest.php b/tests/Container/ContainerTest.php index be02cf7d..7542ba1f 100644 --- a/tests/Container/ContainerTest.php +++ b/tests/Container/ContainerTest.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ContainerTest extends Testcase { diff --git a/tests/Container/LeagueContainerTest.php b/tests/Container/LeagueContainerTest.php index d06a4d97..aec2b9aa 100644 --- a/tests/Container/LeagueContainerTest.php +++ b/tests/Container/LeagueContainerTest.php @@ -2,12 +2,12 @@ namespace Rougin\Slytherin\Container; -use Rougin\Slytherin\Container\LeagueContainer; use Rougin\Slytherin\Testcase; /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class LeagueContainerTest extends Testcase { diff --git a/tests/Container/ReflectionContainerTest.php b/tests/Container/ReflectionContainerTest.php index f6910457..e7081a77 100644 --- a/tests/Container/ReflectionContainerTest.php +++ b/tests/Container/ReflectionContainerTest.php @@ -2,13 +2,12 @@ namespace Rougin\Slytherin\Container; -use Rougin\Slytherin\Container\Container; -use Rougin\Slytherin\Container\ReflectionContainer; use Rougin\Slytherin\Testcase; /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ReflectionContainerTest extends Testcase { diff --git a/tests/Debug/Vanilla/DebuggerTest.php b/tests/Debug/Vanilla/DebuggerTest.php index a43faf2a..6f639221 100644 --- a/tests/Debug/Vanilla/DebuggerTest.php +++ b/tests/Debug/Vanilla/DebuggerTest.php @@ -2,13 +2,13 @@ namespace Rougin\Slytherin\Debug\Vanilla; -use Rougin\Slytherin\Debug\Vanilla\Debugger; use Rougin\Slytherin\System; use Rougin\Slytherin\Testcase; /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class DebuggerTest extends Testcase { diff --git a/tests/Debug/Whoops/DebuggerTest.php b/tests/Debug/Whoops/DebuggerTest.php index 5e4aa2d2..76639b88 100644 --- a/tests/Debug/Whoops/DebuggerTest.php +++ b/tests/Debug/Whoops/DebuggerTest.php @@ -2,14 +2,14 @@ namespace Rougin\Slytherin\Debug\Whoops; -use Rougin\Slytherin\Debug\Whoops\Debugger; use Rougin\Slytherin\System; use Rougin\Slytherin\Testcase; use Whoops\Handler\PrettyPageHandler; /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class DebuggerTest extends Testcase { diff --git a/tests/Dispatching/FastRoute/DispatcherTest.php b/tests/Dispatching/FastRoute/DispatcherTest.php index 07f32b90..684da24f 100644 --- a/tests/Dispatching/FastRoute/DispatcherTest.php +++ b/tests/Dispatching/FastRoute/DispatcherTest.php @@ -9,7 +9,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class DispatcherTest extends Testcase { diff --git a/tests/Dispatching/FastRoute/RouterTest.php b/tests/Dispatching/FastRoute/RouterTest.php index 86ddbd6f..ee0a657a 100644 --- a/tests/Dispatching/FastRoute/RouterTest.php +++ b/tests/Dispatching/FastRoute/RouterTest.php @@ -10,7 +10,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class RouterTest extends Testcase { diff --git a/tests/Dispatching/Phroute/DispatcherTest.php b/tests/Dispatching/Phroute/DispatcherTest.php index d5e99267..16b8c5e5 100644 --- a/tests/Dispatching/Phroute/DispatcherTest.php +++ b/tests/Dispatching/Phroute/DispatcherTest.php @@ -8,7 +8,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class DispatcherTest extends Testcase { @@ -18,7 +19,7 @@ class DispatcherTest extends Testcase protected $dispatcher; /** - * @var array> + * @var array */ protected $routes = array(); diff --git a/tests/Dispatching/Phroute/RouterTest.php b/tests/Dispatching/Phroute/RouterTest.php index b1a12d84..68a94c0e 100644 --- a/tests/Dispatching/Phroute/RouterTest.php +++ b/tests/Dispatching/Phroute/RouterTest.php @@ -8,7 +8,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class RouterTest extends Testcase { diff --git a/tests/Dispatching/Vanilla/DispatcherTest.php b/tests/Dispatching/Vanilla/DispatcherTest.php index e1be70bd..68052ce6 100644 --- a/tests/Dispatching/Vanilla/DispatcherTest.php +++ b/tests/Dispatching/Vanilla/DispatcherTest.php @@ -7,7 +7,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class DispatcherTest extends Testcase { diff --git a/tests/Dispatching/Vanilla/RouterTest.php b/tests/Dispatching/Vanilla/RouterTest.php index 07c9bd4b..99b8afe3 100644 --- a/tests/Dispatching/Vanilla/RouterTest.php +++ b/tests/Dispatching/Vanilla/RouterTest.php @@ -7,7 +7,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class RouterTest extends Testcase { diff --git a/tests/Fixture/Classes/AnotherClass.php b/tests/Fixture/Classes/AnotherClass.php index bc899733..6ba7f4af 100644 --- a/tests/Fixture/Classes/AnotherClass.php +++ b/tests/Fixture/Classes/AnotherClass.php @@ -6,7 +6,8 @@ * Another Class * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class AnotherClass { diff --git a/tests/Fixture/Classes/NewClass.php b/tests/Fixture/Classes/NewClass.php index cc27b8db..ab213da6 100644 --- a/tests/Fixture/Classes/NewClass.php +++ b/tests/Fixture/Classes/NewClass.php @@ -6,7 +6,8 @@ * New Class * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class NewClass { diff --git a/tests/Fixture/Classes/NewInterface.php b/tests/Fixture/Classes/NewInterface.php index b2ffca02..f36fd5d2 100644 --- a/tests/Fixture/Classes/NewInterface.php +++ b/tests/Fixture/Classes/NewInterface.php @@ -6,7 +6,8 @@ * New Interface * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ interface NewInterface { diff --git a/tests/Fixture/Classes/ParameterClass.php b/tests/Fixture/Classes/ParameterClass.php index 229f394a..b8d478ec 100644 --- a/tests/Fixture/Classes/ParameterClass.php +++ b/tests/Fixture/Classes/ParameterClass.php @@ -6,7 +6,8 @@ * Parameter Class * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ParameterClass { diff --git a/tests/Fixture/Classes/WithEmptyConstructor.php b/tests/Fixture/Classes/WithEmptyConstructor.php index b01190d3..30dd9b81 100644 --- a/tests/Fixture/Classes/WithEmptyConstructor.php +++ b/tests/Fixture/Classes/WithEmptyConstructor.php @@ -6,7 +6,8 @@ * With Empty Constructor * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class WithEmptyConstructor { diff --git a/tests/Fixture/Classes/WithInterface.php b/tests/Fixture/Classes/WithInterface.php index 9f9b2e11..23d8d5d9 100644 --- a/tests/Fixture/Classes/WithInterface.php +++ b/tests/Fixture/Classes/WithInterface.php @@ -6,7 +6,8 @@ * With Interface * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class WithInterface implements NewInterface { diff --git a/tests/Fixture/Classes/WithInterfaceParameter.php b/tests/Fixture/Classes/WithInterfaceParameter.php index 0ff97377..89f3fa79 100644 --- a/tests/Fixture/Classes/WithInterfaceParameter.php +++ b/tests/Fixture/Classes/WithInterfaceParameter.php @@ -6,7 +6,8 @@ * With Interface Parameter * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class WithInterfaceParameter { diff --git a/tests/Fixture/Classes/WithMultipleParameters.php b/tests/Fixture/Classes/WithMultipleParameters.php index b990c978..4fe83516 100644 --- a/tests/Fixture/Classes/WithMultipleParameters.php +++ b/tests/Fixture/Classes/WithMultipleParameters.php @@ -6,7 +6,8 @@ * With Multiple Parameters * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class WithMultipleParameters { diff --git a/tests/Fixture/Classes/WithOptionalParameter.php b/tests/Fixture/Classes/WithOptionalParameter.php index db0a1258..0c9bd9e3 100644 --- a/tests/Fixture/Classes/WithOptionalParameter.php +++ b/tests/Fixture/Classes/WithOptionalParameter.php @@ -6,7 +6,8 @@ * With Optional Parameter * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class WithOptionalParameter { diff --git a/tests/Fixture/Classes/WithParameter.php b/tests/Fixture/Classes/WithParameter.php index 59702190..8072eb2e 100644 --- a/tests/Fixture/Classes/WithParameter.php +++ b/tests/Fixture/Classes/WithParameter.php @@ -6,7 +6,8 @@ * With Parameter * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class WithParameter { diff --git a/tests/Fixture/Classes/WithPutHttpMethod.php b/tests/Fixture/Classes/WithPutHttpMethod.php index caab54ea..f8d2cb78 100644 --- a/tests/Fixture/Classes/WithPutHttpMethod.php +++ b/tests/Fixture/Classes/WithPutHttpMethod.php @@ -8,7 +8,8 @@ * With PUT HTTP Method * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class WithPutHttpMethod { diff --git a/tests/Fixture/Classes/WithResponseInterface.php b/tests/Fixture/Classes/WithResponseInterface.php index 03d9815e..1a953c97 100644 --- a/tests/Fixture/Classes/WithResponseInterface.php +++ b/tests/Fixture/Classes/WithResponseInterface.php @@ -8,7 +8,8 @@ * With Response Interface * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class WithResponseInterface { @@ -62,8 +63,9 @@ public function error() /** * Returns a type hinted response. * - * @param \Psr\Http\Message\ResponseInterface $response - * @param integer $code + * @param \Psr\Http\Message\ResponseInterface $response + * @param integer $code + * * @return \Psr\Http\Message\ResponseInterface */ public function typehint(ResponseInterface $response, $code) diff --git a/tests/Fixture/Classes/WithServerRequestInterface.php b/tests/Fixture/Classes/WithServerRequestInterface.php index 4df77f9f..5de7f9ba 100644 --- a/tests/Fixture/Classes/WithServerRequestInterface.php +++ b/tests/Fixture/Classes/WithServerRequestInterface.php @@ -8,7 +8,8 @@ * With Server Request Interface * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class WithServerRequestInterface { diff --git a/tests/Fixture/Components/ContainerComponent.php b/tests/Fixture/Components/ContainerComponent.php index 98fb95e3..3b0c702c 100644 --- a/tests/Fixture/Components/ContainerComponent.php +++ b/tests/Fixture/Components/ContainerComponent.php @@ -9,7 +9,8 @@ * Container Component * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ContainerComponent extends AbstractComponent { diff --git a/tests/Fixture/Components/DebuggerComponent.php b/tests/Fixture/Components/DebuggerComponent.php index cb19cd36..e6a877e0 100644 --- a/tests/Fixture/Components/DebuggerComponent.php +++ b/tests/Fixture/Components/DebuggerComponent.php @@ -9,7 +9,8 @@ * Debugger Component * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class DebuggerComponent extends AbstractComponent { diff --git a/tests/Fixture/Components/DispatcherComponent.php b/tests/Fixture/Components/DispatcherComponent.php index c2fb7d9b..4795c22f 100644 --- a/tests/Fixture/Components/DispatcherComponent.php +++ b/tests/Fixture/Components/DispatcherComponent.php @@ -10,7 +10,8 @@ * Dispatcher Component * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class DispatcherComponent extends AbstractComponent { diff --git a/tests/Fixture/Components/HttpComponent.php b/tests/Fixture/Components/HttpComponent.php index 67e10a2d..4fa44e7e 100644 --- a/tests/Fixture/Components/HttpComponent.php +++ b/tests/Fixture/Components/HttpComponent.php @@ -5,13 +5,13 @@ use Rougin\Slytherin\Component\AbstractComponent; use Rougin\Slytherin\Http\Response; use Rougin\Slytherin\Http\ServerRequest; -use Rougin\Slytherin\System; /** * HTTP Component * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class HttpComponent extends AbstractComponent { diff --git a/tests/Fixture/Components/MiddlewareComponent.php b/tests/Fixture/Components/MiddlewareComponent.php index ff76d110..48983822 100644 --- a/tests/Fixture/Components/MiddlewareComponent.php +++ b/tests/Fixture/Components/MiddlewareComponent.php @@ -9,7 +9,8 @@ * Middleware Component * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class MiddlewareComponent extends AbstractComponent { diff --git a/tests/Fixture/Components/TemplateComponent.php b/tests/Fixture/Components/TemplateComponent.php index 2327bc71..152b251e 100644 --- a/tests/Fixture/Components/TemplateComponent.php +++ b/tests/Fixture/Components/TemplateComponent.php @@ -9,7 +9,8 @@ * Template Component * * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class TemplateComponent extends AbstractComponent { diff --git a/tests/Fixture/Middlewares/FinalMiddleware.php b/tests/Fixture/Middlewares/FinalMiddleware.php index efc938df..da9f3255 100644 --- a/tests/Fixture/Middlewares/FinalMiddleware.php +++ b/tests/Fixture/Middlewares/FinalMiddleware.php @@ -7,14 +7,16 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class FinalMiddleware { /** - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Psr\Http\Message\ResponseInterface $response - * @param callable|null $next + * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ResponseInterface $response + * @param callable|null $next + * * @return \Psr\Http\Message\ResponseInterface */ public function __invoke(ServerRequestInterface $request, ResponseInterface $response, $next = null) diff --git a/tests/Fixture/Middlewares/FirstMiddleware.php b/tests/Fixture/Middlewares/FirstMiddleware.php index 5550d434..fe1b32bf 100644 --- a/tests/Fixture/Middlewares/FirstMiddleware.php +++ b/tests/Fixture/Middlewares/FirstMiddleware.php @@ -7,14 +7,16 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class FirstMiddleware { /** - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Psr\Http\Message\ResponseInterface $response - * @param callable|null $next + * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ResponseInterface $response + * @param callable|null $next + * * @return \Psr\Http\Message\ResponseInterface */ public function __invoke(ServerRequestInterface $request, ResponseInterface $response, $next = null) diff --git a/tests/Fixture/Middlewares/InteropMiddleware.php b/tests/Fixture/Middlewares/InteropMiddleware.php index 8c494302..d75b8017 100644 --- a/tests/Fixture/Middlewares/InteropMiddleware.php +++ b/tests/Fixture/Middlewares/InteropMiddleware.php @@ -8,13 +8,15 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class InteropMiddleware implements MiddlewareInterface { /** - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Interop\Http\ServerMiddleware\DelegateInterface $delegate + * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Interop\Http\ServerMiddleware\DelegateInterface $delegate + * * @return \Psr\Http\Message\ResponseInterface */ public function process(ServerRequestInterface $request, DelegateInterface $delegate) diff --git a/tests/Fixture/Middlewares/LastMiddleware.php b/tests/Fixture/Middlewares/LastMiddleware.php index 6e45d779..f1d80ccb 100644 --- a/tests/Fixture/Middlewares/LastMiddleware.php +++ b/tests/Fixture/Middlewares/LastMiddleware.php @@ -7,14 +7,16 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class LastMiddleware { /** - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Psr\Http\Message\ResponseInterface $response - * @param callable|null $next + * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ResponseInterface $response + * @param callable|null $next + * * @return \Psr\Http\Message\ResponseInterface */ public function __invoke(ServerRequestInterface $request, ResponseInterface $response, $next = null) diff --git a/tests/Fixture/Middlewares/SecondMiddleware.php b/tests/Fixture/Middlewares/SecondMiddleware.php index 91e93f5b..fda4b392 100644 --- a/tests/Fixture/Middlewares/SecondMiddleware.php +++ b/tests/Fixture/Middlewares/SecondMiddleware.php @@ -7,14 +7,16 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class SecondMiddleware { /** - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Psr\Http\Message\ResponseInterface $response - * @param callable|null $next + * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ResponseInterface $response + * @param callable|null $next + * * @return \Psr\Http\Message\ResponseInterface */ public function __invoke(ServerRequestInterface $request, ResponseInterface $response, $next = null) diff --git a/tests/Forward/Builder.php b/tests/Forward/Builder.php index b6a48740..35f82874 100644 --- a/tests/Forward/Builder.php +++ b/tests/Forward/Builder.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Builder { @@ -28,8 +29,9 @@ public function make() } /** - * @param string $method - * @param string $uri + * @param string $method + * @param string $uri + * * @return self */ public function setUrl($method, $uri) diff --git a/tests/Forward/ForwardTest.php b/tests/Forward/ForwardTest.php index 3aae073d..35608867 100644 --- a/tests/Forward/ForwardTest.php +++ b/tests/Forward/ForwardTest.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ForwardTest extends Testcase { diff --git a/tests/Http/MessageTest.php b/tests/Http/MessageTest.php index 1d1a109c..12cb2758 100644 --- a/tests/Http/MessageTest.php +++ b/tests/Http/MessageTest.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class MessageTest extends Testcase { diff --git a/tests/Http/RequestTest.php b/tests/Http/RequestTest.php index 4d3cab72..f14e93d3 100644 --- a/tests/Http/RequestTest.php +++ b/tests/Http/RequestTest.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class RequestTest extends Testcase { diff --git a/tests/Http/ResponseTest.php b/tests/Http/ResponseTest.php index 7751be65..7ca8a34e 100644 --- a/tests/Http/ResponseTest.php +++ b/tests/Http/ResponseTest.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ResponseTest extends Testcase { diff --git a/tests/Http/ServerRequestTest.php b/tests/Http/ServerRequestTest.php index 68082ff7..382011fd 100644 --- a/tests/Http/ServerRequestTest.php +++ b/tests/Http/ServerRequestTest.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ServerRequestTest extends Testcase { diff --git a/tests/Http/StreamTest.php b/tests/Http/StreamTest.php index 7dcc84f6..2053e986 100644 --- a/tests/Http/StreamTest.php +++ b/tests/Http/StreamTest.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class StreamTest extends Testcase { @@ -238,7 +239,8 @@ public function test_writing_the_stream_with_an_error() } /** - * @param string $mode + * @param string $mode + * * @return resource */ protected function newFile($mode = 'w') diff --git a/tests/Http/UploadedFileTest.php b/tests/Http/UploadedFileTest.php index 95a2a65f..662cff6c 100644 --- a/tests/Http/UploadedFileTest.php +++ b/tests/Http/UploadedFileTest.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class UploadedFileTest extends Testcase { diff --git a/tests/Http/UriTest.php b/tests/Http/UriTest.php index 5e467d94..10381d79 100644 --- a/tests/Http/UriTest.php +++ b/tests/Http/UriTest.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class UriTest extends Testcase { diff --git a/tests/Integration/ConfigurationTest.php b/tests/Integration/ConfigurationTest.php index 7786ff6f..3cd8b960 100644 --- a/tests/Integration/ConfigurationTest.php +++ b/tests/Integration/ConfigurationTest.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ConfigurationTest extends Testcase { diff --git a/tests/IoC/Auryn/ContainerTest.php b/tests/IoC/Auryn/ContainerTest.php index 5a3bc886..fa3e2948 100644 --- a/tests/IoC/Auryn/ContainerTest.php +++ b/tests/IoC/Auryn/ContainerTest.php @@ -10,7 +10,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ContainerTest extends Testcase { diff --git a/tests/IoC/League/ContainerTest.php b/tests/IoC/League/ContainerTest.php index 8ae8e40a..87fb0255 100644 --- a/tests/IoC/League/ContainerTest.php +++ b/tests/IoC/League/ContainerTest.php @@ -9,7 +9,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ContainerTest extends Testcase { diff --git a/tests/IoC/Vanilla/ContainerTest.php b/tests/IoC/Vanilla/ContainerTest.php index 1565b46c..dd1192b4 100644 --- a/tests/IoC/Vanilla/ContainerTest.php +++ b/tests/IoC/Vanilla/ContainerTest.php @@ -11,7 +11,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class ContainerTest extends Testcase { diff --git a/tests/Middleware/DispatcherTest.php b/tests/Middleware/DispatcherTest.php index 2a761c6e..ef08b68c 100644 --- a/tests/Middleware/DispatcherTest.php +++ b/tests/Middleware/DispatcherTest.php @@ -4,7 +4,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class DispatcherTest extends DispatcherTestCases { diff --git a/tests/Middleware/DispatcherTestCases.php b/tests/Middleware/DispatcherTestCases.php index f471b37a..6c7e03d1 100644 --- a/tests/Middleware/DispatcherTestCases.php +++ b/tests/Middleware/DispatcherTestCases.php @@ -3,16 +3,15 @@ namespace Rougin\Slytherin\Middleware; use Rougin\Slytherin\Http\ServerRequest; -use Rougin\Slytherin\Middleware\Interop; use Rougin\Slytherin\Middleware\Multiple\Interop05; use Rougin\Slytherin\Middleware\Multiple\Slytherin; -use Rougin\Slytherin\Middleware\Wrapper; use Rougin\Slytherin\System\Lastone; use Rougin\Slytherin\Testcase; /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class DispatcherTestCases extends Testcase { diff --git a/tests/Middleware/Multiple/Interop05.php b/tests/Middleware/Multiple/Interop05.php index 9a9bff77..3866ce7f 100644 --- a/tests/Middleware/Multiple/Interop05.php +++ b/tests/Middleware/Multiple/Interop05.php @@ -8,13 +8,15 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Interop05 implements MiddlewareInterface { /** - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Interop\Http\ServerMiddleware\DelegateInterface $delegate + * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Interop\Http\ServerMiddleware\DelegateInterface $delegate + * * @return \Psr\Http\Message\ResponseInterface */ public function process(ServerRequestInterface $request, DelegateInterface $delegate) diff --git a/tests/Middleware/Multiple/Slytherin.php b/tests/Middleware/Multiple/Slytherin.php index 0c27641a..cd7af0f9 100644 --- a/tests/Middleware/Multiple/Slytherin.php +++ b/tests/Middleware/Multiple/Slytherin.php @@ -8,13 +8,15 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Slytherin implements MiddlewareInterface { /** - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Rougin\Slytherin\Middleware\HandlerInterface $handler + * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Rougin\Slytherin\Middleware\HandlerInterface $handler + * * @return \Psr\Http\Message\ResponseInterface */ public function process(ServerRequestInterface $request, HandlerInterface $handler) diff --git a/tests/Middleware/Stratigility/MiddlewareTest.php b/tests/Middleware/Stratigility/MiddlewareTest.php index 34bedf01..3dc177e1 100644 --- a/tests/Middleware/Stratigility/MiddlewareTest.php +++ b/tests/Middleware/Stratigility/MiddlewareTest.php @@ -4,14 +4,14 @@ use Rougin\Slytherin\Http\Response; use Rougin\Slytherin\Http\ServerRequest; -use Rougin\Slytherin\Middleware\Stratigility\Middleware; use Rougin\Slytherin\System\Lastone; use Rougin\Slytherin\Testcase; use Zend\Stratigility\MiddlewarePipe; /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class MiddlewareTest extends Testcase { diff --git a/tests/Middleware/StratigilityDispatcherTest.php b/tests/Middleware/StratigilityDispatcherTest.php index caf2008d..24664eae 100644 --- a/tests/Middleware/StratigilityDispatcherTest.php +++ b/tests/Middleware/StratigilityDispatcherTest.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class StratigilityDispatcherTest extends DispatcherTestCases { diff --git a/tests/Middleware/Vanilla/MiddlewareTest.php b/tests/Middleware/Vanilla/MiddlewareTest.php index 7a19d8c1..f008a9f2 100644 --- a/tests/Middleware/Vanilla/MiddlewareTest.php +++ b/tests/Middleware/Vanilla/MiddlewareTest.php @@ -4,13 +4,13 @@ use Rougin\Slytherin\Http\Response; use Rougin\Slytherin\Http\ServerRequest; -use Rougin\Slytherin\Middleware\Vanilla\Middleware; use Rougin\Slytherin\System\Lastone; use Rougin\Slytherin\Testcase; /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class MiddlewareTest extends Testcase { diff --git a/tests/Previous/Builder.php b/tests/Previous/Builder.php index 799db1e6..369ad9e2 100644 --- a/tests/Previous/Builder.php +++ b/tests/Previous/Builder.php @@ -18,7 +18,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Builder { @@ -33,8 +34,9 @@ public function __construct() } /** - * @param string $method - * @param string $uri + * @param string $method + * @param string $uri + * * @return \Rougin\Slytherin\Application */ public function make($method = null, $uri = null) @@ -99,8 +101,9 @@ protected function setDebugger() } /** - * @param string $method - * @param string $uri + * @param string $method + * @param string $uri + * * @return self */ protected function setHttp($method = null, $uri = null) diff --git a/tests/Previous/Handlers/Hello.php b/tests/Previous/Handlers/Hello.php index 63dd8220..8f028014 100644 --- a/tests/Previous/Handlers/Hello.php +++ b/tests/Previous/Handlers/Hello.php @@ -4,14 +4,16 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Hello { /** - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Psr\Http\Message\ResponseInterface $response - * @param callable|null $next + * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Psr\Http\Message\ResponseInterface $response + * @param callable|null $next + * * @return \Psr\Http\Message\ResponseInterface */ public function __invoke($request, $response, $next = null) diff --git a/tests/Previous/PreviousTest.php b/tests/Previous/PreviousTest.php index 1d6816c8..8d6d00a5 100644 --- a/tests/Previous/PreviousTest.php +++ b/tests/Previous/PreviousTest.php @@ -2,12 +2,12 @@ namespace Rougin\Slytherin\Previous; -use Rougin\Slytherin\Previous\Builder; use Rougin\Slytherin\Testcase; /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class PreviousTest extends Testcase { diff --git a/tests/Previous/Routes/Hello.php b/tests/Previous/Routes/Hello.php index 23bbd141..1d99cf82 100644 --- a/tests/Previous/Routes/Hello.php +++ b/tests/Previous/Routes/Hello.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Hello { @@ -32,7 +33,8 @@ public function index() } /** - * @param string $name + * @param string $name + * * @return string */ public function hi($name) diff --git a/tests/Routing/DispatcherTest.php b/tests/Routing/DispatcherTest.php index a4d43f02..faf9339c 100644 --- a/tests/Routing/DispatcherTest.php +++ b/tests/Routing/DispatcherTest.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class DispatcherTest extends DispatcherTestCases { diff --git a/tests/Routing/DispatcherTestCases.php b/tests/Routing/DispatcherTestCases.php index f22a36c6..8ec34033 100644 --- a/tests/Routing/DispatcherTestCases.php +++ b/tests/Routing/DispatcherTestCases.php @@ -7,7 +7,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class DispatcherTestCases extends Testcase { @@ -111,7 +112,8 @@ public function test_dispatching_a_route_with_an_invalid_http_method() /** * Verifies the specified dispatcher if it exists. * - * @param string $dispatcher + * @param string $dispatcher + * * @return void */ protected function exists($dispatcher) @@ -140,7 +142,8 @@ protected function exists($dispatcher) /** * Returns a list of sample routes. * - * @param string|null $type + * @param string|null $type + * * @return \Rougin\Slytherin\Routing\RouterInterface */ protected function getRouter($type = null) @@ -181,7 +184,8 @@ protected function getRouter($type = null) /** * Returns result from the dispatched route. * - * @param \Rougin\Slytherin\Routing\RouteInterface $route + * @param \Rougin\Slytherin\Routing\RouteInterface $route + * * @return mixed */ protected function resolve(RouteInterface $route) diff --git a/tests/Routing/FastRouteDispatcherTest.php b/tests/Routing/FastRouteDispatcherTest.php index 29b81ac3..70f538e2 100644 --- a/tests/Routing/FastRouteDispatcherTest.php +++ b/tests/Routing/FastRouteDispatcherTest.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class FastRouteDispatcherTest extends DispatcherTestCases { diff --git a/tests/Routing/FastRouteRouterTest.php b/tests/Routing/FastRouteRouterTest.php index ac859dd0..49a80dcd 100644 --- a/tests/Routing/FastRouteRouterTest.php +++ b/tests/Routing/FastRouteRouterTest.php @@ -4,7 +4,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class FastRouteRouterTest extends RouterTestCases { diff --git a/tests/Routing/PhrouteDispatcherTest.php b/tests/Routing/PhrouteDispatcherTest.php index 06916049..5220d804 100644 --- a/tests/Routing/PhrouteDispatcherTest.php +++ b/tests/Routing/PhrouteDispatcherTest.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class PhrouteDispatcherTest extends DispatcherTestCases { diff --git a/tests/Routing/PhrouteRouterTest.php b/tests/Routing/PhrouteRouterTest.php index 0f6c99ce..a5ef9ea3 100644 --- a/tests/Routing/PhrouteRouterTest.php +++ b/tests/Routing/PhrouteRouterTest.php @@ -4,7 +4,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class PhrouteRouterTest extends RouterTestCases { diff --git a/tests/Routing/RouterTest.php b/tests/Routing/RouterTest.php index 6eb74823..3445bd1b 100644 --- a/tests/Routing/RouterTest.php +++ b/tests/Routing/RouterTest.php @@ -4,7 +4,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class RouterTest extends RouterTestCases { diff --git a/tests/Routing/RouterTestCases.php b/tests/Routing/RouterTestCases.php index 863dbb3b..d199f35e 100644 --- a/tests/Routing/RouterTestCases.php +++ b/tests/Routing/RouterTestCases.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class RouterTestCases extends Testcase { @@ -16,7 +17,7 @@ class RouterTestCases extends Testcase protected $router; /** - * @var array> + * @var array> */ protected $routes = array(array('GET', '/', 'Rougin\Slytherin\Fixture\Classes\NewClass@index')); @@ -263,7 +264,8 @@ public function test_adding_routes_as_argument_to_router() /** * Verifies the specified router if it exists. * - * @param string $router + * @param string $router + * * @return void */ protected function exists($router) diff --git a/tests/Sample/Builder.php b/tests/Sample/Builder.php index 94d6678e..66420f97 100644 --- a/tests/Sample/Builder.php +++ b/tests/Sample/Builder.php @@ -8,7 +8,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Builder { @@ -48,8 +49,9 @@ class Builder protected $server = array(); /** - * @param string $name - * @param string $file + * @param string $name + * @param string $file + * * @return self */ public function addFile($name, $file) @@ -79,7 +81,8 @@ public function addFile($name, $file) } /** - * @param \Rougin\Slytherin\Middleware\MiddlewareInterface|string $handler + * @param \Rougin\Slytherin\Middleware\MiddlewareInterface|string $handler + * * @return self */ public function addHandler($handler) @@ -90,7 +93,8 @@ public function addHandler($handler) } /** - * @param \Rougin\Slytherin\Integration\IntegrationInterface|string $package + * @param \Rougin\Slytherin\Integration\IntegrationInterface|string $package + * * @return self */ public function addPackage($package) @@ -145,7 +149,8 @@ public function make() } /** - * @param array $cookies + * @param array $cookies + * * @return self */ public function setCookies($cookies) @@ -156,7 +161,8 @@ public function setCookies($cookies) } /** - * @param array> $files + * @param array> $files + * * @return self */ public function setFiles($files) @@ -167,7 +173,8 @@ public function setFiles($files) } /** - * @param array $query + * @param array $query + * * @return self */ public function setQuery($query) @@ -178,7 +185,8 @@ public function setQuery($query) } /** - * @param array $parsed + * @param array $parsed + * * @return self */ public function setParsed($parsed) @@ -189,7 +197,8 @@ public function setParsed($parsed) } /** - * @param array $server + * @param array $server + * * @return self */ public function setServer($server) @@ -200,8 +209,9 @@ public function setServer($server) } /** - * @param string $method - * @param string $uri + * @param string $method + * @param string $uri + * * @return self */ public function setUrl($method, $uri) diff --git a/tests/Sample/Depots/EsteDepot.php b/tests/Sample/Depots/EsteDepot.php index 526a5f6f..8bea723b 100644 --- a/tests/Sample/Depots/EsteDepot.php +++ b/tests/Sample/Depots/EsteDepot.php @@ -4,7 +4,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class EsteDepot { @@ -22,7 +23,8 @@ public function __construct(SestDepot $sest) } /** - * @param string $data + * @param string $data + * * @return \Psr\Http\Message\ResponseInterface */ public function text($data) diff --git a/tests/Sample/Depots/SestDepot.php b/tests/Sample/Depots/SestDepot.php index 2599a0f9..f6ec023e 100644 --- a/tests/Sample/Depots/SestDepot.php +++ b/tests/Sample/Depots/SestDepot.php @@ -4,7 +4,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class SestDepot { @@ -22,7 +23,8 @@ public function __construct(TestDepot $test) } /** - * @param string $data + * @param string $data + * * @return \Psr\Http\Message\ResponseInterface */ public function text($data) diff --git a/tests/Sample/Depots/TestDepot.php b/tests/Sample/Depots/TestDepot.php index ff5a8e30..f9d18c0b 100644 --- a/tests/Sample/Depots/TestDepot.php +++ b/tests/Sample/Depots/TestDepot.php @@ -7,7 +7,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class TestDepot { @@ -33,7 +34,8 @@ public function __construct(ServerRequestInterface $request, ResponseInterface $ } /** - * @param string $data + * @param string $data + * * @return \Psr\Http\Message\ResponseInterface */ public function text($data) diff --git a/tests/Sample/Handlers/Cors.php b/tests/Sample/Handlers/Cors.php index f0d934c5..2557fef0 100644 --- a/tests/Sample/Handlers/Cors.php +++ b/tests/Sample/Handlers/Cors.php @@ -9,7 +9,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Cors implements MiddlewareInterface { @@ -49,8 +50,9 @@ public function __construct(array $allowed = null, array $methods = null) } /** - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Rougin\Slytherin\Middleware\HandlerInterface $handler + * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Rougin\Slytherin\Middleware\HandlerInterface $handler + * * @return \Psr\Http\Message\ResponseInterface */ public function process(ServerRequestInterface $request, HandlerInterface $handler) diff --git a/tests/Sample/Handlers/Interop.php b/tests/Sample/Handlers/Interop.php index d468e3c1..ef1bc47b 100644 --- a/tests/Sample/Handlers/Interop.php +++ b/tests/Sample/Handlers/Interop.php @@ -8,13 +8,15 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Interop implements MiddlewareInterface { /** - * @param \Psr\Http\Message\ServerRequestInterface $request - * @param \Interop\Http\ServerMiddleware\DelegateInterface $delegate + * @param \Psr\Http\Message\ServerRequestInterface $request + * @param \Interop\Http\ServerMiddleware\DelegateInterface $delegate + * * @return \Psr\Http\Message\ResponseInterface */ public function process(ServerRequestInterface $request, DelegateInterface $delegate) diff --git a/tests/Sample/Handlers/Parsed/Request.php b/tests/Sample/Handlers/Parsed/Request.php index 734fe9e7..395692d8 100644 --- a/tests/Sample/Handlers/Parsed/Request.php +++ b/tests/Sample/Handlers/Parsed/Request.php @@ -8,7 +8,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Request implements MiddlewareInterface { diff --git a/tests/Sample/Handlers/Parsed/Response.php b/tests/Sample/Handlers/Parsed/Response.php index dd012eb8..f97b9bc8 100644 --- a/tests/Sample/Handlers/Parsed/Response.php +++ b/tests/Sample/Handlers/Parsed/Response.php @@ -8,7 +8,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Response implements MiddlewareInterface { diff --git a/tests/Sample/Packages/HttpPackage.php b/tests/Sample/Packages/HttpPackage.php index 7585c57e..12732991 100644 --- a/tests/Sample/Packages/HttpPackage.php +++ b/tests/Sample/Packages/HttpPackage.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class HttpPackage extends HttpIntegration { diff --git a/tests/Sample/Packages/MiddlewarePackage.php b/tests/Sample/Packages/MiddlewarePackage.php index 525b6397..431a32b1 100644 --- a/tests/Sample/Packages/MiddlewarePackage.php +++ b/tests/Sample/Packages/MiddlewarePackage.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class MiddlewarePackage extends MiddlewareIntegration { diff --git a/tests/Sample/Packages/RoutingPackage.php b/tests/Sample/Packages/RoutingPackage.php index 0c2c40ce..3ede68a6 100644 --- a/tests/Sample/Packages/RoutingPackage.php +++ b/tests/Sample/Packages/RoutingPackage.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class RoutingPackage extends RoutingIntegration { diff --git a/tests/Sample/Packages/SamplePackage.php b/tests/Sample/Packages/SamplePackage.php index 181db5ce..fbbf9c54 100644 --- a/tests/Sample/Packages/SamplePackage.php +++ b/tests/Sample/Packages/SamplePackage.php @@ -10,13 +10,15 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class SamplePackage implements IntegrationInterface { /** - * @param \Rougin\Slytherin\Container\ContainerInterface $container - * @param \Rougin\Slytherin\Integration\Configuration $config + * @param \Rougin\Slytherin\Container\ContainerInterface $container + * @param \Rougin\Slytherin\Integration\Configuration $config + * * @return \Rougin\Slytherin\Container\ContainerInterface */ public function define(ContainerInterface $container, Configuration $config) diff --git a/tests/Sample/Retuor.php b/tests/Sample/Retuor.php index dd6272e5..f97917c3 100644 --- a/tests/Sample/Retuor.php +++ b/tests/Sample/Retuor.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Retuor extends Slytherin { diff --git a/tests/Sample/Router.php b/tests/Sample/Router.php index 0da065fa..13c3545a 100644 --- a/tests/Sample/Router.php +++ b/tests/Sample/Router.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Router extends Slytherin { diff --git a/tests/Sample/Routes/Hello.php b/tests/Sample/Routes/Hello.php index 8fd1362d..8a2fc7cd 100644 --- a/tests/Sample/Routes/Hello.php +++ b/tests/Sample/Routes/Hello.php @@ -8,7 +8,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Hello extends Route { @@ -24,7 +25,8 @@ public function conts() } /** - * @param \Rougin\Slytherin\Sample\Depots\TestDepot $test + * @param \Rougin\Slytherin\Sample\Depots\TestDepot $test + * * @return \Psr\Http\Message\ResponseInterface */ public function index(TestDepot $test) @@ -33,8 +35,9 @@ public function index(TestDepot $test) } /** - * @param string $name - * @param \Rougin\Slytherin\Sample\Depots\TestDepot $test + * @param string $name + * @param \Rougin\Slytherin\Sample\Depots\TestDepot $test + * * @return \Psr\Http\Message\ResponseInterface */ public function name($name, TestDepot $test) diff --git a/tests/Sample/Routes/Home.php b/tests/Sample/Routes/Home.php index 0687495e..15df7d80 100644 --- a/tests/Sample/Routes/Home.php +++ b/tests/Sample/Routes/Home.php @@ -7,7 +7,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Home extends Route { @@ -33,7 +34,8 @@ public function index() } /** - * @param \Rougin\Slytherin\Sample\Depots\EsteDepot $este + * @param \Rougin\Slytherin\Sample\Depots\EsteDepot $este + * * @return \Psr\Http\Message\ResponseInterface */ public function param(EsteDepot $este) diff --git a/tests/Sample/Routes/Route.php b/tests/Sample/Routes/Route.php index d1507e75..7e2f8d9f 100644 --- a/tests/Sample/Routes/Route.php +++ b/tests/Sample/Routes/Route.php @@ -7,7 +7,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class Route { @@ -33,8 +34,9 @@ public function __construct(ServerRequestInterface $request, ResponseInterface $ } /** - * @param mixed $data - * @param integer $code + * @param mixed $data + * @param integer $code + * * @return \Psr\Http\Message\ResponseInterface */ public function json($data, $code = 200) diff --git a/tests/Sample/SampleTest.php b/tests/Sample/SampleTest.php index 2a2304fa..bcb6f1be 100644 --- a/tests/Sample/SampleTest.php +++ b/tests/Sample/SampleTest.php @@ -3,7 +3,6 @@ namespace Rougin\Slytherin\Sample; use Rougin\Slytherin\Middleware\Interop; -use Rougin\Slytherin\Sample\Builder; use Rougin\Slytherin\Sample\Handlers\Cors; use Rougin\Slytherin\Sample\Handlers\Parsed\Request; use Rougin\Slytherin\Sample\Handlers\Parsed\Response; @@ -13,7 +12,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class SampleTest extends Testcase { diff --git a/tests/Template/RendererTest.php b/tests/Template/RendererTest.php index 2b7e96c8..13c1d5ca 100644 --- a/tests/Template/RendererTest.php +++ b/tests/Template/RendererTest.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class RendererTest extends Testcase { diff --git a/tests/Template/Twig/RendererTest.php b/tests/Template/Twig/RendererTest.php index 59678c34..b812fbba 100644 --- a/tests/Template/Twig/RendererTest.php +++ b/tests/Template/Twig/RendererTest.php @@ -8,7 +8,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class RendererTest extends Testcase { diff --git a/tests/Template/Vanilla/RendererTest.php b/tests/Template/Vanilla/RendererTest.php index 56023e22..0022f233 100644 --- a/tests/Template/Vanilla/RendererTest.php +++ b/tests/Template/Vanilla/RendererTest.php @@ -6,7 +6,8 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib */ class RendererTest extends Testcase { diff --git a/tests/Testcase.php b/tests/Testcase.php index 410f61c2..282eeaae 100644 --- a/tests/Testcase.php +++ b/tests/Testcase.php @@ -6,7 +6,9 @@ /** * @package Slytherin - * @author Rougin Gutib + * + * @author Rougin Gutib + * * @codeCoverageIgnore */ class Testcase extends Legacy