Passed
Push — v5.x ( 080647...00e299 )
by Thierry
02:31
created
src/Plugin/Response/JQuery/JQueryPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
     public function selector(string $sPath = '', $xContext = null): DomSelector
76 76
     {
77 77
         $xSelector = new DomSelector($sPath, $xContext);
78
-        if($this->bCommand && $this->response() !== null)
78
+        if ($this->bCommand && $this->response() !== null)
79 79
         {
80 80
             $this->addCommand('jquery.call', ['selector' => $xSelector]);
81 81
         }
Please login to merge, or discard this patch.
src/Plugin/Response/DataBag/DataBagPlugin.php 1 patch
Spacing   +4 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     private function initDataBag()
41 41
     {
42
-        if($this->xDataBag !== null)
42
+        if ($this->xDataBag !== null)
43 43
         {
44 44
             return;
45 45
         }
@@ -48,8 +48,7 @@  discard block
 block discarded – undo
48 48
         $aBody = $xRequest->getParsedBody();
49 49
         $aParams = $xRequest->getQueryParams();
50 50
         $aData = is_array($aBody) ?
51
-            $this->readData($aBody['jxnbags'] ?? []) :
52
-            $this->readData($aParams['jxnbags'] ?? []);
51
+            $this->readData($aBody['jxnbags'] ?? []) : $this->readData($aParams['jxnbags'] ?? []);
53 52
         $this->xDataBag = new DataBag($aData);
54 53
     }
55 54
 
@@ -70,8 +69,7 @@  discard block
 block discarded – undo
70 69
     {
71 70
         // Todo: clean input data.
72 71
         return is_string($xData) ?
73
-            (json_decode($xData, true) ?: []) :
74
-            (is_array($xData) ? $xData : []);
72
+            (json_decode($xData, true) ?: []) : (is_array($xData) ? $xData : []);
75 73
     }
76 74
 
77 75
     /**
@@ -89,7 +87,7 @@  discard block
 block discarded – undo
89 87
     public function writeCommand()
90 88
     {
91 89
         $this->initDataBag();
92
-        if($this->xDataBag->touched())
90
+        if ($this->xDataBag->touched())
93 91
         {
94 92
             $this->addCommand('databag.set', ['values' => $this->xDataBag]);
95 93
         }
Please login to merge, or discard this patch.
src/Response/Traits/ScriptTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      *
29 29
      * @return ResponseInterface
30 30
      */
31
-    abstract public function addCommand(string $sName, array|JsonSerializable $aOptions): ResponseInterface;
31
+    abstract public function addCommand(string $sName, array | JsonSerializable $aOptions): ResponseInterface;
32 32
 
33 33
     /**
34 34
      * Response command that prompts user with [ok] [cancel] style message box
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     {
61 61
         $aArgs = func_get_args();
62 62
         array_shift($aArgs);
63
-        return $this->addCommand('script.call', ['func' => $this->str($sFunc),'args' => $aArgs]);
63
+        return $this->addCommand('script.call', ['func' => $this->str($sFunc), 'args' => $aArgs]);
64 64
     }
65 65
 
66 66
     /**
Please login to merge, or discard this patch.