Skip to content

Commit c3a96b7

Browse files
TybazethePanz
andauthored
Apply ThePanz Review
Co-authored-by: Emanuele Panzeri <thepanz@gmail.com>
1 parent 7f28027 commit c3a96b7

File tree

6 files changed

+9
-17
lines changed

6 files changed

+9
-17
lines changed

lib/event/sfEvent.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function getReturnValue()
8383
/**
8484
* Sets the processed flag.
8585
*
86-
* @param boolean $processed The processed flag value
86+
* @param bool $processed The processed flag value
8787
*/
8888
public function setProcessed($processed)
8989
{

lib/i18n/sfI18N.class.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -272,16 +272,8 @@ public function getTimestampForCulture($dateTime, $culture = null)
272272
list($hour, $minute) = $this->getTimeForCulture($dateTime, null === $culture ? $this->culture : $culture);
273273

274274
// mktime behavior change with php8
275-
// $hour become not nullable
276-
if (!$hour)
277-
{
278-
$hour = 0;
279-
}
280-
// Before 8.0, $minutes value to null, was casted as (int)0
281-
if (!$minute)
282-
{
283-
$minute = 0;
284-
}
275+
$hour = null !== $hour ? $hour : 0;
276+
$minute = null !== $minute ? $minute : 0;
285277
return null === $day ? null : mktime($hour, $minute, 0, $month, $day, $year);
286278
}
287279

lib/test/sfTestFunctionalBase.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ static public function handlePhpError($errno, $errstr, $errfile, $errline)
478478
/**
479479
* Exception handler for the current test browser instance.
480480
*
481-
* @param Throwable $exception The exception
481+
* @param Throwable|Exception $exception The exception
482482
*/
483483
function handleException($exception)
484484
{

lib/test/sfTesterResponse.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ public function initialize()
4949
}
5050
else
5151
{
52-
if ($this->response->getContent())
52+
if ($content = $this->response->getContent())
5353
{
54-
@$this->dom->loadHTML($this->response->getContent());
54+
@$this->dom->loadHTML($content);
5555
}
5656
}
5757
$this->domCssSelector = new sfDomCssSelector($this->dom);

lib/util/sfBrowserBase.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,9 @@ public function call($uri, $method = 'get', $parameters = array(), $changeStack
363363
}
364364
else
365365
{
366-
if ($response->getContent())
366+
if ($content = $response->getContent())
367367
{
368-
@$this->dom->loadHTML($response->getContent());
368+
@$this->dom->loadHTML($content);
369369
}
370370
}
371371
$this->domCssSelector = new sfDomCssSelector($this->dom);

lib/vendor/lime/lime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ public function handle_error($code, $message, $file, $line, $context = null)
589589
}
590590

591591
/**
592-
* @param Throwable $exception only available on php7
592+
* @param Throwable|Exception $exception
593593
* @return bool
594594
*/
595595
public function handle_exception($exception)

0 commit comments

Comments
 (0)