Skip to content

Commit

Permalink
Fix cs
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Sep 13, 2022
1 parent 32aedba commit fec5c8a
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -2,6 +2,7 @@

namespace Psalm\Internal\Provider\ReturnTypeProvider;

use DateTime;
use Psalm\Internal\Analyzer\StatementsAnalyzer;
use Psalm\Plugin\EventHandler\Event\MethodReturnTypeProviderEvent;
use Psalm\Plugin\EventHandler\MethodReturnTypeProviderInterface;
Expand All @@ -21,8 +22,7 @@ public static function getMethodReturnType(MethodReturnTypeProviderEvent $event)
$statements_source = $event->getSource();
$call_args = $event->getCallArgs();
$method_name_lowercase = $event->getMethodNameLowercase();
if (
!$statements_source instanceof StatementsAnalyzer
if (!$statements_source instanceof StatementsAnalyzer
|| $method_name_lowercase !== 'modify'
|| !isset($call_args[0])
) {
Expand All @@ -42,7 +42,7 @@ public static function getMethodReturnType(MethodReturnTypeProviderEvent $event)
return null;
}

if (@(new \DateTime())->modify($type_part->value) === false) {
if (@(new DateTime())->modify($type_part->value) === false) {
$has_false = true;
} else {
$has_date_time = true;
Expand Down

0 comments on commit fec5c8a

Please sign in to comment.