Skip to content

Commit

Permalink
Fix up doc block annotations for optional null input.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Aug 24, 2016
1 parent be2f7f1 commit 8a3b47f
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/Controller/Component/SecurityComponent.php
Expand Up @@ -184,7 +184,7 @@ public function requireAuth($actions)
*
* @param \Cake\Controller\Controller $controller Instantiating controller
* @param string $error Error method
* @param \Cake\Controller\Exception\SecurityException $exception Additional debug info describing the cause
* @param \Cake\Controller\Exception\SecurityException|null $exception Additional debug info describing the cause
* @return mixed If specified, controller blackHoleCallback's response, or no return otherwise
* @see \Cake\Controller\Component\SecurityComponent::$blackHoleCallback
* @link http://book.cakephp.org/3.0/en/controllers/components/security.html#handling-blackhole-callbacks
Expand All @@ -202,7 +202,7 @@ public function blackHole(Controller $controller, $error = '', SecurityException
/**
* Check debug status and throw an Exception based on the existing one
*
* @param \Cake\Controller\Exception\SecurityException $exception Additional debug info describing the cause
* @param \Cake\Controller\Exception\SecurityException|null $exception Additional debug info describing the cause
* @throws \Cake\Network\Exception\BadRequestException
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Exception/SecurityException.php
Expand Up @@ -56,7 +56,7 @@ public function setMessage($message)
/**
* Set Reason
*
* @param string $reason Reason details
* @param string|null $reason Reason details
* @return void
*/
public function setReason($reason = null)
Expand Down
2 changes: 1 addition & 1 deletion src/Error/Middleware/ErrorHandlerMiddleware.php
Expand Up @@ -30,7 +30,7 @@ class ErrorHandlerMiddleware
/**
* Constructor
*
* @param string|callable $renderer The renderer or class name
* @param string|callable|null $renderer The renderer or class name
* to use or a callable factory.
*/
public function __construct($renderer = null)
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Client/Request.php
Expand Up @@ -38,7 +38,7 @@ class Request extends Message implements RequestInterface
* @param string $url The request URL
* @param string $method The HTTP method to use.
* @param array $headers The HTTP headers to set.
* @param array|string $data The request body to use.
* @param array|string|null $data The request body to use.
*/
public function __construct($url = '', $method = self::METHOD_GET, array $headers = [], $data = null)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Http/Server.php
Expand Up @@ -62,8 +62,8 @@ public function __construct(BaseApplication $app)
* from event listeners.
* - Run the middleware queue including the application.
*
* @param \Psr\Http\Message\ServerRequestInterface $request The request to use or null.
* @param \Psr\Http\Message\ResponseInterface $response The response to use or null.
* @param \Psr\Http\Message\ServerRequestInterface|null $request The request to use or null.
* @param \Psr\Http\Message\ResponseInterface|null $response The response to use or null.
* @return \Psr\Http\Message\ResponseInterface
* @throws \RuntimeException When the application does not make a response.
*/
Expand Down Expand Up @@ -95,7 +95,7 @@ public function run(ServerRequestInterface $request = null, ResponseInterface $r
* Emit the response using the PHP SAPI.
*
* @param \Psr\Http\Message\ResponseInterface $response The response to emit
* @param \Zend\Diactoros\Response\EmitterInterface $emitter The emitter to use.
* @param \Zend\Diactoros\Response\EmitterInterface|null $emitter The emitter to use.
* When null, a SAPI Stream Emitter will be used.
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion src/TestSuite/MiddlewareDispatcher.php
Expand Up @@ -56,7 +56,7 @@ class MiddlewareDispatcher
* Constructor
*
* @param \Cake\TestSuite\IntegrationTestCase $test The test case to run.
* @param string $class The application class name. Defaults to App\Application.
* @param string|null $class The application class name. Defaults to App\Application.
* @param array|null $constructorArgs The constructor arguments for your application class.
* Defaults to `['./config']`
*/
Expand Down
4 changes: 2 additions & 2 deletions src/TestSuite/TestCase.php
Expand Up @@ -146,7 +146,7 @@ public function loadFixtures()
* Asserts that a global event was fired. You must track events in your event manager for this assertion to work
*
* @param string $name Event name
* @param EventManager $eventManager Event manager to check, defaults to global event manager
* @param EventManager|null $eventManager Event manager to check, defaults to global event manager
* @param string $message Assertion failure message
* @return void
*/
Expand All @@ -166,7 +166,7 @@ public function assertEventFired($name, $eventManager = null, $message = '')
* @param string $name Event name
* @param string $dataKey Data key
* @param string $dataValue Data value
* @param EventManager $eventManager Event manager to check, defaults to global event manager
* @param EventManager|null $eventManager Event manager to check, defaults to global event manager
* @param string $message Assertion failure message
* @return void
*/
Expand Down

0 comments on commit 8a3b47f

Please sign in to comment.