Passed
Push — develop ( acf7d3...ede307 )
by nguereza
10:23
created
src/Tag/IfnotTag.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@
 block discarded – undo
56 56
 class IfnotTag extends IfTag
57 57
 {
58 58
     /**
59
-    * {@inheritdoc}
60
-    */
59
+     * {@inheritdoc}
60
+     */
61 61
     protected function negateCondition(mixed $value): mixed
62 62
     {
63 63
         return !$value;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
  * @class IfnotTag
54 54
  * @package Platine\Template\Tag
55 55
  */
56
-class IfnotTag extends IfTag
57
-{
56
+class IfnotTag extends IfTag {
58 57
     /**
59 58
     * {@inheritdoc}
60 59
     */
Please login to merge, or discard this patch.
src/Tag/ForTag.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      * The loop start value
104 104
      * @var int|string
105 105
      */
106
-    protected int|string $start;
106
+    protected int | string $start;
107 107
 
108 108
     /**
109 109
     * {@inheritdoc}
@@ -194,8 +194,8 @@  discard block
 block discarded – undo
194 194
                 'index0' => $index,
195 195
                 'rindex' => $length - $index,
196 196
                 'rindex0' => $length - $index - 1,
197
-                'first' => ((int)$index === 0),
198
-                'last' => ((int)$index === ($length - 1)),
197
+                'first' => ((int) $index === 0),
198
+                'last' => ((int) $index === ($length - 1)),
199 199
             ]);
200 200
 
201 201
             $result .= $this->renderAll($this->nodeList, $context);
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
             $offset = 0;
245 245
             if (isset($this->attributes['offset'])) {
246 246
                 $forRegister = $context->getRegister('for');
247
-                $offset =  ($this->attributes['offset'] === 'continue')
247
+                $offset = ($this->attributes['offset'] === 'continue')
248 248
                           ? (isset($forRegister[$this->name])
249 249
                                 ? (int) $forRegister[$this->name]
250 250
                                 : 0)
@@ -281,8 +281,8 @@  discard block
 block discarded – undo
281 281
                 'index0' => $index,
282 282
                 'rindex' => $length - $index,
283 283
                 'rindex0' => $length - $index - 1,
284
-                'first' => ((int)$index === 0),
285
-                'last' => ((int)$index === ($length - 1)),
284
+                'first' => ((int) $index === 0),
285
+                'last' => ((int) $index === ($length - 1)),
286 286
             ]);
287 287
 
288 288
             $result .= $this->renderAll($this->nodeList, $context);
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
     protected int|string $start;
107 107
 
108 108
     /**
109
-    * {@inheritdoc}
110
-    */
109
+     * {@inheritdoc}
110
+     */
111 111
     public function __construct(string $markup, array &$tokens, Parser $parser)
112 112
     {
113 113
         parent::__construct($markup, $tokens, $parser);
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
     }
144 144
 
145 145
     /**
146
-    * {@inheritdoc}
147
-    */
146
+     * {@inheritdoc}
147
+     */
148 148
     public function render(Context $context): string
149 149
     {
150 150
         if (!$context->hasRegister('for')) {
Please login to merge, or discard this 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 ForTag
63 63
  * @package Platine\Template\Tag
64 64
  */
65
-class ForTag extends AbstractBlock
66
-{
65
+class ForTag extends AbstractBlock {
67 66
     /**
68 67
      * Type digit
69 68
      */
@@ -108,8 +107,7 @@  discard block
 block discarded – undo
108 107
     /**
109 108
     * {@inheritdoc}
110 109
     */
111
-    public function __construct(string $markup, array &$tokens, Parser $parser)
112
-    {
110
+    public function __construct(string $markup, array &$tokens, Parser $parser) {
113 111
         parent::__construct($markup, $tokens, $parser);
114 112
 
115 113
         $lexerCollection = new Lexer('/(\w+)\s+in\s+(' . Token::VARIABLE_NAME . ')/');
Please login to merge, or discard this patch.
src/Cache/ApcCache.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
     }
74 74
 
75 75
     /**
76
-    * {@inheritdoc}
77
-    */
76
+     * {@inheritdoc}
77
+     */
78 78
     public function read(string $key, bool $unserialize = true): mixed
79 79
     {
80 80
         $success = false;
@@ -84,16 +84,16 @@  discard block
 block discarded – undo
84 84
     }
85 85
 
86 86
     /**
87
-    * {@inheritdoc}
88
-    */
87
+     * {@inheritdoc}
88
+     */
89 89
     public function exists(string $key): bool
90 90
     {
91 91
         return apcu_exists($this->prefix . $key) === true;
92 92
     }
93 93
 
94 94
     /**
95
-    * {@inheritdoc}
96
-    */
95
+     * {@inheritdoc}
96
+     */
97 97
     public function write(string $key, mixed $value, bool $serialize = true): bool
98 98
     {
99 99
         return apcu_store($this->prefix . $key, $value, $this->expire);
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
 
102 102
 
103 103
     /**
104
-    * {@inheritdoc}
105
-    */
104
+     * {@inheritdoc}
105
+     */
106 106
     public function flush(bool $expired = false): bool
107 107
     {
108 108
         return apcu_clear_cache();
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,14 +56,12 @@
 block discarded – undo
56 56
  * @class ApcCache
57 57
  * @package Platine\Template\Cache
58 58
  */
59
-class ApcCache extends AbstractCache
60
-{
59
+class ApcCache extends AbstractCache {
61 60
     /**
62 61
      * Create new instance
63 62
      * @param Configuration|null $config
64 63
      */
65
-    public function __construct(?Configuration $config = null)
66
-    {
64
+    public function __construct(?Configuration $config = null) {
67 65
         parent::__construct($config);
68 66
 
69 67
         if ((!extension_loaded('apcu')) || !((bool) ini_get('apc.enabled'))) {
Please login to merge, or discard this patch.
src/Cache/MemoryCache.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
     protected array $data = [];
63 63
 
64 64
     /**
65
-    * {@inheritdoc}
66
-    */
65
+     * {@inheritdoc}
66
+     */
67 67
     public function read(string $key, bool $unserialize = false): mixed
68 68
     {
69 69
         if ($this->exists($key) === false) {
@@ -74,16 +74,16 @@  discard block
 block discarded – undo
74 74
     }
75 75
 
76 76
     /**
77
-    * {@inheritdoc}
78
-    */
77
+     * {@inheritdoc}
78
+     */
79 79
     public function exists(string $key): bool
80 80
     {
81 81
         return isset($this->data[$key]);
82 82
     }
83 83
 
84 84
     /**
85
-    * {@inheritdoc}
86
-    */
85
+     * {@inheritdoc}
86
+     */
87 87
     public function write(string $key, mixed $value, bool $serialize = false): bool
88 88
     {
89 89
         $this->data[$key] = $value;
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
 
94 94
 
95 95
     /**
96
-    * {@inheritdoc}
97
-    */
96
+     * {@inheritdoc}
97
+     */
98 98
     public function flush(bool $expired = false): bool
99 99
     {
100 100
         $this->data = [];
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
  * @class MemoryCache
54 54
  * @package Platine\Template\Cache
55 55
  */
56
-class MemoryCache extends AbstractCache
57
-{
56
+class MemoryCache extends AbstractCache {
58 57
     /**
59 58
      * The cache data
60 59
      * @var array<string, mixed>
Please login to merge, or discard this patch.
src/Cache/AbstractCache.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@  discard block
 block discarded – undo
55 55
  * @class AbstractCache
56 56
  * @package Platine\Template\Cache
57 57
  */
58
-abstract class AbstractCache
59
-{
58
+abstract class AbstractCache {
60 59
     /**
61 60
      * The cache expiration in second
62 61
      * @var int
@@ -79,8 +78,7 @@  discard block
 block discarded – undo
79 78
      * Create new instance
80 79
      * @param Configuration|null $config
81 80
      */
82
-    public function __construct(?Configuration $config = null)
83
-    {
81
+    public function __construct(?Configuration $config = null) {
84 82
         $this->config = $config ?? new Configuration([]);
85 83
 
86 84
         $this->expire = $this->config->get('cache_expire');
Please login to merge, or discard this patch.
src/Cache/FileCache.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -87,8 +87,8 @@  discard block
 block discarded – undo
87 87
     }
88 88
 
89 89
     /**
90
-    * {@inheritdoc}
91
-    */
90
+     * {@inheritdoc}
91
+     */
92 92
     public function read(string $key, bool $unserialize = true): mixed
93 93
     {
94 94
         if ($this->exists($key) === false) {
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
     }
106 106
 
107 107
     /**
108
-    * {@inheritdoc}
109
-    */
108
+     * {@inheritdoc}
109
+     */
110 110
     public function exists(string $key): bool
111 111
     {
112 112
         $file = $this->getFilePath($key);
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
     }
120 120
 
121 121
     /**
122
-    * {@inheritdoc}
123
-    */
122
+     * {@inheritdoc}
123
+     */
124 124
     public function write(string $key, mixed $value, bool $serialize = true): bool
125 125
     {
126 126
         $file = $this->getFilePath($key);
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
 
138 138
 
139 139
     /**
140
-    * {@inheritdoc}
141
-    */
140
+     * {@inheritdoc}
141
+     */
142 142
     public function flush(bool $expired = false): bool
143 143
     {
144 144
         $list = glob(sprintf('%s%s*', $this->path, $this->prefix));
Please login to merge, or discard this 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 FileCache
58 58
  * @package Platine\Template\Cache
59 59
  */
60
-class FileCache extends AbstractCache
61
-{
60
+class FileCache extends AbstractCache {
62 61
     /**
63 62
      * The cache directory to use
64 63
      * @var string
@@ -69,8 +68,7 @@  discard block
 block discarded – undo
69 68
      * Create new instance
70 69
      * @param Configuration|null $config
71 70
      */
72
-    public function __construct(?Configuration $config = null)
73
-    {
71
+    public function __construct(?Configuration $config = null) {
74 72
         parent::__construct($config);
75 73
         $dir = $this->config->get('cache_dir');
76 74
         $path = Helper::normalizePath($dir);
Please login to merge, or discard this patch.
src/Cache/NullCache.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -56,24 +56,24 @@  discard block
 block discarded – undo
56 56
 class NullCache extends AbstractCache
57 57
 {
58 58
     /**
59
-    * {@inheritdoc}
60
-    */
59
+     * {@inheritdoc}
60
+     */
61 61
     public function read(string $key, bool $unserialize = false): mixed
62 62
     {
63 63
         return false;
64 64
     }
65 65
 
66 66
     /**
67
-    * {@inheritdoc}
68
-    */
67
+     * {@inheritdoc}
68
+     */
69 69
     public function exists(string $key): bool
70 70
     {
71 71
         return false;
72 72
     }
73 73
 
74 74
     /**
75
-    * {@inheritdoc}
76
-    */
75
+     * {@inheritdoc}
76
+     */
77 77
     public function write(string $key, mixed $value, bool $serialize = false): bool
78 78
     {
79 79
         return true;
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
 
82 82
 
83 83
     /**
84
-    * {@inheritdoc}
85
-    */
84
+     * {@inheritdoc}
85
+     */
86 86
     public function flush(bool $expired = false): bool
87 87
     {
88 88
         return true;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
  * @class NullCache
54 54
  * @package Platine\Template\Cache
55 55
  */
56
-class NullCache extends AbstractCache
57
-{
56
+class NullCache extends AbstractCache {
58 57
     /**
59 58
     * {@inheritdoc}
60 59
     */
Please login to merge, or discard this patch.
src/Filter/HtmlFilter.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
  * @class HtmlFilter
56 56
  * @package Platine\Template\Filter
57 57
  */
58
-class HtmlFilter extends AbstractFilter
59
-{
58
+class HtmlFilter extends AbstractFilter {
60 59
     /**
61 60
      * Replace new line to <br />
62 61
      * @param mixed $variable
Please login to merge, or discard this patch.
src/Filter/DatetimeFilter.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
      * @param string $format
65 65
      * @return string|mixed
66 66
      */
67
-    public static function date(string|DateTimeInterface|int|null $variable, string $format): mixed
67
+    public static function date(string | DateTimeInterface | int | null $variable, string $format): mixed
68 68
     {
69 69
         if ($variable === null) {
70 70
             return null;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@
 block discarded – undo
56 56
  * @class DatetimeFilter
57 57
  * @package Platine\Template\Filter
58 58
  */
59
-class DatetimeFilter extends AbstractFilter
60
-{
59
+class DatetimeFilter extends AbstractFilter {
61 60
     /**
62 61
      * Formats a date
63 62
      * @param string|DateTimeInterface|int|null $variable
Please login to merge, or discard this patch.