Skip to content

Commit

Permalink
Add missing type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
iquito committed Nov 29, 2021
1 parent c9ca9b3 commit 97738f7
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 18 deletions.
2 changes: 1 addition & 1 deletion psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.3.1@2feba22a005a18bf31d4c7b9bdb9252c73897476">
<files psalm-version="4.13.1@5cf660f63b548ccd4a56f62d916ee4d6028e01a3">
<file src="src/PhpSyntaxExtension.php">
<InternalClass occurrences="4">
<code>ExpressionParser::OPERATOR_LEFT</code>
Expand Down
5 changes: 0 additions & 5 deletions src/Operator/NotSameAsBinary.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@

class NotSameAsBinary extends AbstractBinary
{
public function compile(Compiler $compiler): void
{
parent::compile($compiler);
}

public function operator(Compiler $compiler): Compiler
{
return $compiler->raw('!==');
Expand Down
5 changes: 0 additions & 5 deletions src/Operator/SameAsBinary.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@

class SameAsBinary extends AbstractBinary
{
public function compile(Compiler $compiler): void
{
parent::compile($compiler);
}

public function operator(Compiler $compiler): Compiler
{
return $compiler->raw('===');
Expand Down
2 changes: 1 addition & 1 deletion src/PhpSyntaxExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function getTokenParsers(): array
];
}

public function getFilters()
public function getFilters(): array
{
return [
new TwigFilter('strtotime', function (string $time, ?int $now = null): int {
Expand Down
2 changes: 1 addition & 1 deletion src/TokenParser/BreakNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function __construct(int $loopNumber, int $lineno, string $tag)
$this->loopNumber = $loopNumber;
}

public function compile(Compiler $compiler)
public function compile(Compiler $compiler): void
{
$compiler
->addDebugInfo($this)
Expand Down
2 changes: 1 addition & 1 deletion src/TokenParser/BreakTokenParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class BreakTokenParser extends BreakOrContinueTokenParser
{
public function getTag()
public function getTag(): string
{
return 'break';
}
Expand Down
2 changes: 1 addition & 1 deletion src/TokenParser/ContinueNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function __construct(int $loopNumber, int $lineno, string $tag)
$this->loopNumber = $loopNumber;
}

public function compile(Compiler $compiler)
public function compile(Compiler $compiler): void
{
$compiler
->addDebugInfo($this)
Expand Down
2 changes: 1 addition & 1 deletion src/TokenParser/ContinueTokenParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class ContinueTokenParser extends BreakOrContinueTokenParser
{
public function getTag()
public function getTag(): string
{
return 'continue';
}
Expand Down
2 changes: 1 addition & 1 deletion vendor-bin/phpcs/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": {
"squizlabs/php_codesniffer": "^3.5",
"slevomat/coding-standard": "^6.0"
"slevomat/coding-standard": "^7.0"
}
}
2 changes: 1 addition & 1 deletion vendor-bin/phpstan/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"require": {
"phpstan/phpstan": "^0.12"
"phpstan/phpstan": "^1.0"
}
}

0 comments on commit 97738f7

Please sign in to comment.