Passed
Push — main ( 723415...fef313 )
by Thierry
11:06
created
src/Plugin/Manager/PluginManager.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -124,28 +124,28 @@  discard block
 block discarded – undo
124 124
     {
125 125
         $bIsUsed = false;
126 126
         $aInterfaces = class_implements($sClassName);
127
-        if(in_array(CodeGeneratorInterface::class, $aInterfaces))
127
+        if (in_array(CodeGeneratorInterface::class, $aInterfaces))
128 128
         {
129 129
             $this->xCodeGenerator->addCodeGenerator($sClassName, $nPriority);
130 130
             $bIsUsed = true;
131 131
         }
132
-        if(in_array(CallableRegistryInterface::class, $aInterfaces))
132
+        if (in_array(CallableRegistryInterface::class, $aInterfaces))
133 133
         {
134 134
             $this->aRegistryPlugins[$sPluginName] = $sClassName;
135 135
             $bIsUsed = true;
136 136
         }
137
-        if(in_array(RequestHandlerInterface::class, $aInterfaces))
137
+        if (in_array(RequestHandlerInterface::class, $aInterfaces))
138 138
         {
139 139
             $this->aRequestHandlers[$sPluginName] = $sClassName;
140 140
             $bIsUsed = true;
141 141
         }
142
-        if(in_array(ResponsePluginInterface::class, $aInterfaces))
142
+        if (in_array(ResponsePluginInterface::class, $aInterfaces))
143 143
         {
144 144
             $this->aResponsePlugins[$sPluginName] = $sClassName;
145 145
             $bIsUsed = true;
146 146
         }
147 147
 
148
-        if(!$bIsUsed)
148
+        if (!$bIsUsed)
149 149
         {
150 150
             // The class is invalid.
151 151
             $sMessage = $this->xTranslator->trans('errors.register.invalid', ['name' => $sClassName]);
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         }
154 154
 
155 155
         // Register the plugin in the DI container, if necessary
156
-        if(!$this->di->has($sClassName))
156
+        if (!$this->di->has($sClassName))
157 157
         {
158 158
             $this->di->auto($sClassName);
159 159
         }
@@ -169,12 +169,12 @@  discard block
 block discarded – undo
169 169
      */
170 170
     public function getResponsePlugin(string $sName, ?ResponseInterface $xResponse = null): ?ResponsePlugin
171 171
     {
172
-        if(!isset($this->aResponsePlugins[$sName]))
172
+        if (!isset($this->aResponsePlugins[$sName]))
173 173
         {
174 174
             return null;
175 175
         }
176 176
         $xPlugin = $this->di->g($this->aResponsePlugins[$sName]);
177
-        if(($xResponse))
177
+        if (($xResponse))
178 178
         {
179 179
             $xPlugin->setResponse($xResponse);
180 180
         }
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
      */
196 196
     public function registerCallable(string $sType, string $sCallable, $xOptions = [])
197 197
     {
198
-        if(isset($this->aRegistryPlugins[$sType]) &&
198
+        if (isset($this->aRegistryPlugins[$sType]) &&
199 199
             ($xPlugin = $this->di->g($this->aRegistryPlugins[$sType])))
200 200
         {
201 201
             $xPlugin->register($sType, $sCallable, $xPlugin->checkOptions($sCallable, $xOptions));
Please login to merge, or discard this patch.
src/Response/Response.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public function getOutput(): string
88 88
     {
89
-        if($this->getCommandCount() === 0)
89
+        if ($this->getCommandCount() === 0)
90 90
         {
91 91
             return '{}';
92 92
         }
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     public function addCommand(array $aAttributes, $mData): ResponseInterface
176 176
     {
177 177
         $aAttributes = array_map(function($xAttribute) {
178
-            return is_integer($xAttribute) ? $xAttribute : trim((string)$xAttribute, " \t");
178
+            return is_integer($xAttribute) ? $xAttribute : trim((string) $xAttribute, " \t");
179 179
         }, $aAttributes);
180 180
         return $this->addRawCommand($aAttributes, $mData);
181 181
     }
@@ -194,9 +194,9 @@  discard block
 block discarded – undo
194 194
         $mData, bool $bRemoveEmpty = false): ResponseInterface
195 195
     {
196 196
         $mData = is_array($mData) ? array_map(function($sData) {
197
-            return trim((string)$sData, " \t\n");
198
-        }, $mData) : trim((string)$mData, " \t\n");
199
-        if($bRemoveEmpty)
197
+            return trim((string) $sData, " \t\n");
198
+        }, $mData) : trim((string) $mData, " \t\n");
199
+        if ($bRemoveEmpty)
200 200
         {
201 201
             $aAttributes = array_filter($aAttributes, function($xValue) {
202 202
                 return $xValue === '';
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
     public function toPsr(): PsrResponseInterface
230 230
     {
231 231
         $xPsrResponse = $this->xPsr17Factory->createResponse(200);
232
-        if($this->xRequest->getMethod() === 'GET')
232
+        if ($this->xRequest->getMethod() === 'GET')
233 233
         {
234 234
             $xPsrResponse = $xPsrResponse
235 235
                 ->withHeader('Expires', 'Mon, 26 Jul 1997 05:00:00 GMT')
Please login to merge, or discard this patch.