Completed
Pull Request — master (#470)
by Claus
01:32
created
src/Core/ViewHelper/Traits/CompileWithContentArgumentAndRenderStatic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
         $argumentName = $this->resolveContentArgumentName();
80 80
         $arguments = $this->arguments ?? [];
81 81
         $self = $this;
82
-        $renderChildrenClosure = function () use ($arguments, $argumentName, $self) {
82
+        $renderChildrenClosure = function() use ($arguments, $argumentName, $self) {
83 83
             return !empty($argumentName) ? ($arguments[$argumentName] ?? $self->renderChildren()) : $self->renderChildren();
84 84
         };
85 85
         return $renderChildrenClosure;
Please login to merge, or discard this patch.
src/Core/Parser/SyntaxTree/AtomNode.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -22,12 +22,18 @@
 block discarded – undo
22 22
 
23 23
     protected $file;
24 24
     
25
+    /**
26
+     * @param string $name
27
+     */
25 28
     public function setName(?string $name): ComponentInterface
26 29
     {
27 30
         $this->name = $name;
28 31
         return $this;
29 32
     }
30 33
 
34
+    /**
35
+     * @param string $file
36
+     */
31 37
     public function setFile($file): ComponentInterface
32 38
     {
33 39
         $this->file = $file;
Please login to merge, or discard this patch.
src/Core/Parser/TemplateParser.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -70,6 +70,7 @@
 block discarded – undo
70 70
      *
71 71
      * @param Source $source Template source instance
72 72
      * @param Configuration|null Template parsing configuration to use
73
+     * @param Configuration $configuration
73 74
      * @return ComponentInterface Parsed template
74 75
      * @throws Exception
75 76
      */
Please login to merge, or discard this patch.
src/Core/Parser/Sequencer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
                     $this->escapingEnabled = $this->configuration->isFeatureEnabled(Configuration::FEATURE_ESCAPING);
327 327
                     if (!$this->configuration->isFeatureEnabled(Configuration::FEATURE_PARSING)) {
328 328
                         throw (new PassthroughSourceException('Source must be represented as raw string', 1563379852))
329
-                            ->setSource((string)$this->sequenceRemainderAsText());
329
+                            ->setSource((string) $this->sequenceRemainderAsText());
330 330
                     }
331 331
                     return;
332 332
             }
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
                             // hand equivalent of having written `attr="{attr}"` in the Fluid template.
514 514
                             $key = $captured;
515 515
                         }
516
-                    } elseif ($namespace !== null || (!isset($namespace, $method) && $this->resolver->isAliasRegistered((string)$captured))) {
516
+                    } elseif ($namespace !== null || (!isset($namespace, $method) && $this->resolver->isAliasRegistered((string) $captured))) {
517 517
                         $method = $captured;
518 518
                         $viewHelperNode = $this->resolver->createViewHelperInstance($namespace, $method);
519 519
                         $arguments = $viewHelperNode->getArguments();
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
                         ++$ignoredEndingBraces;
610 610
                         $countedEscapes = 0;
611 611
                         if ($captured !== null) {
612
-                            $node->addChild(new TextNode((string)$captured));
612
+                            $node->addChild(new TextNode((string) $captured));
613 613
                         }
614 614
                     } elseif ($this->splitter->context->context === Context::CONTEXT_PROTECTED) {
615 615
                         // Ignore one ending additional curly brace. Subtracted in the BYTE_INLINE_END case below.
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
                     $isArray = $allowArray;
753 753
                     $callDetected = false;
754 754
 
755
-                    $text .=  $this->source->source[$this->splitter->index - 1];
755
+                    $text .= $this->source->source[$this->splitter->index - 1];
756 756
                     $node = $node ?? new ObjectAccessorNode();
757 757
                     if ($potentialAccessor ?? $captured) {
758 758
                         $node->addChild(new TextNode($potentialAccessor . $captured));
@@ -976,7 +976,7 @@  discard block
 block discarded – undo
976 976
                         throw $this->createErrorAtPosition('Unexpected colon or equals sign, no preceding key', 1559250839);
977 977
                     }
978 978
                     if ($definitions !== null && !$numeric && !isset($definitions[$key])) {
979
-                        throw $this->createUnsupportedArgumentError((string)$key, $definitions);
979
+                        throw $this->createUnsupportedArgumentError((string) $key, $definitions);
980 980
                     }
981 981
                     break;
982 982
 
@@ -1040,7 +1040,7 @@  discard block
 block discarded – undo
1040 1040
                     } elseif ($captured !== null) {
1041 1041
                         $key = $key ?? ($numeric ? ++$itemCount : $captured);
1042 1042
                         if (!$numeric && $definitions !== null && !isset($definitions[$key])) {
1043
-                            throw $this->createUnsupportedArgumentError((string)$key, $definitions);
1043
+                            throw $this->createUnsupportedArgumentError((string) $key, $definitions);
1044 1044
                         }
1045 1045
                         $value = is_numeric($captured) ? $captured + 0 : new ObjectAccessorNode($captured);
1046 1046
                     }
@@ -1084,7 +1084,7 @@  discard block
 block discarded – undo
1084 1084
                         }
1085 1085
                     }
1086 1086
                     if (!$numeric && isset($key, $definitions) && !isset($definitions[$key])) {
1087
-                        throw $this->createUnsupportedArgumentError((string)$key, $definitions);
1087
+                        throw $this->createUnsupportedArgumentError((string) $key, $definitions);
1088 1088
                     }
1089 1089
                     $this->escapingEnabled = $escapingEnabledBackup;
1090 1090
                     $this->splitter->switch($restore);
Please login to merge, or discard this patch.