Completed
Push — master ( babe81...a4fea1 )
by Kirill
38:14
created
src/SDL/Runtime/CallStackRenderer/PhpTraceRenderer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
     {
28 28
         $this->trace = $trace;
29 29
 
30
-        $this->file = (string)($trace['file'] ?? 'php://input');
31
-        $this->line = (int)($trace['line'] ?? 0);
30
+        $this->file = (string) ($trace['file'] ?? 'php://input');
31
+        $this->line = (int) ($trace['line'] ?? 0);
32 32
     }
33 33
 
34 34
     /**
@@ -54,16 +54,16 @@  discard block
 block discarded – undo
54 54
         $result = $trace['function'];
55 55
 
56 56
         if (\array_key_exists('class', $trace)) {
57
-            $result = $trace['class'] . $trace['type'] . $result;
57
+            $result = $trace['class'].$trace['type'].$result;
58 58
         }
59 59
 
60 60
         $arguments = [];
61 61
 
62
-        foreach ((array)($trace['args'] ?? []) as $argument) {
62
+        foreach ((array) ($trace['args'] ?? []) as $argument) {
63 63
             $arguments[] = $this->valueToString($argument);
64 64
         }
65 65
 
66
-        return $result . '(' . \implode(', ', $arguments) . ')';
66
+        return $result.'('.\implode(', ', $arguments).')';
67 67
     }
68 68
 
69 69
     /**
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
         $body = \implode(', ', $parts);
105 105
 
106 106
         if (\is_object($iterator)) {
107
-            return $this->objectToString($iterator) . '<' . $body . '>';
107
+            return $this->objectToString($iterator).'<'.$body.'>';
108 108
         }
109 109
 
110
-        return '[' . $body . ']';
110
+        return '['.$body.']';
111 111
     }
112 112
 
113 113
     /**
Please login to merge, or discard this patch.
src/SDL/Support.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      */
106 106
     protected function valueWithType($value): string
107 107
     {
108
-        return \mb_strtolower(\gettype($value)) . ' ' . $this->valueToString($value);
108
+        return \mb_strtolower(\gettype($value)).' '.$this->valueToString($value);
109 109
     }
110 110
 
111 111
     /**
@@ -164,6 +164,6 @@  discard block
 block discarded – undo
164 164
             return $result;
165 165
         }
166 166
 
167
-        return (string)$result;
167
+        return (string) $result;
168 168
     }
169 169
 }
Please login to merge, or discard this patch.
src/SDL/polyfill.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 declare(strict_types=1);
9 9
 
10 10
 
11
-\spl_autoload_register(function (string $alias): void {
11
+\spl_autoload_register(function(string $alias): void {
12 12
     $shouldRewrite = \strpos(\trim($alias, '\\'), 'Railt\\Reflection') === 0;
13 13
 
14 14
     if ($shouldRewrite) {
Please login to merge, or discard this patch.
src/SDL/Compiler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     {
144 144
         $this->load($document);
145 145
 
146
-        $build = function (Definition $definition): void {
146
+        $build = function(Definition $definition): void {
147 147
             $this->stack->push($definition);
148 148
 
149 149
             if ($definition instanceof Compilable) {
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                 $this->typeCoercion->apply($definition);
155 155
             }
156 156
 
157
-            if (! ($definition instanceof StandardType)) {
157
+            if (!($definition instanceof StandardType)) {
158 158
                 $this->typeValidator->group(Definitions::class)->validate($definition);
159 159
             }
160 160
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      */
219 219
     private function onCompile(): \Closure
220 220
     {
221
-        return function (Readable $readable): Document {
221
+        return function(Readable $readable): Document {
222 222
             $ast = $this->parser->parse($readable);
223 223
 
224 224
             return $this->complete(new DocumentBuilder($ast, $readable, $this));
Please login to merge, or discard this patch.
src/SDL/Parser/Parser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     /**
18 18
      * @var string
19 19
      */
20
-    public const GRAMMAR_PATHNAME = __DIR__ . '/../../../resources/grammar/sdl.pp';
20
+    public const GRAMMAR_PATHNAME = __DIR__.'/../../../resources/grammar/sdl.pp';
21 21
 
22 22
     /**
23 23
      * Make tokens public
@@ -41,6 +41,6 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public static function match(string $lexeme, string $value): bool
43 43
     {
44
-        return (bool)\preg_match(self::pattern($lexeme), $value);
44
+        return (bool) \preg_match(self::pattern($lexeme), $value);
45 45
     }
46 46
 }
Please login to merge, or discard this patch.
src/SDL/Reflection/Coercion/PassedArgumentsCoercion.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     private function inferenceDefaultArguments(HasArguments $container, HasPassedArguments $usage): void
50 50
     {
51 51
         foreach ($container->getArguments() as $argument) {
52
-            if ($argument->hasDefaultValue() && ! $usage->hasPassedArgument($argument->getName())) {
52
+            if ($argument->hasDefaultValue() && !$usage->hasPassedArgument($argument->getName())) {
53 53
                 $this->set($usage, $argument->getName(), $argument->getDefaultValue());
54 54
             }
55 55
         }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     private function set(HasPassedArguments $usage, string $key, $value): void
64 64
     {
65
-        $invocation = function (string $key, $value): void {
65
+        $invocation = function(string $key, $value): void {
66 66
             /** @var BaseInputInvocation $this */
67 67
             $this->arguments[$key] = $value;
68 68
         };
Please login to merge, or discard this patch.
src/SDL/Reflection/Coercion/DeprecationCoercion.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      */
34 34
     public function apply(TypeDefinition $directive): void
35 35
     {
36
-        $applier = function () use ($directive): void {
36
+        $applier = function() use ($directive): void {
37 37
             $this->deprecationReason = $directive->getPassedArgument(Deprecation::REASON_ARGUMENT);
38 38
         };
39 39
 
Please login to merge, or discard this patch.
src/SDL/Reflection/Validation/Definitions/DirectiveInvocationValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
         /** @var DirectiveDefinition $definition */
52 52
         $definition = $directive->getTypeDefinition();
53 53
 
54
-        if (! $definition->isAllowedFor($directive->getParent())) {
54
+        if (!$definition->isAllowedFor($directive->getParent())) {
55 55
             $error = \vsprintf('Trying to define directive %s on %s, but only %s locations allowed.', [
56 56
                 $directive,
57 57
                 $directive->getParent(),
Please login to merge, or discard this patch.
src/SDL/Reflection/Validation/Definitions/PassedArgumentsValidator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
         $this->getCallStack()->push($type);
73 73
 
74
-        if (! ($type instanceof Inputable)) {
74
+        if (!($type instanceof Inputable)) {
75 75
             $error = \sprintf('%s must be type of Scalar, Enum or Input', $type);
76 76
             throw new TypeConflictException($error, $this->getCallStack());
77 77
         }
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     private function validateSingleArgument(ArgumentDefinition $arg, Inputable $type, $value): void
95 95
     {
96
-        if (! $type->isCompatible($value)) {
96
+        if (!$type->isCompatible($value)) {
97 97
             $error = \vsprintf('The argument %s of %s contain non compatible value %s', [
98 98
                 $arg->getName(),
99 99
                 $type,
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     private function validateListArguments(ArgumentDefinition $arg, Inputable $type, $value): void
114 114
     {
115
-        if (! \is_iterable($value)) {
115
+        if (!\is_iterable($value)) {
116 116
             $error = \vsprintf('The argument %s of %s should contain list value, but %s given', [
117 117
                 $arg->getName(),
118 118
                 $type,
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      */
136 136
     private function validateMissingArgument(HasPassedArguments $invocation, ArgumentDefinition $argument): void
137 137
     {
138
-        if (! $invocation->hasPassedArgument($argument->getName())) {
138
+        if (!$invocation->hasPassedArgument($argument->getName())) {
139 139
             $error = \sprintf('Required argument "%s" of %s not specified', $argument, $argument->getParent());
140 140
 
141 141
             throw new TypeConflictException($error, $this->getCallStack());
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      */
151 151
     private function validateArgumentExisting(HasArguments $container, string $argument): void
152 152
     {
153
-        if (! $container->hasArgument($argument)) {
153
+        if (!$container->hasArgument($argument)) {
154 154
             $error = \sprintf('In the %s there is no specified argument "%s"', $container, $argument);
155 155
 
156 156
             throw new TypeConflictException($error, $this->getCallStack());
Please login to merge, or discard this patch.