Passed
Push — develop ( d87476...f442cf )
by nguereza
03:18
created
src/Tag/CycleTag.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
  * Class CycleTag
61 61
  * @package Platine\Template\Tag
62 62
  */
63
-class CycleTag extends AbstractTag
64
-{
63
+class CycleTag extends AbstractTag {
65 64
     /**
66 65
      * The name of the cycle; if none is given one
67 66
      * is created using the value list
@@ -78,8 +77,7 @@  discard block
 block discarded – undo
78 77
     /**
79 78
     * {@inheritdoc}
80 79
     */
81
-    public function __construct(string $markup, &$tokens, Parser $parser)
82
-    {
80
+    public function __construct(string $markup, &$tokens, Parser $parser) {
83 81
         $lexerSimple = new Lexer('/' . Token::QUOTED_FRAGMENT . '/');
84 82
         $lexerNamed = new Lexer('/(' . Token::QUOTED_FRAGMENT . ')\s*\:\s*(.*)/');
85 83
         if ($lexerNamed->match($markup)) {
Please login to merge, or discard this patch.
src/Tag/ExtendsTag.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
  * Class ExtendsTag
62 62
  * @package Platine\Template\Tag
63 63
  */
64
-class ExtendsTag extends AbstractTag
65
-{
64
+class ExtendsTag extends AbstractTag {
66 65
     /**
67 66
      * The name of the template
68 67
      * @var string
@@ -84,8 +83,7 @@  discard block
 block discarded – undo
84 83
     /**
85 84
     * {@inheritdoc}
86 85
     */
87
-    public function __construct(string $markup, &$tokens, Parser $parser)
88
-    {
86
+    public function __construct(string $markup, &$tokens, Parser $parser) {
89 87
         $lexer = new Lexer('/("[^"]+"|\'[^\']+\')?/');
90 88
         if ($lexer->match($markup) && $lexer->isMatchNotNull(1)) {
91 89
             $this->templateName = substr(
Please login to merge, or discard this patch.
src/Tag/IncrementTag.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -62,15 +62,15 @@  discard block
 block discarded – undo
62 62
  */
63 63
 class IncrementTag extends AbstractTag
64 64
 {
65
-     /**
66
-     * Name of the variable to increment
67
-     * @var string
68
-     */
65
+        /**
66
+         * Name of the variable to increment
67
+         * @var string
68
+         */
69 69
     protected string $name;
70 70
 
71 71
     /**
72
-    * {@inheritdoc}
73
-    */
72
+     * {@inheritdoc}
73
+     */
74 74
     public function __construct(string $markup, &$tokens, Parser $parser)
75 75
     {
76 76
         $lexer = new Lexer('/(' . Token::VARIABLE_NAME . ')/');
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
     }
86 86
 
87 87
     /**
88
-    * {@inheritdoc}
89
-    */
88
+     * {@inheritdoc}
89
+     */
90 90
     public function render(Context $context): string
91 91
     {
92 92
         // if the value is not set in the environment check to see if it
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
  * Class IncrementTag
61 61
  * @package Platine\Template\Tag
62 62
  */
63
-class IncrementTag extends AbstractTag
64
-{
63
+class IncrementTag extends AbstractTag {
65 64
      /**
66 65
      * Name of the variable to increment
67 66
      * @var string
@@ -71,8 +70,7 @@  discard block
 block discarded – undo
71 70
     /**
72 71
     * {@inheritdoc}
73 72
     */
74
-    public function __construct(string $markup, &$tokens, Parser $parser)
75
-    {
73
+    public function __construct(string $markup, &$tokens, Parser $parser) {
76 74
         $lexer = new Lexer('/(' . Token::VARIABLE_NAME . ')/');
77 75
         if ($lexer->match($markup)) {
78 76
             $this->name = $lexer->getStringMatch(0);
Please login to merge, or discard this patch.
src/Tag/SetTag.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
  * Class SetTag
61 61
  * @package Platine\Template\Tag
62 62
  */
63
-class SetTag extends AbstractTag
64
-{
63
+class SetTag extends AbstractTag {
65 64
     /**
66 65
      * The variable instance to assign
67 66
      * @var Variable
@@ -77,8 +76,7 @@  discard block
 block discarded – undo
77 76
     /**
78 77
     * {@inheritdoc}
79 78
     */
80
-    public function __construct(string $markup, &$tokens, Parser $parser)
81
-    {
79
+    public function __construct(string $markup, &$tokens, Parser $parser) {
82 80
         $lexer = new Lexer('/(\w+)\s*=\s*(.*)\s*/');
83 81
         if ($lexer->match($markup)) {
84 82
             $this->variableName = $lexer->getStringMatch(1);
Please login to merge, or discard this patch.
src/Tag/IncludeTag.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
  * Class IncludeTag
62 62
  * @package Platine\Template\Tag
63 63
  */
64
-class IncludeTag extends AbstractTag
65
-{
64
+class IncludeTag extends AbstractTag {
66 65
     /**
67 66
      * The name of the template
68 67
      * @var string
@@ -97,8 +96,7 @@  discard block
 block discarded – undo
97 96
     /**
98 97
     * {@inheritdoc}
99 98
     */
100
-    public function __construct(string $markup, &$tokens, Parser $parser)
101
-    {
99
+    public function __construct(string $markup, &$tokens, Parser $parser) {
102 100
         $lexer = new Lexer(
103 101
             '/("[^"]+"|\'[^\']+\'|[^\'"\s]+)(\s+(with|for)\s+('
104 102
             . Token::QUOTED_FRAGMENT
Please login to merge, or discard this patch.
src/Tag/IfchangedTag.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@  discard block
 block discarded – undo
57 57
  * Class IfchangedTag
58 58
  * @package Platine\Template\Tag
59 59
  */
60
-class IfchangedTag extends AbstractBlock
61
-{
60
+class IfchangedTag extends AbstractBlock {
62 61
     /**
63 62
      * The last value
64 63
      * @var string
@@ -68,8 +67,7 @@  discard block
 block discarded – undo
68 67
     /**
69 68
     * {@inheritdoc}
70 69
     */
71
-    public function __construct(string $markup, &$tokens, Parser $parser)
72
-    {
70
+    public function __construct(string $markup, &$tokens, Parser $parser) {
73 71
         parent::__construct($markup, $tokens, $parser);
74 72
     }
75 73
 
Please login to merge, or discard this patch.
src/Tag/CaseTag.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,8 +62,7 @@  discard block
 block discarded – undo
62 62
  * Class CaseTag
63 63
  * @package Platine\Template\Tag
64 64
  */
65
-class CaseTag extends AbstractCondition
66
-{
65
+class CaseTag extends AbstractCondition {
67 66
     /**
68 67
      * Stack of node list
69 68
      * @var array<int, array<int, mixed>>
@@ -91,8 +90,7 @@  discard block
 block discarded – undo
91 90
     /**
92 91
     * {@inheritdoc}
93 92
     */
94
-    public function __construct(string $markup, &$tokens, Parser $parser)
95
-    {
93
+    public function __construct(string $markup, &$tokens, Parser $parser) {
96 94
         parent::__construct($markup, $tokens, $parser);
97 95
 
98 96
         $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/');
Please login to merge, or discard this patch.
src/Tag/IfTag.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
  * Class IfTag
61 61
  * @package Platine\Template\Tag
62 62
  */
63
-class IfTag extends AbstractCondition
64
-{
63
+class IfTag extends AbstractCondition {
65 64
     /**
66 65
      * holding the nodes to render for each logical block
67 66
      * @var array<int, mixed>
@@ -78,8 +77,7 @@  discard block
 block discarded – undo
78 77
     /**
79 78
     * {@inheritdoc}
80 79
     */
81
-    public function __construct(string $markup, &$tokens, Parser $parser)
82
-    {
80
+    public function __construct(string $markup, &$tokens, Parser $parser) {
83 81
         //Initialize
84 82
         $this->nodeListHolders[count($this->blocks)] = [];
85 83
         $this->nodeList = & $this->nodeListHolders[count($this->blocks)];
@@ -207,8 +205,7 @@  discard block
 block discarded – undo
207 205
      * @param mixed $value
208 206
      * @return mixed
209 207
      */
210
-    protected function negateCondition($value)
211
-    {
208
+    protected function negateCondition($value) {
212 209
         // no need to negate a condition in a regular `if`
213 210
         // tag (will do that in `ifnot` tag)
214 211
 
Please login to merge, or discard this patch.
src/Tag/BlockTag.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@  discard block
 block discarded – undo
58 58
  * Class BlockTag
59 59
  * @package Platine\Template\Tag
60 60
  */
61
-class BlockTag extends AbstractBlock
62
-{
61
+class BlockTag extends AbstractBlock {
63 62
     /**
64 63
      * The name of the block
65 64
      * @var string
@@ -69,8 +68,7 @@  discard block
 block discarded – undo
69 68
     /**
70 69
     * {@inheritdoc}
71 70
     */
72
-    public function __construct(string $markup, &$tokens, Parser $parser)
73
-    {
71
+    public function __construct(string $markup, &$tokens, Parser $parser) {
74 72
         $lexer = new Lexer('/(\w+)/');
75 73
         if ($lexer->match($markup)) {
76 74
             $this->blockName = $lexer->getStringMatch(1);
Please login to merge, or discard this patch.