Passed
Branch develop (8cbda1)
by Jens
02:45
created
cloudcontrol/library/cc/Application.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 		 * Loop through sitemap items and see if one matches the requestUri.
89 89
 		 * If it does, add it tot the matchedSitemapItems array
90 90
 		 *
91
-		 * @param $request
91
+		 * @param Request $request
92 92
 		 */
93 93
 		private function sitemapMatching($request)
94 94
 		{
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 		 * @param string $template
151 151
 		 * @param array  $parameters
152 152
 		 *
153
-		 * @return mixed
153
+		 * @return Component
154 154
 		 * @throws \Exception
155 155
 		 */
156 156
 		private function getComponentObject($class='', $template='', $parameters=array(), $matchedSitemapItem)
Please login to merge, or discard this patch.
cloudcontrol/library/cc/cc.php 1 patch
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
  * @param array  $replace
112 112
  * @param string $delimiter
113 113
  *
114
- * @return mixed|string
114
+ * @return string
115 115
  */
116 116
 function slugify($str, $replace=array(), $delimiter='-') {
117 117
 	if( !empty($replace) ) {
@@ -130,7 +130,6 @@  discard block
 block discarded – undo
130 130
  * Dumps a var_dump of the passed arguments with <pre> tags surrounding it.
131 131
  * Dies afterwards
132 132
  *
133
- * @param mixed $data    The data to be displayed
134 133
  */
135 134
 function dump()
136 135
 {
Please login to merge, or discard this patch.
cloudcontrol/library/images/Image.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,6 +73,7 @@  discard block
 block discarded – undo
73 73
 		 * @see http://www.php.net/manual/en/function.image-type-to-mime-type.php
74 74
 		 * @param string 	$imagePath
75 75
 		 * @param bool 		$getExtension
76
+		 * @return integer
76 77
 		 */
77 78
 		public function GetImageMimeType($imagePath, $getExtension = false)
78 79
 		{
@@ -93,7 +94,7 @@  discard block
 block discarded – undo
93 94
 		 *
94 95
 		 * @see 	http://www.php.net/manual/en/function.imagecreatefromwbmp.php#86214
95 96
 		 * @author 	alexander at alexauto dot nl 
96
-		 * @param	string		$imagePath
97
+		 * @param string $p_sFile
97 98
 		 * @return  resource
98 99
 		 */
99 100
 		public function CreateImageFromBmp($p_sFile)
Please login to merge, or discard this patch.
cloudcontrol/library/images/ImageResizer.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -24,6 +24,9 @@  discard block
 block discarded – undo
24 24
 			$this->imageSet = $imageSet;
25 25
 		}
26 26
 
27
+		/**
28
+		 * @param string $imagePath
29
+		 */
27 30
 		public function applyImageSetToImage($imagePath)
28 31
 		{
29 32
 			$returnFileNames = array();
@@ -104,6 +107,12 @@  discard block
 block discarded – undo
104 107
 			}
105 108
 		}
106 109
 
110
+		/**
111
+		 * @param string $imagePath
112
+		 * @param string $modifier
113
+		 *
114
+		 * @return string
115
+		 */
107 116
 		private function modifyName($imagePath, $modifier)
108 117
 		{
109 118
 			$filename = basename($imagePath);
Please login to merge, or discard this patch.
cloudcontrol/library/images/methods/Watermark.php 1 patch
Doc Comments   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 		/**
57 57
 		 * Use build-in logic to position the x of watermark
58 58
 		 *
59
-		 * @param 	string $x
60
-		 * @return 	self
59
+		 * @param resource $imageResource
60
+		 * @return 	integer
61 61
 		 */
62 62
 		protected function calculateX($imageResource)
63 63
 		{
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
 		/**
82 82
 		 * Use build-in logic to position the y of watermark
83 83
 		 *
84
-		 * @param 	string $y
85
-		 * @return 	self
84
+		 * @param resource $imageResource
85
+		 * @return 	integer
86 86
 		 */
87 87
 		public function calculateY($imageResource)
88 88
 		{
@@ -131,6 +131,7 @@  discard block
 block discarded – undo
131 131
 		 * Set the x
132 132
 		 *
133 133
 		 * @param  int | string $x
134
+		 * @param string $x
134 135
 		 * @return self
135 136
 		 */
136 137
 		public function SetX($x)
@@ -143,6 +144,7 @@  discard block
 block discarded – undo
143 144
 		 * Set the y
144 145
 		 *
145 146
 		 * @param  int | string $y
147
+		 * @param string $y
146 148
 		 * @return self
147 149
 		 */
148 150
 		public function SetY($y)
Please login to merge, or discard this patch.
cloudcontrol/library/storage/JsonStorage.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 		/**
18 18
 		 * JsonStorage constructor.
19 19
 		 *
20
-		 * @param $storagePath
20
+		 * @param string $storagePath
21 21
 		 */
22 22
 		public function __construct($storagePath)
23 23
 		{
@@ -837,6 +837,9 @@  discard block
 block discarded – undo
837 837
 			}
838 838
 		}
839 839
 
840
+		/**
841
+		 * @param string $path
842
+		 */
840 843
 		private function validateFilename($filename, $path)
841 844
 		{
842 845
 			$fileParts = explode('.', $filename);
Please login to merge, or discard this patch.
cloudcontrol/library/images/methods/Crop.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,8 +109,8 @@
 block discarded – undo
109 109
 
110 110
 			// Preserve transparency
111 111
 			imagecolortransparent($new, imagecolorallocatealpha($new, 0, 0, 0, 127));
112
-            imagealphablending($new, false);
113
-            imagesavealpha($new, true);
112
+			imagealphablending($new, false);
113
+			imagesavealpha($new, true);
114 114
 			
115 115
 			imagecopyresampled($new, $imageResource, $this->_destX, $this->_destY, $this->_x, $this->_y, $this->_destWidth, $this->_destHeight, $this->_destWidth, $this->_destHeight);
116 116
 			
Please login to merge, or discard this patch.
cloudcontrol/library/images/methods/SmartCrop.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,8 +62,8 @@
 block discarded – undo
62 62
 
63 63
 			// Preserve transparency
64 64
 			imagecolortransparent($new, imagecolorallocatealpha($new, 0, 0, 0, 127));
65
-            imagealphablending($new, false);
66
-            imagesavealpha($new, true);
65
+			imagealphablending($new, false);
66
+			imagesavealpha($new, true);
67 67
 			
68 68
 			imagecopyresampled($new, $imageResource, $this->_destX, $this->_destY, $this->_x, $this->_y, $this->_destWidth, $this->_destHeight, $originalWidth, $originalHeight);
69 69
 			
Please login to merge, or discard this patch.
cloudcontrol/library/cc/errorhandler.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
  */
32 32
 function shutdownHandler () {
33 33
 	$error = error_get_last(); 
34
-    if (isset($error['type'], $error['message'], $error['file'], $error['line'])) { 
35
-        errorHandler($error['type'],$error['message'],$error['file'],$error['line']);
36
-    }elseif ($error['type'] == 1) {
37
-        dump($error);
38
-    }
34
+	if (isset($error['type'], $error['message'], $error['file'], $error['line'])) { 
35
+		errorHandler($error['type'],$error['message'],$error['file'],$error['line']);
36
+	}elseif ($error['type'] == 1) {
37
+		dump($error);
38
+	}
39 39
 }
40 40
 
41 41
 /**
@@ -49,28 +49,28 @@  discard block
 block discarded – undo
49 49
 	$jsonErrorNr = json_last_error();
50 50
 	$errstr = '';
51 51
 	switch ($jsonErrorNr) {
52
-        case JSON_ERROR_NONE:
53
-            $errstr .= ' - No errors' . PHP_EOL;
54
-        break;
55
-        case JSON_ERROR_DEPTH:
56
-            $errstr .= ' - Maximum stack depth exceeded' . PHP_EOL;
57
-        break;
58
-        case JSON_ERROR_STATE_MISMATCH:
59
-            $errstr .= ' - Underflow or the modes mismatch' . PHP_EOL;
60
-        break;
61
-        case JSON_ERROR_CTRL_CHAR:
62
-            $errstr .= ' - Unexpected control character found' . PHP_EOL;
63
-        break;
64
-        case JSON_ERROR_SYNTAX:
65
-            $errstr .= ' - Syntax error, malformed JSON' . PHP_EOL;
66
-        break;
67
-        case JSON_ERROR_UTF8:
68
-            $errstr .= ' - Malformed UTF-8 characters, possibly incorrectly encoded' . PHP_EOL;
69
-        break;
70
-        default:
71
-            $errstr = ' - Unknown error' . PHP_EOL;
72
-        break;
73
-    }
52
+		case JSON_ERROR_NONE:
53
+			$errstr .= ' - No errors' . PHP_EOL;
54
+		break;
55
+		case JSON_ERROR_DEPTH:
56
+			$errstr .= ' - Maximum stack depth exceeded' . PHP_EOL;
57
+		break;
58
+		case JSON_ERROR_STATE_MISMATCH:
59
+			$errstr .= ' - Underflow or the modes mismatch' . PHP_EOL;
60
+		break;
61
+		case JSON_ERROR_CTRL_CHAR:
62
+			$errstr .= ' - Unexpected control character found' . PHP_EOL;
63
+		break;
64
+		case JSON_ERROR_SYNTAX:
65
+			$errstr .= ' - Syntax error, malformed JSON' . PHP_EOL;
66
+		break;
67
+		case JSON_ERROR_UTF8:
68
+			$errstr .= ' - Malformed UTF-8 characters, possibly incorrectly encoded' . PHP_EOL;
69
+		break;
70
+		default:
71
+			$errstr = ' - Unknown error' . PHP_EOL;
72
+		break;
73
+	}
74 74
 	errorHandler ($jsonErrorNr, $errstr, $file, $line);
75 75
 }
76 76
 
@@ -86,14 +86,14 @@  discard block
 block discarded – undo
86 86
  */
87 87
 function renderError ($message='', $file='', $line='', $code=0, $trace=array(), $httpHeader = 'HTTP/1.0 500 Internal Server Error') {
88 88
 	$file_lines = file_exists($file) ? file($file) : array();
89
-    $range = ($line - 15) < 0 ? range(1, 30) : range($line - 15, $line + 15);
90
-    $lines = array();
89
+	$range = ($line - 15) < 0 ? range(1, 30) : range($line - 15, $line + 15);
90
+	$lines = array();
91 91
 
92
-    foreach ($range as $line_number) {
93
-        if(isset($file_lines[$line_number-1])) {
94
-            $lines[$line_number] = $file_lines[$line_number-1];
95
-        }
96
-    }
92
+	foreach ($range as $line_number) {
93
+		if(isset($file_lines[$line_number-1])) {
94
+			$lines[$line_number] = $file_lines[$line_number-1];
95
+		}
96
+	}
97 97
 	if (ob_get_contents()) ob_end_clean();
98 98
 	$error = array(
99 99
 		'message' 		=> $message,
Please login to merge, or discard this patch.