Skip to content

Commit 60ea4e7

Browse files
committed
minor #10701 Made types used by Symfony compatible with the ones of Hack (fabpot)
This PR was merged into the 2.3 branch. Discussion ---------- Made types used by Symfony compatible with the ones of Hack | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a PHP supports several ways to express types: like Boolean/bool or integer/int. Hack only supports one of them, so this PR proposes to use the Hack type to make Symfony a bit more "compatible" with Hack (gradual upgrade ;)). Commits ------- 3c9c10f made phpdoc types consistent with those defined in Hack 0555b7f made types consistent with those defined in Hack
2 parents f62071b + 2ddb853 commit 60ea4e7

31 files changed

+76
-76
lines changed

Debug/TraceableEventDispatcher.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ private function getListenerInfo($listener, $eventId, $eventName)
324324
* Updates the stopwatch data in the profile hierarchy.
325325
*
326326
* @param string $token Profile token
327-
* @param Boolean $updateChildren Whether to update the children altogether
327+
* @param bool $updateChildren Whether to update the children altogether
328328
*/
329329
private function updateProfiles($token, $updateChildren)
330330
{
@@ -339,7 +339,7 @@ private function updateProfiles($token, $updateChildren)
339339
* Update the profiles with the timing and events information and saves them.
340340
*
341341
* @param Profile $profile The root profile
342-
* @param Boolean $updateChildren Whether to update the children altogether
342+
* @param bool $updateChildren Whether to update the children altogether
343343
*/
344344
private function saveInfoInProfile(Profile $profile, $updateChildren)
345345
{

EventListener/ExceptionListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public static function getSubscribedEvents()
9393
*
9494
* @param \Exception $exception The original \Exception instance
9595
* @param string $message The error message to log
96-
* @param Boolean $original False when the handling of the exception thrown another exception
96+
* @param bool $original False when the handling of the exception thrown another exception
9797
*/
9898
protected function logException(\Exception $exception, $message, $original = true)
9999
{

EventListener/ProfilerListener.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ class ProfilerListener implements EventSubscriberInterface
4242
*
4343
* @param Profiler $profiler A Profiler instance
4444
* @param RequestMatcherInterface $matcher A RequestMatcher instance
45-
* @param Boolean $onlyException true if the profiler only collects data when an exception occurs, false otherwise
46-
* @param Boolean $onlyMasterRequests true if the profiler only collects data when the request is a master request, false otherwise
45+
* @param bool $onlyException true if the profiler only collects data when an exception occurs, false otherwise
46+
* @param bool $onlyMasterRequests true if the profiler only collects data when the request is a master request, false otherwise
4747
*/
4848
public function __construct(Profiler $profiler, RequestMatcherInterface $matcher = null, $onlyException = false, $onlyMasterRequests = false)
4949
{
5050
$this->profiler = $profiler;
5151
$this->matcher = $matcher;
52-
$this->onlyException = (Boolean) $onlyException;
53-
$this->onlyMasterRequests = (Boolean) $onlyMasterRequests;
52+
$this->onlyException = (bool) $onlyException;
53+
$this->onlyMasterRequests = (bool) $onlyMasterRequests;
5454
$this->children = new \SplObjectStorage();
5555
$this->profiles = array();
5656
}

Exception/AccessDeniedHttpException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class AccessDeniedHttpException extends HttpException
2424
*
2525
* @param string $message The internal exception message
2626
* @param \Exception $previous The previous exception
27-
* @param integer $code The internal exception code
27+
* @param int $code The internal exception code
2828
*/
2929
public function __construct($message = null, \Exception $previous = null, $code = 0)
3030
{

Exception/BadRequestHttpException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class BadRequestHttpException extends HttpException
2323
*
2424
* @param string $message The internal exception message
2525
* @param \Exception $previous The previous exception
26-
* @param integer $code The internal exception code
26+
* @param int $code The internal exception code
2727
*/
2828
public function __construct($message = null, \Exception $previous = null, $code = 0)
2929
{

Exception/ConflictHttpException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ConflictHttpException extends HttpException
2323
*
2424
* @param string $message The internal exception message
2525
* @param \Exception $previous The previous exception
26-
* @param integer $code The internal exception code
26+
* @param int $code The internal exception code
2727
*/
2828
public function __construct($message = null, \Exception $previous = null, $code = 0)
2929
{

Exception/GoneHttpException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class GoneHttpException extends HttpException
2323
*
2424
* @param string $message The internal exception message
2525
* @param \Exception $previous The previous exception
26-
* @param integer $code The internal exception code
26+
* @param int $code The internal exception code
2727
*/
2828
public function __construct($message = null, \Exception $previous = null, $code = 0)
2929
{

Exception/LengthRequiredHttpException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class LengthRequiredHttpException extends HttpException
2323
*
2424
* @param string $message The internal exception message
2525
* @param \Exception $previous The previous exception
26-
* @param integer $code The internal exception code
26+
* @param int $code The internal exception code
2727
*/
2828
public function __construct($message = null, \Exception $previous = null, $code = 0)
2929
{

Exception/MethodNotAllowedHttpException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class MethodNotAllowedHttpException extends HttpException
2424
* @param array $allow An array of allowed methods
2525
* @param string $message The internal exception message
2626
* @param \Exception $previous The previous exception
27-
* @param integer $code The internal exception code
27+
* @param int $code The internal exception code
2828
*/
2929
public function __construct(array $allow, $message = null, \Exception $previous = null, $code = 0)
3030
{

Exception/NotAcceptableHttpException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class NotAcceptableHttpException extends HttpException
2323
*
2424
* @param string $message The internal exception message
2525
* @param \Exception $previous The previous exception
26-
* @param integer $code The internal exception code
26+
* @param int $code The internal exception code
2727
*/
2828
public function __construct($message = null, \Exception $previous = null, $code = 0)
2929
{

0 commit comments

Comments
 (0)