Skip to content

Commit

Permalink
made phpdoc types consistent with those defined in Hack
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Apr 15, 2014
1 parent 0050507 commit 7d23ebe
Show file tree
Hide file tree
Showing 17 changed files with 49 additions and 49 deletions.
20 changes: 10 additions & 10 deletions BinaryFileResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ class BinaryFileResponse extends Response
* Constructor.
*
* @param \SplFileInfo|string $file The file to stream
* @param integer $status The response status code
* @param int $status The response status code
* @param array $headers An array of response headers
* @param boolean $public Files are public by default
* @param bool $public Files are public by default
* @param null|string $contentDisposition The type of Content-Disposition to set automatically with the filename
* @param boolean $autoEtag Whether the ETag header should be automatically set
* @param boolean $autoLastModified Whether the Last-Modified header should be automatically set
* @param bool $autoEtag Whether the ETag header should be automatically set
* @param bool $autoLastModified Whether the Last-Modified header should be automatically set
*/
public function __construct($file, $status = 200, $headers = array(), $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true)
{
Expand All @@ -55,12 +55,12 @@ public function __construct($file, $status = 200, $headers = array(), $public =

/**
* @param \SplFileInfo|string $file The file to stream
* @param integer $status The response status code
* @param int $status The response status code
* @param array $headers An array of response headers
* @param boolean $public Files are public by default
* @param bool $public Files are public by default
* @param null|string $contentDisposition The type of Content-Disposition to set automatically with the filename
* @param boolean $autoEtag Whether the ETag header should be automatically set
* @param boolean $autoLastModified Whether the Last-Modified header should be automatically set
* @param bool $autoEtag Whether the ETag header should be automatically set
* @param bool $autoLastModified Whether the Last-Modified header should be automatically set
*/
public static function create($file = null, $status = 200, $headers = array(), $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true)
{
Expand All @@ -72,8 +72,8 @@ public static function create($file = null, $status = 200, $headers = array(), $
*
* @param \SplFileInfo|string $file The file to stream
* @param string $contentDisposition
* @param Boolean $autoEtag
* @param Boolean $autoLastModified
* @param bool $autoEtag
* @param bool $autoLastModified
*
* @return BinaryFileResponse
*
Expand Down
6 changes: 3 additions & 3 deletions Cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ class Cookie
*
* @param string $name The name of the cookie
* @param string $value The value of the cookie
* @param integer|string|\DateTime $expire The time the cookie expires
* @param int |string|\DateTime $expire The time the cookie expires
* @param string $path The path on the server in which the cookie will be available on
* @param string $domain The domain that the cookie is available to
* @param Boolean $secure Whether the cookie should only be transmitted over a secure HTTPS connection from the client
* @param Boolean $httpOnly Whether the cookie will be made accessible only through the HTTP protocol
* @param bool $secure Whether the cookie should only be transmitted over a secure HTTPS connection from the client
* @param bool $httpOnly Whether the cookie will be made accessible only through the HTTP protocol
*
* @throws \InvalidArgumentException
*
Expand Down
2 changes: 1 addition & 1 deletion File/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class File extends \SplFileInfo
* Constructs a new file from the given path.
*
* @param string $path The path to the file
* @param Boolean $checkPath Whether to check the path or not
* @param bool $checkPath Whether to check the path or not
*
* @throws FileNotFoundException If the given path is not a file
*
Expand Down
6 changes: 3 additions & 3 deletions File/UploadedFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ class UploadedFile extends File
* @param string $path The full temporary path to the file
* @param string $originalName The original file name
* @param string $mimeType The type of the file as provided by PHP
* @param integer $size The file size
* @param integer $error The error constant of the upload (one of PHP's UPLOAD_ERR_XXX constants)
* @param Boolean $test Whether the test mode is active
* @param int $size The file size
* @param int $error The error constant of the upload (one of PHP's UPLOAD_ERR_XXX constants)
* @param bool $test Whether the test mode is active
*
* @throws FileException If file_uploads is disabled
* @throws FileNotFoundException If the file does not exist
Expand Down
4 changes: 2 additions & 2 deletions HeaderBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function add(array $headers)
*
* @param string $key The header name
* @param mixed $default The default value
* @param Boolean $first Whether to return the first value or all header values
* @param bool $first Whether to return the first value or all header values
*
* @return string|array The first header value if $first is true, an array of values otherwise
*
Expand Down Expand Up @@ -149,7 +149,7 @@ public function get($key, $default = null, $first = true)
*
* @param string $key The key
* @param string|array $values The value or an array of values
* @param Boolean $replace Whether to replace the actual value or not (true by default)
* @param bool $replace Whether to replace the actual value or not (true by default)
*
* @api
*/
Expand Down
2 changes: 1 addition & 1 deletion JsonResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class JsonResponse extends Response
* Constructor.
*
* @param mixed $data The response data
* @param integer $status The response status code
* @param int $status The response status code
* @param array $headers An array of response headers
*/
public function __construct($data = null, $status = 200, $headers = array())
Expand Down
14 changes: 7 additions & 7 deletions ParameterBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function add(array $parameters = array())
*
* @param string $path The key
* @param mixed $default The default value if the parameter key does not exist
* @param boolean $deep If true, a path like foo[bar] will find deeper items
* @param bool $deep If true, a path like foo[bar] will find deeper items
*
* @return mixed
*
Expand Down Expand Up @@ -193,7 +193,7 @@ public function remove($key)
*
* @param string $key The parameter key
* @param mixed $default The default value if the parameter key does not exist
* @param boolean $deep If true, a path like foo[bar] will find deeper items
* @param bool $deep If true, a path like foo[bar] will find deeper items
*
* @return string The filtered value
*
Expand All @@ -209,7 +209,7 @@ public function getAlpha($key, $default = '', $deep = false)
*
* @param string $key The parameter key
* @param mixed $default The default value if the parameter key does not exist
* @param boolean $deep If true, a path like foo[bar] will find deeper items
* @param bool $deep If true, a path like foo[bar] will find deeper items
*
* @return string The filtered value
*
Expand All @@ -225,7 +225,7 @@ public function getAlnum($key, $default = '', $deep = false)
*
* @param string $key The parameter key
* @param mixed $default The default value if the parameter key does not exist
* @param boolean $deep If true, a path like foo[bar] will find deeper items
* @param bool $deep If true, a path like foo[bar] will find deeper items
*
* @return string The filtered value
*
Expand All @@ -242,7 +242,7 @@ public function getDigits($key, $default = '', $deep = false)
*
* @param string $key The parameter key
* @param mixed $default The default value if the parameter key does not exist
* @param boolean $deep If true, a path like foo[bar] will find deeper items
* @param bool $deep If true, a path like foo[bar] will find deeper items
*
* @return integer The filtered value
*
Expand All @@ -258,8 +258,8 @@ public function getInt($key, $default = 0, $deep = false)
*
* @param string $key Key.
* @param mixed $default Default = null.
* @param boolean $deep Default = false.
* @param integer $filter FILTER_* constant.
* @param bool $deep Default = false.
* @param int $filter FILTER_* constant.
* @param mixed $options Filter options.
*
* @see http://php.net/manual/en/function.filter-var.php
Expand Down
2 changes: 1 addition & 1 deletion RedirectResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class RedirectResponse extends Response
* Creates a redirect response so that it conforms to the rules defined for a redirect status code.
*
* @param string $url The URL to redirect to
* @param integer $status The status code (302 by default)
* @param int $status The status code (302 by default)
* @param array $headers The headers (Location is always set to the given URL)
*
* @throws \InvalidArgumentException
Expand Down
4 changes: 2 additions & 2 deletions Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ public static function getHttpMethodParameterOverride()
*
* @param string $key the key
* @param mixed $default the default value
* @param Boolean $deep is parameter deep in multidimensional array
* @param bool $deep is parameter deep in multidimensional array
*
* @return mixed
*/
Expand Down Expand Up @@ -1398,7 +1398,7 @@ public function isMethodSafe()
/**
* Returns the request body content.
*
* @param Boolean $asResource If true, a resource will be returned
* @param bool $asResource If true, a resource will be returned
*
* @return string|resource The request body content or a resource to read the body stream.
*
Expand Down
2 changes: 1 addition & 1 deletion Resources/stubs/SessionHandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function destroy($sessionId);
*
* @see http://php.net/sessionhandlerinterface.gc
*
* @param integer $lifetime Max lifetime in seconds to keep sessions stored.
* @param int $lifetime Max lifetime in seconds to keep sessions stored.
*
* @throws \RuntimeException On fatal error.
*
Expand Down
18 changes: 9 additions & 9 deletions Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class Response
* Constructor.
*
* @param string $content The response content
* @param integer $status The response status code
* @param int $status The response status code
* @param array $headers An array of response headers
*
* @throws \InvalidArgumentException When the HTTP status code is not valid
Expand All @@ -155,7 +155,7 @@ public function __construct($content = '', $status = 200, $headers = array())
* ->setSharedMaxAge(300);
*
* @param string $content The response content
* @param integer $status The response status code
* @param int $status The response status code
* @param array $headers An array of response headers
*
* @return Response
Expand Down Expand Up @@ -406,7 +406,7 @@ public function getProtocolVersion()
/**
* Sets the response status code.
*
* @param integer $code HTTP status code
* @param int $code HTTP status code
* @param mixed $text HTTP status text
*
* If the status text is null it will be automatically populated for the known
Expand Down Expand Up @@ -723,7 +723,7 @@ public function getMaxAge()
*
* This methods sets the Cache-Control max-age directive.
*
* @param integer $value Number of seconds
* @param int $value Number of seconds
*
* @return Response
*
Expand All @@ -741,7 +741,7 @@ public function setMaxAge($value)
*
* This methods sets the Cache-Control s-maxage directive.
*
* @param integer $value Number of seconds
* @param int $value Number of seconds
*
* @return Response
*
Expand Down Expand Up @@ -781,7 +781,7 @@ public function getTtl()
*
* This method adjusts the Cache-Control/s-maxage directive.
*
* @param integer $seconds Number of seconds
* @param int $seconds Number of seconds
*
* @return Response
*
Expand All @@ -799,7 +799,7 @@ public function setTtl($seconds)
*
* This method adjusts the Cache-Control/max-age directive.
*
* @param integer $seconds Number of seconds
* @param int $seconds Number of seconds
*
* @return Response
*
Expand Down Expand Up @@ -866,7 +866,7 @@ public function getEtag()
* Sets the ETag value.
*
* @param string|null $etag The ETag unique identifier or null to remove the header
* @param Boolean $weak Whether you want a weak ETag or not
* @param bool $weak Whether you want a weak ETag or not
*
* @return Response
*
Expand Down Expand Up @@ -1003,7 +1003,7 @@ public function getVary()
* Sets the Vary header.
*
* @param string|array $headers
* @param Boolean $replace Whether to replace the actual value of not (true by default)
* @param bool $replace Whether to replace the actual value of not (true by default)
*
* @return Response
*
Expand Down
2 changes: 1 addition & 1 deletion Session/Attribute/NamespacedAttributeBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function remove($name)
* This method allows structured namespacing of session attributes.
*
* @param string $name Key name
* @param boolean $writeContext Write context, default false
* @param bool $writeContext Write context, default false
*
* @return array
*/
Expand Down
6 changes: 3 additions & 3 deletions Session/SessionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function setName($name);
* Clears all session attributes and flashes and regenerates the
* session and deletes the old session from persistence.
*
* @param integer $lifetime Sets the cookie lifetime for the session cookie. A null value
* @param int $lifetime Sets the cookie lifetime for the session cookie. A null value
* will leave the system settings unchanged, 0 sets the cookie
* to expire with browser session. Time is in seconds, and is
* not a Unix timestamp.
Expand All @@ -88,8 +88,8 @@ public function invalidate($lifetime = null);
* Migrates the current session to a new session id while maintaining all
* session attributes.
*
* @param Boolean $destroy Whether to delete the old session or leave it to garbage collection.
* @param integer $lifetime Sets the cookie lifetime for the session cookie. A null value
* @param bool $destroy Whether to delete the old session or leave it to garbage collection.
* @param int $lifetime Sets the cookie lifetime for the session cookie. A null value
* will leave the system settings unchanged, 0 sets the cookie
* to expire with browser session. Time is in seconds, and is
* not a Unix timestamp.
Expand Down
2 changes: 1 addition & 1 deletion Session/Storage/MetadataBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function getLifetime()
/**
* Stamps a new session's metadata.
*
* @param integer $lifetime Sets the cookie lifetime for the session cookie. A null value
* @param int $lifetime Sets the cookie lifetime for the session cookie. A null value
* will leave the system settings unchanged, 0 sets the cookie
* to expire with browser session. Time is in seconds, and is
* not a Unix timestamp.
Expand Down
2 changes: 1 addition & 1 deletion Session/Storage/Proxy/AbstractProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function isActive()
*
* @internal
*
* @param Boolean $flag
* @param bool $flag
*
* @throws \LogicException
*/
Expand Down
4 changes: 2 additions & 2 deletions Session/Storage/SessionStorageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public function setName($name);
* Note regenerate+destroy should not clear the session data in memory
* only delete the session data from persistent storage.
*
* @param Boolean $destroy Destroy session when regenerating?
* @param integer $lifetime Sets the cookie lifetime for the session cookie. A null value
* @param bool $destroy Destroy session when regenerating?
* @param int $lifetime Sets the cookie lifetime for the session cookie. A null value
* will leave the system settings unchanged, 0 sets the cookie
* to expire with browser session. Time is in seconds, and is
* not a Unix timestamp.
Expand Down
2 changes: 1 addition & 1 deletion StreamedResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class StreamedResponse extends Response
* Constructor.
*
* @param mixed $callback A valid PHP callback
* @param integer $status The response status code
* @param int $status The response status code
* @param array $headers An array of response headers
*
* @api
Expand Down

0 comments on commit 7d23ebe

Please sign in to comment.