Passed
Push — develop ( c77ba7...d3c53a )
by nguereza
04:05
created
src/Helper/Mermaid/Graph/Link.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 {
58 58
     /**
59 59
      * Constants
60
-    */
60
+     */
61 61
     public const ARROW  = 1;
62 62
     public const LINE   = 2;
63 63
     public const DOTTED = 3;
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 Link
54 54
  * @package Platine\Framework\Helper\Mermaid\Graph
55 55
  */
56
-class Link implements Stringable
57
-{
56
+class Link implements Stringable {
58 57
     /**
59 58
      * Constants
60 59
     */
Please login to merge, or discard this patch.
src/Helper/Mermaid/Graph/Graph.php 2 patches
Indentation   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -55,67 +55,67 @@  discard block
 block discarded – undo
55 55
  */
56 56
 class Graph implements Stringable
57 57
 {
58
-   /**
59
-    * Constants
60
-   */
58
+    /**
59
+     * Constants
60
+     */
61 61
     public const TOP_BOTTOM = 'TB';
62 62
     public const BOTTOM_TOP = 'BT';
63 63
     public const LEFT_RIGHT = 'LR';
64 64
     public const RIGHT_LEFT = 'RL';
65 65
 
66
-   /**
67
-    * Space for each sub graph
68
-    */
66
+    /**
67
+     * Space for each sub graph
68
+     */
69 69
     private const RENDER_SHIFT = 4;
70 70
 
71
-   /**
72
-    * The list of sub graph
73
-    * @var array<Graph>
74
-    */
71
+    /**
72
+     * The list of sub graph
73
+     * @var array<Graph>
74
+     */
75 75
     protected array $subGraphs = [];
76 76
 
77
-   /**
78
-    * The list of nodes
79
-    * @var array<string, Node>
80
-    */
77
+    /**
78
+     * The list of nodes
79
+     * @var array<string, Node>
80
+     */
81 81
     protected array $nodes = [];
82 82
 
83
-   /**
84
-    * The list of links
85
-    * @var array<Link>
86
-    */
83
+    /**
84
+     * The list of links
85
+     * @var array<Link>
86
+     */
87 87
     protected array $links = [];
88 88
 
89
-   /**
90
-    * The graph parameter
91
-    * @var array<string, mixed>
92
-    */
89
+    /**
90
+     * The graph parameter
91
+     * @var array<string, mixed>
92
+     */
93 93
     protected array $params = [
94
-       'title' => 'Graph',
95
-       'direction' => self::LEFT_RIGHT,
94
+        'title' => 'Graph',
95
+        'direction' => self::LEFT_RIGHT,
96 96
     ];
97 97
 
98
-   /**
99
-    * Style list
100
-    * @var array<string>
101
-    */
98
+    /**
99
+     * Style list
100
+     * @var array<string>
101
+     */
102 102
     protected array $styles = [];
103 103
 
104
-   /**
105
-    * Create new instance
106
-    * @param array<string, mixed> $params
107
-    */
104
+    /**
105
+     * Create new instance
106
+     * @param array<string, mixed> $params
107
+     */
108 108
     public function __construct(array $params = [])
109 109
     {
110 110
         $this->setParams($params);
111 111
     }
112 112
 
113
-   /**
114
-    * Render the graph to string representation
115
-    * @param bool $isMainGraph
116
-    * @param int $shift
117
-    * @return string
118
-    */
113
+    /**
114
+     * Render the graph to string representation
115
+     * @param bool $isMainGraph
116
+     * @param int $shift
117
+     * @return string
118
+     */
119 119
     public function render(bool $isMainGraph = true, int $shift = 0): string
120 120
     {
121 121
         $spaces = str_repeat(' ', $shift);
@@ -171,11 +171,11 @@  discard block
 block discarded – undo
171 171
         return implode(PHP_EOL, $result);
172 172
     }
173 173
 
174
-   /**
175
-    * Add new node
176
-    * @param Node $node
177
-    * @return $this
178
-    */
174
+    /**
175
+     * Add new node
176
+     * @param Node $node
177
+     * @return $this
178
+     */
179 179
     public function addNode(Node $node): self
180 180
     {
181 181
         $this->nodes[$node->getId()] = $node;
@@ -183,11 +183,11 @@  discard block
 block discarded – undo
183 183
         return $this;
184 184
     }
185 185
 
186
-   /**
187
-    * Add new link
188
-    * @param Link $link
189
-    * @return $this
190
-    */
186
+    /**
187
+     * Add new link
188
+     * @param Link $link
189
+     * @return $this
190
+     */
191 191
     public function addLink(Link $link): self
192 192
     {
193 193
         $this->links[] = $link;
@@ -195,11 +195,11 @@  discard block
 block discarded – undo
195 195
         return $this;
196 196
     }
197 197
 
198
-   /**
199
-    * Add new style
200
-    * @param string $style
201
-    * @return $this
202
-    */
198
+    /**
199
+     * Add new style
200
+     * @param string $style
201
+     * @return $this
202
+     */
203 203
     public function addStyle(string $style): self
204 204
     {
205 205
         $this->styles[] = $style;
@@ -207,11 +207,11 @@  discard block
 block discarded – undo
207 207
         return $this;
208 208
     }
209 209
 
210
-   /**
211
-    * Add new sub graph
212
-    * @param Graph $subGraph
213
-    * @return $this
214
-    */
210
+    /**
211
+     * Add new sub graph
212
+     * @param Graph $subGraph
213
+     * @return $this
214
+     */
215 215
     public function addSubGraph(Graph $subGraph): self
216 216
     {
217 217
         $this->subGraphs[] = $subGraph;
@@ -219,67 +219,67 @@  discard block
 block discarded – undo
219 219
         return $this;
220 220
     }
221 221
 
222
-   /**
223
-    * Return the string representation
224
-    * @return string
225
-    */
222
+    /**
223
+     * Return the string representation
224
+     * @return string
225
+     */
226 226
     public function __toString(): string
227 227
     {
228 228
         return $this->render();
229 229
     }
230 230
 
231 231
 
232
-   /**
233
-    * Return the parameters
234
-    * @return array<string, mixed>
235
-    */
232
+    /**
233
+     * Return the parameters
234
+     * @return array<string, mixed>
235
+     */
236 236
     public function getParams(): array
237 237
     {
238 238
         return $this->params;
239 239
     }
240 240
 
241
-   /**
242
-    * Set the parameters
243
-    * @param array<string, mixed> $params
244
-    * @return $this
245
-    */
241
+    /**
242
+     * Set the parameters
243
+     * @param array<string, mixed> $params
244
+     * @return $this
245
+     */
246 246
     public function setParams(array $params)
247 247
     {
248 248
         $this->params = array_merge($this->params, $params);
249 249
         return $this;
250 250
     }
251 251
 
252
-   /**
253
-    * Return the list of sub graph
254
-    * @return array<Graph>
255
-    */
252
+    /**
253
+     * Return the list of sub graph
254
+     * @return array<Graph>
255
+     */
256 256
     public function getSubGraphs(): array
257 257
     {
258 258
         return $this->subGraphs;
259 259
     }
260 260
 
261
-   /**
262
-    * Return the list of node
263
-    * @return array<string, Node>
264
-    */
261
+    /**
262
+     * Return the list of node
263
+     * @return array<string, Node>
264
+     */
265 265
     public function getNodes(): array
266 266
     {
267 267
         return $this->nodes;
268 268
     }
269 269
 
270
-   /**
271
-    * Return the list of link
272
-    * @return array<Link>
273
-    */
270
+    /**
271
+     * Return the list of link
272
+     * @return array<Link>
273
+     */
274 274
     public function getLinks(): array
275 275
     {
276 276
         return $this->links;
277 277
     }
278 278
 
279
-   /**
280
-    * Return the list of style
281
-    * @return array<string>
282
-    */
279
+    /**
280
+     * Return the list of style
281
+     * @return array<string>
282
+     */
283 283
     public function getStyles(): array
284 284
     {
285 285
         return $this->styles;
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
  * @class Graph
54 54
  * @package Platine\Framework\Helper\Mermaid\Graph
55 55
  */
56
-class Graph implements Stringable
57
-{
56
+class Graph implements Stringable {
58 57
    /**
59 58
     * Constants
60 59
    */
@@ -105,8 +104,7 @@  discard block
 block discarded – undo
105 104
     * Create new instance
106 105
     * @param array<string, mixed> $params
107 106
     */
108
-    public function __construct(array $params = [])
109
-    {
107
+    public function __construct(array $params = []) {
110 108
         $this->setParams($params);
111 109
     }
112 110
 
@@ -243,8 +241,7 @@  discard block
 block discarded – undo
243 241
     * @param array<string, mixed> $params
244 242
     * @return $this
245 243
     */
246
-    public function setParams(array $params)
247
-    {
244
+    public function setParams(array $params) {
248 245
         $this->params = array_merge($this->params, $params);
249 246
         return $this;
250 247
     }
Please login to merge, or discard this patch.
src/Helper/Mermaid/Graph/Helper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
  * @class Helper
52 52
  * @package Platine\Framework\Helper\Mermaid\Graph
53 53
  */
54
-class Helper
55
-{
54
+class Helper {
56 55
     /**
57 56
      * Escape the given text
58 57
      * @param string $text
Please login to merge, or discard this patch.
src/Helper/Mermaid/Graph/Node.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 {
58 58
     /**
59 59
      * Constants
60
-    */
60
+     */
61 61
     public const SQUARE            = '[%s]';
62 62
     public const ROUND             = '(%s)';
63 63
     public const CIRCLE            = '((%s))';
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 Node
54 54
  * @package Platine\Framework\Helper\Mermaid\Graph
55 55
  */
56
-class Node implements Stringable
57
-{
56
+class Node implements Stringable {
58 57
     /**
59 58
      * Constants
60 59
     */
Please login to merge, or discard this patch.
src/Helper/Flash.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,14 +53,12 @@
 block discarded – undo
53 53
  * @class Flash
54 54
  * @package Platine\Framework\Helper
55 55
  */
56
-class Flash
57
-{
56
+class Flash {
58 57
     /**
59 58
      * Create new instance
60 59
      * @param Session $session
61 60
      */
62
-    public function __construct(protected Session $session)
63
-    {
61
+    public function __construct(protected Session $session) {
64 62
     }
65 63
 
66 64
     /**
Please login to merge, or discard this patch.
src/Security/Csrf/Storage/CsrfSessionStorage.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
  * @class CsrfSessionStorage
55 55
  * @package Platine\Framework\Security\Csrf\Storage
56 56
  */
57
-class CsrfSessionStorage implements CsrfStorageInterface
58
-{
57
+class CsrfSessionStorage implements CsrfStorageInterface {
59 58
     /**
60 59
      * The session key used to store CSRF data
61 60
      */
@@ -66,8 +65,7 @@  discard block
 block discarded – undo
66 65
      * Create new instance
67 66
      * @param Session $session
68 67
      */
69
-    public function __construct(protected Session $session)
70
-    {
68
+    public function __construct(protected Session $session) {
71 69
     }
72 70
 
73 71
 
Please login to merge, or discard this patch.
src/Security/Policy/AbstractPolicy.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,14 +52,12 @@
 block discarded – undo
52 52
  * @class AbstractPolicy
53 53
  * @package Platine\Framework\Security\Policy
54 54
  */
55
-abstract class AbstractPolicy
56
-{
55
+abstract class AbstractPolicy {
57 56
     /**
58 57
      * Create new instance
59 58
      * @param array<string, mixed> $configurations
60 59
      */
61
-    public function __construct(protected array $configurations = [])
62
-    {
60
+    public function __construct(protected array $configurations = []) {
63 61
     }
64 62
 
65 63
     /**
Please login to merge, or discard this patch.
src/Service/ServiceProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
      */
140 140
     public function listen(
141 141
         string $eventName,
142
-        ListenerInterface|callable|string $listener,
142
+        ListenerInterface | callable | string $listener,
143 143
         int $priority = DispatcherInterface::PRIORITY_DEFAULT
144 144
     ): self {
145 145
         $this->app->listen($eventName, $listener, $priority);
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 ServiceProvider
58 58
  * @package Platine\Framework\Service
59 59
  */
60
-class ServiceProvider
61
-{
60
+class ServiceProvider {
62 61
     /**
63 62
      * Provider command list
64 63
      * @var class-string[]
@@ -75,8 +74,7 @@  discard block
 block discarded – undo
75 74
      * Create new instance
76 75
      * @param Application $app
77 76
      */
78
-    public function __construct(protected Application $app)
79
-    {
77
+    public function __construct(protected Application $app) {
80 78
     }
81 79
 
82 80
     /**
Please login to merge, or discard this patch.
src/Migration/Command/MigrationCreateCommand.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
     ) {
82 82
         parent::__construct($app, $repository, $config, $filesystem);
83 83
         $this->setName('migration:create')
84
-             ->setDescription('Create a new migration');
84
+                ->setDescription('Create a new migration');
85 85
 
86 86
         $this->addArgument('name', 'name of migration', null, false);
87 87
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@
 block discarded – undo
61 61
  * @template T
62 62
  * @extends AbstractCommand<T>
63 63
  */
64
-class MigrationCreateCommand extends AbstractCommand
65
-{
64
+class MigrationCreateCommand extends AbstractCommand {
66 65
     /**
67 66
      * The migration name
68 67
      * @var string
Please login to merge, or discard this patch.