Completed
Pull Request — master (#470)
by Claus
06:03
created
src/Core/Parser/Context.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
     public const CONTEXT_ROOT = 0;
9 9
     public const CONTEXT_INLINE = 1;
10 10
     public const CONTEXT_TAG = 2;
11
-    public const CONTEXT_ARRAY= 3;
11
+    public const CONTEXT_ARRAY = 3;
12 12
     public const CONTEXT_QUOTED = 4;
13 13
     public const CONTEXT_ATTRIBUTES = 5;
14 14
     public const CONTEXT_DEAD = 6;
Please login to merge, or discard this patch.
src/Core/Parser/Splitter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
         }
124 124
     }
125 125
 
126
-    public function switch(Context $context): Context
126
+    public function switch (Context $context): Context
127 127
     {
128 128
         $previous = $this->context;
129 129
         $this->context = $context;
Please login to merge, or discard this patch.
src/Component/AbstractComponent.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@
 block discarded – undo
216 216
     }
217 217
 
218 218
     /**
219
-     * @param iterable|ComponentInterface[] $children
219
+     * @param ComponentInterface[] $children
220 220
      * @return ComponentInterface
221 221
      */
222 222
     public function setChildren(iterable $children): ComponentInterface
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode;
15 15
 use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\TextNode;
16 16
 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
17
-use TYPO3Fluid\Fluid\ViewHelpers\ArgumentViewHelper;
18 17
 use TYPO3Fluid\Fluid\ViewHelpers\ParameterViewHelper;
19 18
 
20 19
 /**
Please login to merge, or discard this patch.
src/Core/Parser/Sequencer.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,6 @@
 block discarded – undo
19 19
 use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\TextNode;
20 20
 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
21 21
 use TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperResolver;
22
-use TYPO3Fluid\Fluid\ViewHelpers\SectionViewHelper;
23 22
 
24 23
 /**
25 24
  * Sequencer for Fluid syntax
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
                     $this->escapingEnabled = $this->configuration->isFeatureEnabled(Configuration::FEATURE_ESCAPING);
306 306
                     if (!$this->configuration->isFeatureEnabled(Configuration::FEATURE_PARSING)) {
307 307
                         throw (new PassthroughSourceException('Source must be represented as raw string', 1563379852))
308
-                            ->setSource((string)$this->sequenceRemainderAsText());
308
+                            ->setSource((string) $this->sequenceRemainderAsText());
309 309
                     }
310 310
                     return;
311 311
             }
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
                             }
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
 
519 519
                         try {
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
                         ++$ignoredEndingBraces;
618 618
                         $countedEscapes = 0;
619 619
                         if ($captured !== null) {
620
-                            $node->addChild(new TextNode((string)$captured));
620
+                            $node->addChild(new TextNode((string) $captured));
621 621
                         }
622 622
                     } elseif ($this->splitter->context->context === Context::CONTEXT_PROTECTED) {
623 623
                         // Ignore one ending additional curly brace. Subtracted in the BYTE_INLINE_END case below.
@@ -771,7 +771,7 @@  discard block
 block discarded – undo
771 771
                     $isArray = $allowArray;
772 772
                     $callDetected = false;
773 773
 
774
-                    $text .=  $this->source->source[$this->splitter->index - 1];
774
+                    $text .= $this->source->source[$this->splitter->index - 1];
775 775
                     $node = $node ?? new ObjectAccessorNode();
776 776
                     if ($potentialAccessor ?? $captured) {
777 777
                         $node->addChild(new TextNode($potentialAccessor . $captured));
@@ -1005,7 +1005,7 @@  discard block
 block discarded – undo
1005 1005
                         throw $this->createErrorAtPosition('Unexpected colon or equals sign, no preceding key', 1559250839);
1006 1006
                     }
1007 1007
                     if ($definitions !== null && !$numeric && !isset($definitions[$key])) {
1008
-                        throw $this->createUnsupportedArgumentError((string)$key, $definitions);
1008
+                        throw $this->createUnsupportedArgumentError((string) $key, $definitions);
1009 1009
                     }
1010 1010
                     break;
1011 1011
 
@@ -1069,7 +1069,7 @@  discard block
 block discarded – undo
1069 1069
                     } elseif ($captured !== null) {
1070 1070
                         $key = $key ?? ($numeric ? ++$itemCount : $captured);
1071 1071
                         if (!$numeric && $definitions !== null && !isset($definitions[$key])) {
1072
-                            throw $this->createUnsupportedArgumentError((string)$key, $definitions);
1072
+                            throw $this->createUnsupportedArgumentError((string) $key, $definitions);
1073 1073
                         }
1074 1074
                         $value = is_numeric($captured) ? $captured + 0 : new ObjectAccessorNode($captured);
1075 1075
                     }
@@ -1116,7 +1116,7 @@  discard block
 block discarded – undo
1116 1116
                         }
1117 1117
                     }
1118 1118
                     if (!$numeric && isset($key, $definitions) && !isset($definitions[$key])) {
1119
-                        throw $this->createUnsupportedArgumentError((string)$key, $definitions);
1119
+                        throw $this->createUnsupportedArgumentError((string) $key, $definitions);
1120 1120
                     }
1121 1121
                     if (isset($definitions[$key]) && $definitions[$key]->getType() === 'boolean') {
1122 1122
                         $array[$key] = is_numeric($array[$key]) ? (bool) $array[$key] : new BooleanNode($array[$key]);
Please login to merge, or discard this patch.
src/Core/Parser/SyntaxTree/BooleanNode.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -135,6 +135,10 @@
 block discarded – undo
135 135
         return $this->convertToBoolean($value);
136 136
     }
137 137
 
138
+    /**
139
+     * @param boolean|null $x
140
+     * @param boolean $y
141
+     */
138 142
     protected function evaluateAndOr($x, $y, string $combiner): bool
139 143
     {
140 144
         switch ($combiner) {
Please login to merge, or discard this patch.
src/Core/Parser/TemplateParser.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -51,6 +51,7 @@
 block discarded – undo
51 51
      *
52 52
      * @param string $templateString The template to parse as a string
53 53
      * @param Configuration|null Template parsing configuration to use
54
+     * @param Configuration $configuration
54 55
      * @return ComponentInterface Parsed template
55 56
      * @throws Exception
56 57
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     {
36 36
         return $this->getOrParseAndStoreTemplate(
37 37
             $this->createIdentifierForFile($templatePathAndFilename, ''),
38
-            function () use ($templatePathAndFilename): string {
38
+            function() use ($templatePathAndFilename) : string {
39 39
                 return file_get_contents($templatePathAndFilename);
40 40
             }
41 41
         );
Please login to merge, or discard this patch.
src/Core/ViewHelper/ViewHelperResolver.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -7,14 +7,12 @@
 block discarded – undo
7 7
  * See LICENSE.txt that was shipped with this package.
8 8
  */
9 9
 
10
-use TYPO3Fluid\Fluid\Component\Argument\ArgumentCollection;
11 10
 use TYPO3Fluid\Fluid\Component\ComponentInterface;
12 11
 use TYPO3Fluid\Fluid\Component\Error\ChildNotFoundException;
13 12
 use TYPO3Fluid\Fluid\Core\Parser\Exception;
14 13
 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
15 14
 use TYPO3Fluid\Fluid\ViewHelpers\AtomViewHelper;
16 15
 use TYPO3Fluid\Fluid\ViewHelpers\RenderViewHelper;
17
-use TYPO3Fluid\Fluid\ViewHelpers\SectionViewHelper;
18 16
 
19 17
 /**
20 18
  * Class ViewHelperResolver
Please login to merge, or discard this patch.
src/View/AbstractView.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     /**
26 26
      * Renders the view
27 27
      *
28
-     * @return mixed The rendered view
28
+     * @return string The rendered view
29 29
      */
30 30
     public function render()
31 31
     {
Please login to merge, or discard this patch.
src/View/TemplatePaths.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
      * Sanitize a path, ensuring it is absolute and
424 424
      * if a directory, suffixed by a trailing slash.
425 425
      *
426
-     * @param string|array $path
426
+     * @param string $path
427 427
      * @return string|string[]
428 428
      */
429 429
     protected function sanitizePath($path)
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
     }
588 588
 
589 589
     /**
590
-     * @param mixed $source
590
+     * @param string $source
591 591
      */
592 592
     public function setTemplateSource($source)
593 593
     {
Please login to merge, or discard this patch.