Skip to content

Commit 97738f7

Browse files
committed
Add missing type hints
1 parent c9ca9b3 commit 97738f7

10 files changed

+8
-18
lines changed

psalm-baseline.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="4.3.1@2feba22a005a18bf31d4c7b9bdb9252c73897476">
2+
<files psalm-version="4.13.1@5cf660f63b548ccd4a56f62d916ee4d6028e01a3">
33
<file src="src/PhpSyntaxExtension.php">
44
<InternalClass occurrences="4">
55
<code>ExpressionParser::OPERATOR_LEFT</code>

src/Operator/NotSameAsBinary.php

-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77

88
class NotSameAsBinary extends AbstractBinary
99
{
10-
public function compile(Compiler $compiler): void
11-
{
12-
parent::compile($compiler);
13-
}
14-
1510
public function operator(Compiler $compiler): Compiler
1611
{
1712
return $compiler->raw('!==');

src/Operator/SameAsBinary.php

-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77

88
class SameAsBinary extends AbstractBinary
99
{
10-
public function compile(Compiler $compiler): void
11-
{
12-
parent::compile($compiler);
13-
}
14-
1510
public function operator(Compiler $compiler): Compiler
1611
{
1712
return $compiler->raw('===');

src/PhpSyntaxExtension.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function getTokenParsers(): array
3535
];
3636
}
3737

38-
public function getFilters()
38+
public function getFilters(): array
3939
{
4040
return [
4141
new TwigFilter('strtotime', function (string $time, ?int $now = null): int {

src/TokenParser/BreakNode.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct(int $loopNumber, int $lineno, string $tag)
1919
$this->loopNumber = $loopNumber;
2020
}
2121

22-
public function compile(Compiler $compiler)
22+
public function compile(Compiler $compiler): void
2323
{
2424
$compiler
2525
->addDebugInfo($this)

src/TokenParser/BreakTokenParser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class BreakTokenParser extends BreakOrContinueTokenParser
66
{
7-
public function getTag()
7+
public function getTag(): string
88
{
99
return 'break';
1010
}

src/TokenParser/ContinueNode.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct(int $loopNumber, int $lineno, string $tag)
1919
$this->loopNumber = $loopNumber;
2020
}
2121

22-
public function compile(Compiler $compiler)
22+
public function compile(Compiler $compiler): void
2323
{
2424
$compiler
2525
->addDebugInfo($this)

src/TokenParser/ContinueTokenParser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class ContinueTokenParser extends BreakOrContinueTokenParser
66
{
7-
public function getTag()
7+
public function getTag(): string
88
{
99
return 'continue';
1010
}

vendor-bin/phpcs/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
33
"squizlabs/php_codesniffer": "^3.5",
4-
"slevomat/coding-standard": "^6.0"
4+
"slevomat/coding-standard": "^7.0"
55
}
66
}

vendor-bin/phpstan/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"require": {
3-
"phpstan/phpstan": "^0.12"
3+
"phpstan/phpstan": "^1.0"
44
}
55
}

0 commit comments

Comments
 (0)