Passed
Push — main ( 525366...99eb4f )
by Thierry
03:58
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/callables/object.js.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,8 @@  discard block
 block discarded – undo
6 6
 if(<?php echo $sJsClass ?> === undefined) {
7 7
     <?php echo $sJsClass ?> = {};
8 8
 }
9
-<?php else: ?>
9
+<?php else {
10
+    : ?>
10 11
 <?php echo $sJsClass ?> = {};
11 12
 <?php endif ?>
12 13
 <?php foreach($this->aMethods as $aMethod): ?>
@@ -17,3 +18,4 @@  discard block
 block discarded – undo
17 18
         echo $sKey ?>: <?php echo $sValue ?><?php endforeach ?> });
18 19
 };
19 20
 <?php endforeach;
21
+}
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,18 +2,18 @@
 block discarded – undo
2 2
 <?php
3 3
 // An exported PHP class can have the same name as a subdir in the same parent dir.
4 4
 // So, we must make sure that embedded js objects do not already exist, before we create them.
5
-if(strpos($sJsClass, '.') !== false): ?>
5
+if (strpos($sJsClass, '.') !== false): ?>
6 6
 if(<?php echo $sJsClass ?> === undefined) {
7 7
     <?php echo $sJsClass ?> = {};
8 8
 }
9 9
 <?php else: ?>
10 10
 <?php echo $sJsClass ?> = {};
11 11
 <?php endif ?>
12
-<?php foreach($this->aMethods as $aMethod): ?>
12
+<?php foreach ($this->aMethods as $aMethod): ?>
13 13
 <?php echo $sJsClass ?>.<?php echo $aMethod['name'] ?> = function() {
14 14
     return jaxon.request({ type: 'class', name: '<?php echo $this->sClass ?>', method: '<?php
15 15
         echo $aMethod['name'] ?>' }, { parameters: arguments<?php
16
-        foreach($aMethod['options'] as $sKey => $sValue): ?>, <?php
16
+        foreach ($aMethod['options'] as $sKey => $sValue): ?>, <?php
17 17
         echo $sKey ?>: <?php echo $sValue ?><?php endforeach ?> });
18 18
 };
19 19
 <?php endforeach;
Please login to merge, or discard this patch.
jaxon-core/templates/callables/function.js.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php echo $this->sJsName ?> = function() {
2 2
     return jaxon.request({ type: 'func', name: '<?php
3 3
         echo $this->sName ?>' }, { parameters: arguments<?php
4
-        foreach($this->aOptions as $sKey => $sValue): ?>, <?php
4
+        foreach ($this->aOptions as $sKey => $sValue): ?>, <?php
5 5
         echo $sKey ?>: <?php echo $sValue ?><?php endforeach ?> });
6 6
 };
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.