Test Failed
Push — master ( b7ab7b...94ee03 )
by Kirill
02:59
created
src/Compiler.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -14,14 +14,12 @@
 block discarded – undo
14 14
 use Psr\Log\LoggerInterface;
15 15
 use Railt\Io\File;
16 16
 use Railt\Io\Readable;
17
-use Railt\Reflection\Contracts\Document;
18 17
 use Railt\Reflection\Contracts\Document as DocumentInterface;
19 18
 use Railt\Reflection\Reflection;
20 19
 use Railt\SDL\Compiler\Dictionary;
21 20
 use Railt\SDL\Compiler\Store;
22 21
 use Railt\SDL\Exception\CompilerException;
23 22
 use Railt\SDL\Exception\InternalException;
24
-use Railt\SDL\Frontend\Record\RecordInterface;
25 23
 
26 24
 /**
27 25
  * Class Compiler
Please login to merge, or discard this patch.
src/Frontend.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 use Psr\Log\LoggerInterface;
15 15
 use Railt\Io\Readable;
16 16
 use Railt\Parser\Ast\RuleInterface;
17
-use Railt\Parser\Exception\UnexpectedTokenException;
18 17
 use Railt\Parser\Exception\UnrecognizedTokenException;
19 18
 use Railt\SDL\Exception\SyntaxException;
20 19
 use Railt\SDL\Frontend\Builder;
Please login to merge, or discard this patch.
src/Frontend/Builder.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -16,11 +16,9 @@
 block discarded – undo
16 16
 use Railt\SDL\Frontend;
17 17
 use Railt\SDL\Frontend\Context\ContextInterface;
18 18
 use Railt\SDL\Frontend\Context\GlobalContext;
19
-use Railt\SDL\Frontend\Context\GlobalContextInterface;
20 19
 use Railt\SDL\IR\SymbolTable;
21 20
 use Railt\SDL\IR\SymbolTable\ValueInterface;
22 21
 use Railt\SDL\IR\SymbolTableInterface;
23
-use Railt\SDL\IR\Type\TypeNameInterface;
24 22
 
25 23
 /**
26 24
  * Class Builder
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -116,13 +116,13 @@
 block discarded – undo
116 116
         }
117 117
 
118 118
 
119
-        echo \str_repeat('=', 60) . "\n";
120
-        echo \sprintf('| %5s | %-48s |', 'ID', 'VARIABLE') . "\n";
121
-        echo \str_repeat('-', 60) . "\n";
119
+        echo \str_repeat('=', 60)."\n";
120
+        echo \sprintf('| %5s | %-48s |', 'ID', 'VARIABLE')."\n";
121
+        echo \str_repeat('-', 60)."\n";
122 122
         foreach ($this->table as $id => $var) {
123
-            echo \sprintf('| %5d | %-48s |', $id, $var) . "\n";
123
+            echo \sprintf('| %5d | %-48s |', $id, $var)."\n";
124 124
         }
125
-        echo \str_repeat('=', 60) . "\n";
125
+        echo \str_repeat('=', 60)."\n";
126 126
     }
127 127
 
128 128
     /**
Please login to merge, or discard this patch.
src/Frontend/Builder/TypeDefinitionBuilder.php 2 patches
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -11,14 +11,9 @@
 block discarded – undo
11 11
 
12 12
 use Railt\Parser\Ast\RuleInterface;
13 13
 use Railt\SDL\Exception\InvalidArgumentException;
14
-use Railt\SDL\Frontend\AST\TypeNameNode;
15 14
 use Railt\SDL\Frontend\Builder\Definition\Definition;
16 15
 use Railt\SDL\Frontend\Context\ContextInterface;
17
-use Railt\SDL\Frontend\Matcher;
18
-use Railt\SDL\Frontend\Parser;
19 16
 use Railt\SDL\IR\SymbolTable\ValueInterface;
20
-use Railt\SDL\IR\Type;
21
-use Railt\SDL\IR\Type\Name;
22 17
 use Railt\SDL\IR\Type\TypeNameInterface;
23 18
 
24 19
 /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
             yield from $name = $this->getArgumentName($argument);
53 53
             yield from $value = $this->getArgumentValue($argument);
54 54
 
55
-            $definition->addArgument((string)$name->getReturn(), $value->getReturn());
55
+            $definition->addArgument((string) $name->getReturn(), $value->getReturn());
56 56
         }
57 57
 
58 58
         return $definition;
Please login to merge, or discard this patch.
src/Frontend/Context/Context.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 use Railt\Io\Readable;
13 13
 use Railt\SDL\IR\SymbolTable\VarSymbol;
14 14
 use Railt\SDL\IR\SymbolTable\VarSymbolInterface;
15
-use Railt\SDL\IR\SymbolTable\ValueInterface;
16 15
 use Railt\SDL\IR\SymbolTableInterface;
17 16
 use Railt\SDL\IR\Type\TypeInterface;
18 17
 use Railt\SDL\IR\Type\TypeNameInterface;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
      * @param TypeInterface|null $type
129 129
      * @return VarSymbolInterface
130 130
      */
131
-    public function declare(string $var, TypeInterface $type = null): VarSymbolInterface
131
+    public function declare(string$var,TypeInterface$type=null): VarSymbolInterface
132 132
     {
133 133
         $record = new VarSymbol($var, $type);
134 134
 
Please login to merge, or discard this patch.
src/IR/SymbolTable.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 
10 10
 namespace Railt\SDL\IR;
11 11
 
12
-use Railt\SDL\Exception\CompilerException;
13 12
 use Railt\SDL\Exception\NotFoundException;
14 13
 use Railt\SDL\IR\SymbolTable\VarSymbol;
15 14
 use Railt\SDL\IR\SymbolTable\VarSymbolInterface;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      * @param VarSymbolInterface $record
34 34
      * @return int
35 35
      */
36
-    public function declare(VarSymbolInterface $record): int
36
+    public function declare(VarSymbolInterface$record): int
37 37
     {
38 38
         $id = $this->id++;
39 39
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function fetch(int $addr): VarSymbolInterface
51 51
     {
52
-        if (! isset($this->variables[$addr])) {
52
+        if (!isset($this->variables[$addr])) {
53 53
             $error = \sprintf('Mismatched variable address 0x%08x', $addr);
54 54
             throw new NotFoundException($error);
55 55
         }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     {
75 75
         $variables = [];
76 76
         foreach ($this->variables as $id => $var) {
77
-            $variables[$id] = (string)$var;
77
+            $variables[$id] = (string) $var;
78 78
         }
79 79
 
80 80
         return [
Please login to merge, or discard this patch.
src/Frontend/Builder/Value/TypeInvocationBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         /** @var ValueInterface $value */
43 43
         $value = yield $rule->first('> #GenericInvocationName')->getChild(0);
44 44
 
45
-        $name = Name::new((string)$value->getValue());
45
+        $name = Name::new((string) $value->getValue());
46 46
 
47 47
         // TODO Add arguments
48 48
 
Please login to merge, or discard this patch.
src/Frontend/Builder/Instruction/ImportBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $value = yield $rule->getChild(0);
46 46
 
47 47
         if ($value->getType()->typeOf(Type::string())) {
48
-            yield from $this->load($this->include($ctx, (string)$value->getValue()));
48
+            yield from $this->load($this->include($ctx, (string) $value->getValue()));
49 49
         }
50 50
 
51 51
         $error = 'Argument of include should be a string, but %s given';
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             return $inclusion;
97 97
         }
98 98
 
99
-        $pathname = \dirname($file->getPathname()) . \DIRECTORY_SEPARATOR . $inclusion;
99
+        $pathname = \dirname($file->getPathname()).\DIRECTORY_SEPARATOR.$inclusion;
100 100
         $pathname = \str_replace('/./', '/', $pathname);
101 101
 
102 102
         return $pathname;
Please login to merge, or discard this patch.
src/Frontend/Builder/Definition/Argument.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,6 +58,6 @@
 block discarded – undo
58 58
      */
59 59
     public function __toString(): string
60 60
     {
61
-        return $this->getName() . ': ' . $this->getHint()->getFullyQualifiedName();
61
+        return $this->getName().': '.$this->getHint()->getFullyQualifiedName();
62 62
     }
63 63
 }
Please login to merge, or discard this patch.