aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2016-08-12 17:08:59 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2016-08-12 17:08:59 +0200
commitdc43c24d01226cf50e747e6483684138d7fda239 (patch)
treec298744b31c24c6fe52b5eeb91e134863e43991a
parent4c36d24b8a2c55b149f64c8057f376fc856889fd (diff)
downloadCompiler-dc43c24d01226cf50e747e6483684138d7fda239.zip
Compiler-dc43c24d01226cf50e747e6483684138d7fda239.tar.gz
Compiler-dc43c24d01226cf50e747e6483684138d7fda239.tar.bz2
Quality: Fix CS.
-rw-r--r--Llk/Llk.php5
-rw-r--r--Llk/Rule/Repetition.php2
-rw-r--r--Test/Unit/Llk/Lexer.php2
-rw-r--r--Test/Unit/Llk/Rule/Invocation.php1
-rw-r--r--Test/Unit/Llk/Rule/Repetition.php2
-rw-r--r--Test/Unit/Llk/Rule/Rule.php3
-rw-r--r--Test/Unit/Llk/Rule/Token.php1
-rw-r--r--Test/Unit/Llk/TreeNode.php1
8 files changed, 5 insertions, 12 deletions
diff --git a/Llk/Llk.php b/Llk/Llk.php
index 8750e60..658ed2d 100644
--- a/Llk/Llk.php
+++ b/Llk/Llk.php
@@ -268,7 +268,6 @@ class Llk
' ' . $arguments['name'] . ' => new \\' . get_class($rule) . '(' .
implode(', ', $arguments) .
'),';
-
}
foreach ($parser->getPragmas() as $pragmaName => $pragmaValue) {
@@ -279,7 +278,7 @@ class Llk
? (true === $pragmaValue ? 'true' : 'false')
: (is_int($pragmaValue)
? $pragmaValue
- : '\'' .$pragmaValue . '\'')) .
+ : '\'' . $pragmaValue . '\'')) .
',';
}
@@ -353,7 +352,7 @@ class Llk
}
$pragmas[$matches[1]] = $pragmaValue;
- } else if (0 !== preg_match('#^%skip\s+(?:([^:]+):)?([^\s]+)\s+(.*)$#u', $line, $matches)) {
+ } elseif (0 !== preg_match('#^%skip\s+(?:([^:]+):)?([^\s]+)\s+(.*)$#u', $line, $matches)) {
if (empty($matches[1])) {
$matches[1] = 'default';
}
diff --git a/Llk/Rule/Repetition.php b/Llk/Rule/Repetition.php
index 31d0d23..1264f4f 100644
--- a/Llk/Rule/Repetition.php
+++ b/Llk/Rule/Repetition.php
@@ -78,7 +78,7 @@ class Repetition extends Rule
{
parent::__construct($name, $children, $nodeId);
- $min = max( 0, (int) $min);
+ $min = max(0, (int) $min);
$max = max(-1, (int) $max);
if (-1 !== $max && $min > $max) {
diff --git a/Test/Unit/Llk/Lexer.php b/Test/Unit/Llk/Lexer.php
index 7382f24..8008a74 100644
--- a/Test/Unit/Llk/Lexer.php
+++ b/Test/Unit/Llk/Lexer.php
@@ -492,7 +492,7 @@ class Lexer extends Test\Unit\Suite
->isInstanceOf(LUT\Exception\UnrecognizedToken::class)
->hasMessage(
'Unrecognized token "ß" at line 1 and column 4:' . "\n" .
- '…ß'. "\n" .
+ '…ß' . "\n" .
' ↑'
);
}
diff --git a/Test/Unit/Llk/Rule/Invocation.php b/Test/Unit/Llk/Rule/Invocation.php
index 26f31da..28006d4 100644
--- a/Test/Unit/Llk/Rule/Invocation.php
+++ b/Test/Unit/Llk/Rule/Invocation.php
@@ -36,7 +36,6 @@
namespace Hoa\Compiler\Test\Unit\Llk\Rule;
-use Hoa\Compiler as LUT;
use Hoa\Test;
use Mock\Hoa\Compiler\Llk\Rule\Invocation as SUT;
diff --git a/Test/Unit/Llk/Rule/Repetition.php b/Test/Unit/Llk/Rule/Repetition.php
index fe50e19..df71295 100644
--- a/Test/Unit/Llk/Rule/Repetition.php
+++ b/Test/Unit/Llk/Rule/Repetition.php
@@ -83,7 +83,6 @@ class Repetition extends Test\Unit\Suite
->isEqualTo($id)
->boolean($result->isInfinite())
->isFalse();
-
}
public function case_constructor_min_and_max_are_casted_and_bounded()
@@ -104,7 +103,6 @@ class Repetition extends Test\Unit\Suite
->isEqualTo(42)
->boolean($result->isInfinite())
->isFalse();
-
}
public function case_constructor_min_is_greater_than_max()
diff --git a/Test/Unit/Llk/Rule/Rule.php b/Test/Unit/Llk/Rule/Rule.php
index 0d426be..9fd671f 100644
--- a/Test/Unit/Llk/Rule/Rule.php
+++ b/Test/Unit/Llk/Rule/Rule.php
@@ -36,9 +36,8 @@
namespace Hoa\Compiler\Test\Unit\Llk\Rule;
-use Hoa\Compiler as LUT;
-use Mock\Hoa\Compiler\Llk\Rule as SUT;
use Hoa\Test;
+use Mock\Hoa\Compiler\Llk\Rule as SUT;
/**
* Class \Hoa\Compiler\Test\Unit\Llk\Rule\Rule.
diff --git a/Test/Unit/Llk/Rule/Token.php b/Test/Unit/Llk/Rule/Token.php
index c12e96e..7450339 100644
--- a/Test/Unit/Llk/Rule/Token.php
+++ b/Test/Unit/Llk/Rule/Token.php
@@ -80,7 +80,6 @@ class Token extends Test\Unit\Suite
->isEqualTo($unification)
->boolean($result->isKept())
->isFalse();
-
}
public function case_constructor_with_kept_flag()
diff --git a/Test/Unit/Llk/TreeNode.php b/Test/Unit/Llk/TreeNode.php
index bc02b42..2530b75 100644
--- a/Test/Unit/Llk/TreeNode.php
+++ b/Test/Unit/Llk/TreeNode.php
@@ -439,7 +439,6 @@ class TreeNode extends Test\Unit\Suite
public function case_get_data_by_reference()
{
-
$this
->given($node = new SUT('foo'))
->when($result = &$node->getData())