Passed
Push — main ( fd5484...10601e )
by Thierry
05:13
created
jaxon-core/templates/pagination/wrapper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <ul class="pagination"><?php
2
-    if(($this->prev))
2
+    if (($this->prev))
3 3
     {
4 4
         echo $this->prev;
5 5
     }
6
-    foreach($this->links as $link)
6
+    foreach ($this->links as $link)
7 7
     {
8 8
         echo $link;
9 9
     }
10
-    if(($this->next))
10
+    if (($this->next))
11 11
     {
12 12
         echo $this->next;
13 13
     }
Please login to merge, or discard this patch.
jaxon-core/templates/plugins/config.js.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,20 +6,20 @@
 block discarded – undo
6 6
 jaxon.config.defaultMethod = "<?php echo $this->sDefaultMethod ?>";
7 7
 jaxon.config.responseType = "<?php echo $this->sResponseType ?>";
8 8
 
9
-<?php if($this->nResponseQueueSize > 0): ?>
9
+<?php if ($this->nResponseQueueSize > 0): ?>
10 10
 jaxon.config.responseQueueSize = <?php echo $this->nResponseQueueSize ?>;
11 11
 <?php endif ?>
12 12
 
13
-<?php if(($this->bDebug)): ?>
13
+<?php if (($this->bDebug)): ?>
14 14
 jaxon.debug.active = true;
15
-<?php if(($this->sDebugOutputID)): ?>
15
+<?php if (($this->sDebugOutputID)): ?>
16 16
 jaxon.debug.outputID = "<?php echo $this->sDebugOutputID ?>";
17 17
 <?php endif ?>
18
-<?php if(($this->bVerboseDebug)): ?>
18
+<?php if (($this->bVerboseDebug)): ?>
19 19
 jaxon.debug.verbose.active = true;
20 20
 <?php endif ?>
21 21
 <?php endif ?>
22 22
 
23
-<?php if(($this->sCsrfMetaName)): ?>
23
+<?php if (($this->sCsrfMetaName)): ?>
24 24
 jaxon.setCsrf('<?php echo $this->sCsrfMetaName ?>');
25 25
 <?php endif ?>
Please login to merge, or discard this patch.
jaxon-core/templates/plugins/wrapper.js.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php if(($this->sScript)): ?>
1
+<?php if (($this->sScript)): ?>
2 2
 <script type="text/javascript" <?php echo $this->sJsOptions ?> charset="UTF-8">
3 3
 /* <![CDATA[ */
4 4
 <?php echo $this->sScript, "\n" ?>
Please login to merge, or discard this patch.
jaxon-core/templates/plugins/includes.js.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,3 +1,3 @@
 block discarded – undo
1
-<?php foreach($this->aUrls as $sUrl):
1
+<?php foreach ($this->aUrls as $sUrl):
2 2
 $this->include('jaxon::plugins/include.js', ['sUrl' => $sUrl, 'sJsOptions' => $this->sJsOptions]);
3 3
 endforeach;
Please login to merge, or discard this patch.
jaxon-core/src/Di/Container.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -237,7 +237,7 @@
 block discarded – undo
237 237
      */
238 238
     public function val(string $sKey, $xValue)
239 239
     {
240
-       $this->xLibContainer->offsetSet($sKey, $xValue);
240
+        $this->xLibContainer->offsetSet($sKey, $xValue);
241 241
     }
242 242
 
243 243
     /**
Please login to merge, or discard this patch.
Spacing   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -120,8 +120,7 @@  discard block
 block discarded – undo
120 120
     public function setLogger(LoggerInterface|Closure $xLogger)
121 121
     {
122 122
         is_a($xLogger, LoggerInterface::class) ?
123
-            $this->val(LoggerInterface::class, $xLogger) :
124
-            $this->set(LoggerInterface::class, $xLogger);
123
+            $this->val(LoggerInterface::class, $xLogger) : $this->set(LoggerInterface::class, $xLogger);
125 124
     }
126 125
 
127 126
     /**
@@ -200,7 +199,7 @@  discard block
 block discarded – undo
200 199
             return $this->xAppContainer != null && $this->xAppContainer->has($sClass) ?
201 200
                 $this->xAppContainer->get($sClass) : $this->xLibContainer->offsetGet($sClass);
202 201
         }
203
-        catch(Exception|Throwable $e)
202
+        catch (Exception|Throwable $e)
204 203
         {
205 204
             $xLogger = $this->g(LoggerInterface::class);
206 205
             $xTranslator = $this->g(Translator::class);
@@ -266,15 +265,15 @@  discard block
 block discarded – undo
266 265
     {
267 266
         $xType = $xParameter->getType();
268 267
         // Check the parameter class first.
269
-        if($xType instanceof ReflectionNamedType)
268
+        if ($xType instanceof ReflectionNamedType)
270 269
         {
271 270
             // Check the class + the name
272
-            if($this->has($xType->getName() . ' $' . $xParameter->getName()))
271
+            if ($this->has($xType->getName() . ' $' . $xParameter->getName()))
273 272
             {
274 273
                 return $this->get($xType->getName() . ' $' . $xParameter->getName());
275 274
             }
276 275
             // Check the class only
277
-            if($this->has($xType->getName()))
276
+            if ($this->has($xType->getName()))
278 277
             {
279 278
                 return $this->get($xType->getName());
280 279
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -199,8 +199,7 @@
 block discarded – undo
199 199
         {
200 200
             return $this->xAppContainer != null && $this->xAppContainer->has($sClass) ?
201 201
                 $this->xAppContainer->get($sClass) : $this->xLibContainer->offsetGet($sClass);
202
-        }
203
-        catch(Exception|Throwable $e)
202
+        } catch(Exception|Throwable $e)
204 203
         {
205 204
             $xLogger = $this->g(LoggerInterface::class);
206 205
             $xTranslator = $this->g(Translator::class);
Please login to merge, or discard this patch.
jaxon-core/src/Di/Traits/MetadataTrait.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,6 @@
 block discarded – undo
37 37
     public function getMetadataReader(string $sReaderId): MetadataReaderInterface
38 38
     {
39 39
         return $this->h("metadata_reader_$sReaderId") ?
40
-            $this->g("metadata_reader_$sReaderId") :
41
-            $this->g('metadata_reader_null');
40
+            $this->g("metadata_reader_$sReaderId") : $this->g('metadata_reader_null');
42 41
     }
43 42
 }
Please login to merge, or discard this patch.
jaxon-core/src/Di/Traits/DiAutoTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,13 +42,13 @@
 block discarded – undo
42 42
      */
43 43
     public function make(string|ReflectionClass $xClass): mixed
44 44
     {
45
-        if(is_string($xClass))
45
+        if (is_string($xClass))
46 46
         {
47 47
             // Create the reflection class instance
48 48
             $xClass = new ReflectionClass($xClass);
49 49
         }
50 50
         // Use the Reflection class to get the parameters of the constructor
51
-        if(($constructor = $xClass->getConstructor()) === null)
51
+        if (($constructor = $xClass->getConstructor()) === null)
52 52
         {
53 53
             return $xClass->newInstance();
54 54
         }
Please login to merge, or discard this patch.
jaxon-core/src/Di/Traits/PsrTrait.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
             $xParameterReader = $di->g(ParameterReader::class);
59 59
             $xRequest = $di->g(ServerRequestInterface::class);
60 60
             $aRequestParameter = $xParameterReader->getRequestParameter($xRequest);
61
-            return !is_array($aRequestParameter) ? $xRequest :
62
-                $xRequest->withAttribute('jxncall', $aRequestParameter);
61
+            return !is_array($aRequestParameter) ? $xRequest : $xRequest->withAttribute('jxncall', $aRequestParameter);
63 62
         });
64 63
         // PSR factory
65 64
         $this->set(PsrFactory::class, function($di) {
Please login to merge, or discard this patch.
jaxon-core/src/Di/Traits/PluginTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
     public function registerPackage(string $sClassName, array $aUserOptions): void
194 194
     {
195 195
         // Register the user class, but only if the user didn't already.
196
-        if(!$this->h($sClassName))
196
+        if (!$this->h($sClassName))
197 197
         {
198 198
             $this->set($sClassName, fn() => $this->make($sClassName));
199 199
         }
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         $this->set($sConfigKey, function($di) use($aUserOptions) {
204 204
             $xOptionsProvider = $aUserOptions['provider'] ?? null;
205 205
             // The user can provide a callable that returns the package options.
206
-            if(is_callable($xOptionsProvider))
206
+            if (is_callable($xOptionsProvider))
207 207
             {
208 208
                 $aUserOptions = $xOptionsProvider($aUserOptions);
209 209
             }
Please login to merge, or discard this patch.