Skip to content

Commit 87075c6

Browse files
committed
cs-fixer
1 parent d1af033 commit 87075c6

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/DateTime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ private function compile(string $date, string $format, string $timezone = 'null'
2424
PHP;
2525
}
2626

27-
private function evaluate(array $context, string $date, string $format, string $timezone = null)
27+
private function evaluate(array $context, string $date, string $format, ?string $timezone = null)
2828
{
2929
return \DateTimeImmutable::createFromFormat($format, $date, null !== $timezone ? new \DateTimeZone($timezone) : null);
3030
}

src/Now.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ public function __construct($name)
1717
);
1818
}
1919

20-
private function compile(string $timezone = null): string
20+
private function compile(?string $timezone = null): string
2121
{
2222
return <<<PHP
2323
(new \\DateTime('now', {$timezone} !== null ? new \\DateTimeZone({$timezone}) : null))
2424
PHP;
2525
}
2626

27-
private function evaluate(array $context, string $timezone = null)
27+
private function evaluate(array $context, ?string $timezone = null)
2828
{
2929
return new \DateTime('now', null !== $timezone ? new \DateTimeZone($timezone) : null);
3030
}

src/TestPattern.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Kiboko\Component\StringExpressionLanguage;
46

57
class TestPattern
@@ -30,8 +32,8 @@ private function evaluate(array $context, string $pattern, string $subject): boo
3032
$result = preg_match($pattern, $subject);
3133
if (!$result) {
3234
return false;
33-
} else {
34-
return true;
3535
}
36+
37+
return true;
3638
}
3739
}

0 commit comments

Comments
 (0)