Passed
Push — develop ( 96efe9...5c0545 )
by Jens
02:56
created
src/components/cms/FilesRouting.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     }
69 69
 
70 70
     /**
71
-     * @param $request
71
+     * @param Request $request
72 72
      * @param CmsComponent $cmsComponent
73 73
      */
74 74
     private function newRoute($request, $cmsComponent)
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     }
84 84
 
85 85
     /**
86
-     * @param $request
86
+     * @param Request $request
87 87
      * @param CmsComponent $cmsComponent
88 88
      */
89 89
     private function deleteRoute($request, $cmsComponent)
Please login to merge, or discard this patch.
src/components/FormComponent.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     }
183 183
 
184 184
     /**
185
-     * @param \cc\Request $request
185
+     * @param \CloudControl\Cms\cc\Request $request
186 186
      * @return array
187 187
      */
188 188
     private function getPostValues($request)
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
     }
294 294
 
295 295
     /**
296
-     * @return \cc\Request
296
+     * @return \CloudControl\Cms\cc\Request
297 297
      */
298 298
     private function setPathBackup()
299 299
     {
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
     }
308 308
 
309 309
     /**
310
-     * @param \cc\Request $request
310
+     * @param \CloudControl\Cms\cc\Request $request
311 311
      */
312 312
     private function resetPathBackup($request)
313 313
     {
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
     }
320 320
 
321 321
     /**
322
-     * @param $form
322
+     * @param string|null $form
323 323
      */
324 324
     private function setFormParameter($form)
325 325
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
         if (isset($_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID])) {
164 164
             $this->formId = $_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID];
165 165
         } else {
166
-            $_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID] = (string)microtime(true);
166
+            $_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID] = (string) microtime(true);
167 167
             $_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName]['submitted'] = false;
168 168
             $this->formId = $_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID];
169 169
         }
Please login to merge, or discard this patch.
src/images/Image.php 1 patch
Doc Comments   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
          * @param string $imagePath
77 77
          * @param bool $getExtension
78 78
          *
79
-         * @return bool|int|string
79
+         * @return integer
80 80
          */
81 81
         public function getImageMimeType($imagePath, $getExtension = false)
82 82
         {
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         }
150 150
 
151 151
         /**
152
-         * @param $pathToBitmapFile
152
+         * @param string $pathToBitmapFile
153 153
          *
154 154
          * @return string
155 155
          */
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         }
166 166
 
167 167
         /**
168
-         * @param $header
168
+         * @param string $header
169 169
          *
170 170
          * @return array
171 171
          */
@@ -195,14 +195,14 @@  discard block
 block discarded – undo
195 195
          * Loop through the data in the body of the bitmap
196 196
          * file and calculate each individual pixel based on the
197 197
          * bytes
198
-         * @param $bodySize
199
-         * @param $x
198
+         * @param integer $bodySize
199
+         * @param integer $x
200 200
          * @param $width
201
-         * @param $usePadding
202
-         * @param $y
201
+         * @param boolean $usePadding
202
+         * @param integer $y
203 203
          * @param $height
204
-         * @param $body
205
-         * @param $image
204
+         * @param string $body
205
+         * @param resource $image
206 206
          */
207 207
         private function loopThroughBodyAndCalculatePixels($bodySize, $x, $width, $usePadding, $y, $height, $body, $image)
208 208
         {
Please login to merge, or discard this patch.
src/storage/storage/FilesStorage.php 1 patch
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,6 +10,10 @@  discard block
 block discarded – undo
10 10
 {
11 11
     protected $filesDir;
12 12
 
13
+    /**
14
+     * @param \CloudControl\Cms\storage\Repository $repository
15
+     * @param string $filesDir
16
+     */
13 17
     public function __construct($repository, $filesDir)
14 18
     {
15 19
         parent::__construct($repository);
@@ -102,7 +106,7 @@  discard block
 block discarded – undo
102 106
     }
103 107
 
104 108
     /**
105
-     * @return mixed
109
+     * @return string
106 110
      */
107 111
     public function getFilesDir()
108 112
     {
Please login to merge, or discard this patch.
src/components/LanguageComponent.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public function __construct($template, Request $request, $parameters, $matchedSitemapItem)
28 28
     {
29
-        $this->parameters = (array)$parameters;
29
+        $this->parameters = (array) $parameters;
30 30
         $this->checkParameters();
31 31
 
32 32
         $lang = substr(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : $this->defaultLanguage, 0, 2);
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             unset($this->parameters['languageParameterName']);
64 64
         }
65 65
         if (isset($this->parameters['forceRedirect'])) {
66
-            $this->forceRedirect = (bool)$this->parameters['forceRedirect'];
66
+            $this->forceRedirect = (bool) $this->parameters['forceRedirect'];
67 67
             unset($this->parameters['forceRedirect']);
68 68
         }
69 69
     }
Please login to merge, or discard this patch.
src/images/methods/BoxCrop.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,9 @@
 block discarded – undo
27 27
 
28 28
             // Define which ratio will be used, depending on which is the smallest side
29 29
             $ratio = min($hRatio, $wRatio);
30
-            if ($ratio > 1) $ratio = 1;
30
+            if ($ratio > 1) {
31
+                $ratio = 1;
32
+            }
31 33
 
32 34
             // Define sizes
33 35
             $this->_destWidth = floor($originalWidth * $ratio);
Please login to merge, or discard this patch.
src/images/methods/SmartCrop.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,9 @@
 block discarded – undo
37 37
 
38 38
             // Define which ratio will be used, depending on which is the biggest side
39 39
             $ratio = $wRatio < $hRatio ? $wRatio : $hRatio;
40
-            if ($ratio < 1) $ratio = 1;
40
+            if ($ratio < 1) {
41
+                $ratio = 1;
42
+            }
41 43
 
42 44
             // Calculate the destination width, height, x and y
43 45
             $this->_destWidth = $originalWidth / $ratio;
Please login to merge, or discard this patch.
src/images/methods/Watermark.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,7 +63,9 @@  discard block
 block discarded – undo
63 63
          */
64 64
         protected function calculateX($imageResource)
65 65
         {
66
-            if (intval($this->_x) === $this->_x) return $this->_x;
66
+            if (intval($this->_x) === $this->_x) {
67
+                return $this->_x;
68
+            }
67 69
 
68 70
             $x = strtolower($this->_x);
69 71
 
@@ -88,7 +90,9 @@  discard block
 block discarded – undo
88 90
          */
89 91
         public function calculateY($imageResource)
90 92
         {
91
-            if (intval($this->_y) === $this->_y) return $this->_y;
93
+            if (intval($this->_y) === $this->_y) {
94
+                return $this->_y;
95
+            }
92 96
 
93 97
             $y = strtolower($this->_y);
94 98
 
@@ -125,7 +129,9 @@  discard block
 block discarded – undo
125 129
          */
126 130
         public function GetWatermark()
127 131
         {
128
-            if ($this->_watermark == null) throw new \Exception('A watermark is not set. Please supply a \CloudControl\Cms\image\Image using $this->SetWatermark');
132
+            if ($this->_watermark == null) {
133
+                throw new \Exception('A watermark is not set. Please supply a \CloudControl\Cms\image\Image using $this->SetWatermark');
134
+            }
129 135
             return $this->_watermark;
130 136
         }
131 137
 
Please login to merge, or discard this patch.
src/images/methods/Resize.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
          */
52 52
         public function SetPreserveAspectRatio($bool)
53 53
         {
54
-            $this->_preserveAspectRatio = (bool)$bool;
54
+            $this->_preserveAspectRatio = (bool) $bool;
55 55
             return $this;
56 56
         }
57 57
 
Please login to merge, or discard this patch.