Completed
Push — master ( 3ad657...9ed059 )
by Jacob
03:07
created
collector/comment/CommentCollector.class.inc.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -83,6 +83,9 @@
 block discarded – undo
83 83
 		return self::run_query($query);
84 84
 	}
85 85
 
86
+	/**
87
+	 * @param integer $count
88
+	 */
86 89
 	public static function getRecentBlogComments($count)
87 90
 	{
88 91
 		$query = "
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
 	{
164 164
 		$path = self::escape($path);
165 165
 		
166
-		if($commenter != 0)
166
+		if ($commenter != 0)
167 167
 			$trusted_commenter_clause = "(`commenter`.`trusted` = '1' || `commenter`.`id` = '{$commenter}')";
168 168
 		else
169 169
 			$trusted_commenter_clause = "`commenter`.`trusted` = '1'";
Please login to merge, or discard this patch.
collector/waterfall/LogCollector.class.inc.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -34,6 +34,9 @@  discard block
 block discarded – undo
34 34
 		return self::run_query($query);
35 35
 	}
36 36
 
37
+    /**
38
+     * @param integer $total
39
+     */
37 40
     public static function getRecentList($total)
38 41
     {
39 42
         $query = "
@@ -178,6 +181,9 @@  discard block
 block discarded – undo
178 181
 		return self::run_row_query($query);
179 182
 	}
180 183
 
184
+    /**
185
+     * @param string $date
186
+     */
181 187
     public static function getByDate($date)
182 188
     {
183 189
         $date = self::escape($date);
Please login to merge, or discard this patch.
collector/waterfall/WaterfallCollector.class.inc.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -117,6 +117,9 @@
 block discarded – undo
117 117
         return self::run_query($query);
118 118
     }
119 119
 
120
+    /**
121
+     * @param string $alias
122
+     */
120 123
     public static function getByOldAlias($alias)
121 124
     {
122 125
         $alias = self::escape($alias);
Please login to merge, or discard this patch.
controller/blog/DefaultPageController.class.inc.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -97,6 +97,9 @@
 block discarded – undo
97 97
 		return $tag_array;
98 98
 	}
99 99
 
100
+	/**
101
+	 * @param boolean $trim
102
+	 */
100 103
 	final private function get_body_for_post($post, $trim)
101 104
 	{
102 105
 		$body = $post->body;
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 		Loader::load('collector', 'image/PhotoCollector');
42 42
 		$photo_result = PhotoCollector::getRow($id);
43 43
 		
44
-		if($photo_result == null)
44
+		if ($photo_result == null)
45 45
 			return;
46 46
 		
47 47
 		$name = $photo_result->name;
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         $tag_result = $repository->getTagsForPost($post['id']);
93 93
 
94 94
         $tag_array = array();
95
-		foreach($tag_result as $tag)
95
+		foreach ($tag_result as $tag)
96 96
 		{
97 97
 			$tag_object = new stdclass();
98 98
 			$tag_object->name = $tag['tag'];
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	{
107 107
 		$body = $post['body'];
108 108
 		
109
-		if($trim)
109
+		if ($trim)
110 110
 			$body = Content::instance('SmartTrim', $body)->activate(self::$LENGTH_OF_TRIMMED_POST);
111 111
 		
112 112
 		$body = Content::instance('FixPhoto', $body)->activate(false, 'standard');
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
 		$maximum_tag_count = $this->get_maximum_tag_count($tag_result);
133 133
 		
134 134
 		$cloud_array = array();
135
-		foreach($tag_result as $tag)
135
+		foreach ($tag_result as $tag)
136 136
 		{
137
-			if($tag['count'] < self::$MINIMUM_TAG_COUNT)
137
+			if ($tag['count'] < self::$MINIMUM_TAG_COUNT)
138 138
 				continue;
139 139
 			
140 140
 			$tag_object = new stdclass();
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
 	{
152 152
 		$maximum = 1;
153 153
 		
154
-		foreach($tag_result as $tag)
154
+		foreach ($tag_result as $tag)
155 155
 		{
156
-			if($tag['count'] > $maximum)
156
+			if ($tag['count'] > $maximum)
157 157
 				$maximum = $tag['count'];
158 158
 		}
159 159
 		return $maximum;
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 		$comment_array = CommentCollector::getRecentBlogComments(self::$RECENT_COMMENT_COUNT);
165 165
 		
166 166
 		$array = array();
167
-		foreach($comment_array as $comment)
167
+		foreach ($comment_array as $comment)
168 168
 		{
169 169
 			$body = $comment->body;
170 170
 			$body = strip_tags($body);
Please login to merge, or discard this patch.
controller/PageController.class.inc.php 2 patches
Doc Comments   +28 added lines patch added patch discarded remove patch
@@ -204,6 +204,9 @@  discard block
 block discarded – undo
204 204
 			exit;
205 205
 	}
206 206
 
207
+	/**
208
+	 * @param string $method
209
+	 */
207 210
 	protected function set_header_method($method)
208 211
 	{
209 212
 		$this->headers = $method;
@@ -214,6 +217,9 @@  discard block
 block discarded – undo
214 217
 		$this->set_head('title', $value);
215 218
 	}
216 219
 
220
+	/**
221
+	 * @param string $value
222
+	 */
217 223
 	protected function set_author($value)
218 224
 	{
219 225
 		$this->set_head('author', $value);
@@ -229,26 +235,41 @@  discard block
 block discarded – undo
229 235
 		$this->set_head('keywords', implode(', ', $array));
230 236
 	}
231 237
 	
238
+	/**
239
+	 * @param string $url
240
+	 */
232 241
 	protected function set_canonical($url)
233 242
 	{
234 243
 		$this->set_head('canonical', $url);
235 244
 	}
236 245
 
246
+	/**
247
+	 * @param string $set
248
+	 */
237 249
 	protected function set_head($set, $value)
238 250
 	{
239 251
 		$this->data_array['head'][$set] = $value;
240 252
 	}
241 253
 
254
+	/**
255
+	 * @param string $set
256
+	 */
242 257
 	protected function set_body($set, $value)
243 258
 	{
244 259
 		$this->data_array['body'][$set] = $value;
245 260
 	}
246 261
 
262
+	/**
263
+	 * @param string $file
264
+	 */
247 265
 	protected function add_css($file)
248 266
 	{
249 267
 		$this->css_array[] = $file;
250 268
 	}
251 269
 
270
+	/**
271
+	 * @param string $file
272
+	 */
252 273
 	protected function add_js($file)
253 274
 	{
254 275
 		$this->js_array[] = $file;
@@ -271,6 +292,9 @@  discard block
 block discarded – undo
271 292
 		$this->set_head('js_link_array', $js_array);
272 293
 	}
273 294
 
295
+	/**
296
+	 * @param string $view
297
+	 */
274 298
 	protected function set_body_view($view)
275 299
 	{
276 300
 		$this->body_view_array[] = $view;
@@ -315,6 +339,10 @@  discard block
 block discarded – undo
315 339
 	}
316 340
 
317 341
 	private $comment_errors;
342
+
343
+	/**
344
+	 * @param string $redirect_url
345
+	 */
318 346
 	protected function handle_comment_submit($site_id, $path, $redirect_url, $page_title)
319 347
 	{
320 348
 		if(Request::hasPost() && Request::getPost('submit') == 'Submit Comment')
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         $post_result = $activityRepository->getActivities(5);
65 65
 
66 66
         $post_array = array();
67
-        foreach($post_result as $row) {
67
+        foreach ($post_result as $row) {
68 68
             array_push($post_array, $this->expand_post($row));
69 69
         }
70 70
 
@@ -100,9 +100,9 @@  discard block
 block discarded – undo
100 100
 		$headers = $this->headers;
101 101
 		Header::$headers();
102 102
 		Loader::load('view', '/Head', $this->data_array['head']);
103
-		foreach($this->body_view_array as $view)
103
+		foreach ($this->body_view_array as $view)
104 104
 		{
105
-			if(substr($view, 0, 1) == '/')
105
+			if (substr($view, 0, 1) == '/')
106 106
 				Loader::load('view', $view, $this->data_array['body']);
107 107
 			else
108 108
 				Loader::load('view', URLDecode::getSite() . '/' . $view, $this->data_array['body']);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             Loader::load('view', '/Foot', array('tracking_code' => self::$TRACKING_CODE));
115 115
         }
116 116
 		
117
-		if($view == '/404' || $view == '/503')
117
+		if ($view == '/404' || $view == '/503')
118 118
 			exit;
119 119
 	}
120 120
 
@@ -170,14 +170,14 @@  discard block
 block discarded – undo
170 170
 
171 171
 	private function load_assets()
172 172
 	{
173
-    $css_array = array_map(function ($stylesheet) {
173
+    $css_array = array_map(function($stylesheet) {
174 174
       $path = "/css/{$stylesheet[0]}.css";
175 175
       if ($stylesheet[1] > 1) {
176 176
         $path .= "?v={$stylesheet[1]}";
177 177
       }
178 178
       return $path;
179 179
     }, $this->css_array);
180
-    $js_array = array_map(function ($script) {
180
+    $js_array = array_map(function($script) {
181 181
       if (substr($script, 0, 4) == 'http') {
182 182
         return $script;
183 183
       }
@@ -195,26 +195,26 @@  discard block
 block discarded – undo
195 195
 
196 196
 	protected function eject()
197 197
 	{
198
-		if(get_class($this) !== 'Error404Controller')
198
+		if (get_class($this) !== 'Error404Controller')
199 199
 			Loader::loadNew('controller', '/Error404Controller')->activate();
200 200
 	}
201 201
 
202 202
 	protected function unavailable()
203 203
 	{
204
-		if(get_class($this) !== 'Error503Controller')
204
+		if (get_class($this) !== 'Error503Controller')
205 205
 			Loader::loadNew('controller', '/Error503Controller')->activate();
206 206
 	}
207 207
 
208 208
 	protected function redirect($uri, $method = 301)
209 209
 	{
210
-		switch($method)
210
+		switch ($method)
211 211
 		{
212 212
 			case 301 :
213
-				if(get_class($this) !== 'Error301Controller')
213
+				if (get_class($this) !== 'Error301Controller')
214 214
 					Loader::loadNew('controller', '/Error301Controller', array($uri))->activate();
215 215
 				break;
216 216
 			case 303 :
217
-				if(get_class($this) !== 'Error303Controller')
217
+				if (get_class($this) !== 'Error303Controller')
218 218
 					Loader::loadNew('controller', '/Error303Controller', array($uri))->activate();
219 219
 				break;
220 220
 		}
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 	private $comment_errors;
235 235
 	protected function handle_comment_submit($site_id, $path, $redirect_url, $page_title)
236 236
 	{
237
-		if(Request::hasPost() && Request::getPost('submit') == 'Submit Comment')
237
+		if (Request::hasPost() && Request::getPost('submit') == 'Submit Comment')
238 238
 		{
239 239
 			$parameters = array($site_id, $path, $redirect_url, $page_title);
240 240
 			$this->comment_errors = Loader::loadNew('module', 'form/CommentSubmitModule', $parameters)->activate();
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 		$comment_array = array();
253 253
 		$comment_result = CommentCollector::getCommentsForURL($site, $path, $commenter->id);
254 254
 		
255
-		foreach($comment_result as $comment)
255
+		foreach ($comment_result as $comment)
256 256
 		{
257 257
 			$comment_object = new stdclass();
258 258
 			$comment_object->id = $comment->id;
@@ -262,12 +262,12 @@  discard block
 block discarded – undo
262 262
 			$comment_object->url = $comment->url;
263 263
 			$comment_object->trusted = $comment->trusted;
264 264
 			
265
-			if($comment->reply == 0 && Request::getPost('type') == $comment->id)
265
+			if ($comment->reply == 0 && Request::getPost('type') == $comment->id)
266 266
 				$comment_object->errors = $this->comment_errors;
267 267
 			else
268 268
 				$comment_object->errors = array();
269 269
 			
270
-			if($comment->reply == 0)
270
+			if ($comment->reply == 0)
271 271
 			{
272 272
 				$comment_object->replies = array();
273 273
 				$comment_array[$comment->id] = $comment_object;
@@ -298,21 +298,21 @@  discard block
 block discarded – undo
298 298
 		$commenter->website = '';
299 299
 		
300 300
 		$commenter_cookie = Cookie::instance('Commenter');
301
-		if(!$commenter_cookie->exists())
301
+		if (!$commenter_cookie->exists())
302 302
 			return $commenter;
303 303
 		
304 304
 		$commenter_cookie_value = $commenter_cookie->getValue();
305 305
 		$commenter_cookie_value = json_decode($commenter_cookie_value);
306 306
 		
307
-		if($commenter_cookie_value === NULL)
307
+		if ($commenter_cookie_value === NULL)
308 308
 			return $commenter;
309 309
 		
310
-		if(!isset($commenter_cookie_value->name) || !isset($commenter_cookie_value->email))
310
+		if (!isset($commenter_cookie_value->name) || !isset($commenter_cookie_value->email))
311 311
 			return $commenter;
312 312
 		
313 313
 		$commenter_object = CommentCollector::getCommenterByFields($commenter_cookie_value->name, $commenter_cookie_value->email, (isset($commenter_cookie_value->website) ? $commenter_cookie_value->website : ''));
314 314
 		
315
-		if($commenter_object === NULL)
315
+		if ($commenter_object === NULL)
316 316
 			return $commenter;
317 317
 		
318 318
 		$commenter->id = $commenter_object->id;
Please login to merge, or discard this patch.
utility/content/MarkupCodeContent.class.inc.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -25,6 +25,9 @@  discard block
 block discarded – undo
25 25
 		return;
26 26
 	}
27 27
 
28
+	/**
29
+	 * @param string $content
30
+	 */
28 31
 	private function wrap_in_list($content)
29 32
 	{
30 33
 		$content_array = explode("\n", $content);
@@ -44,6 +47,9 @@  discard block
 block discarded – undo
44 47
 		return $content;
45 48
 	}
46 49
 
50
+	/**
51
+	 * @param string $type
52
+	 */
47 53
 	private function highlight_code($content, $type)
48 54
 	{
49 55
 		switch($type)
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 	protected function execute($title = '')
11 11
 	{
12 12
 		preg_match_all(self::$MARKUP_DELIMITER, $this->content, $matches);
13
-		if(count($matches[1]) == 0)
13
+		if (count($matches[1]) == 0)
14 14
 			return;
15 15
 		
16
-		foreach($matches[3] as $key => $match)
16
+		foreach ($matches[3] as $key => $match)
17 17
 		{
18 18
 			$replacement = $match;
19 19
 			$replacement = $this->wrap_in_list($replacement);
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	{
30 30
 		$content_array = explode("\n", $content);
31 31
 		
32
-		foreach($content_array as $key => $row)
32
+		foreach ($content_array as $key => $row)
33 33
 		{
34 34
 			$new_row = ($key % 2 == 0) ? '<li class="even">' : '<li class="odd">';
35 35
 			$new_row .= '<p>';
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 	private function highlight_code($content, $type)
48 48
 	{
49
-		switch($type)
49
+		switch ($type)
50 50
 		{
51 51
 			default :
52 52
 				return $content;
Please login to merge, or discard this patch.
utility/content/SmartTrimContent.class.inc.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -62,6 +62,9 @@
 block discarded – undo
62 62
 		$this->is_trimmed = true;
63 63
 	}
64 64
 
65
+	/**
66
+	 * @param string $content
67
+	 */
65 68
 	private function trim_html_string($content, $length)
66 69
 	{
67 70
 		$content = preg_replace(self::$PHOTO_PLACEHOLDER_MATCH, '', $content);
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -27,20 +27,20 @@  discard block
 block discarded – undo
27 27
 	protected function execute()
28 28
 	{
29 29
 		$args = func_get_args();
30
-		if(count($args) < 1)
30
+		if (count($args) < 1)
31 31
 		{
32 32
 			trigger_error('Someone called SmartTrimContent w/o defining a length... bad!');
33 33
 			return;
34 34
 		}
35 35
 		
36
-		if(count($args) == 2)
36
+		if (count($args) == 2)
37 37
 			$etc = $args[1];
38 38
 		else
39 39
 			$etc = self::$ETC;
40 40
 		
41 41
 		$length = $args[0];
42 42
 		
43
-		if($length < strlen($this->content))
43
+		if ($length < strlen($this->content))
44 44
 			$this->trim_string($length);
45 45
         else
46 46
             $etc = '';
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		
55 55
 		$last_right_bracket_position = strripos($content, self::$RIGHT_BRACKET);
56 56
 		$last_left_bracket_position = strripos($content, self::$LEFT_BRACKET);
57
-		if($last_left_bracket_position > $last_right_bracket_position)
57
+		if ($last_left_bracket_position > $last_right_bracket_position)
58 58
 			$content = substr($content, 0, $last_left_bracket_position);
59 59
 		$content = trim($content);
60 60
 		
@@ -73,16 +73,16 @@  discard block
 block discarded – undo
73 73
 		$content = current($content);
74 74
 		
75 75
 		$max_length = $length;
76
-		foreach($matches[0] as $match)
76
+		foreach ($matches[0] as $match)
77 77
 		{
78 78
 			$max_length += strlen($match[0]);
79
-			if($max_length <= $match[1])
79
+			if ($max_length <= $match[1])
80 80
 				break;
81 81
 			
82 82
 			$content = substr($content, 0, $match[1]) . $match[0] . substr($content, $match[1]);
83 83
 		}
84 84
 		
85
-		if(substr($content, -7) == '</p><p>')
85
+		if (substr($content, -7) == '</p><p>')
86 86
 			$content = substr($content, 0, -7);
87 87
 		
88 88
 		return $content;
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 		$tags_preg = $this->get_tags_preg(self::$EXCLUDE_TAGS);
95 95
 		preg_match_all($tags_preg, $content, $matches, PREG_OFFSET_CAPTURE);
96 96
 		
97
-		if(count($matches[1]) % 2 == 1)
97
+		if (count($matches[1]) % 2 == 1)
98 98
 		{
99 99
 			$cut_tag = end($matches[1]);
100 100
 			$cut_tag_position = $cut_tag[1] - 1;
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
 		preg_match_all($tags_preg, $content, $matches);
113 113
 		$open_tags = array();
114 114
 		
115
-		foreach($matches[1] as $tag)
115
+		foreach ($matches[1] as $tag)
116 116
 		{
117
-			if(in_array($tag, $open_tags))
117
+			if (in_array($tag, $open_tags))
118 118
 			{
119 119
 				$key = array_search($tag, $open_tags);
120 120
 				unset($open_tags[$key]);
@@ -124,11 +124,11 @@  discard block
 block discarded – undo
124 124
 		}
125 125
 		
126 126
 		$open_tags = array_reverse($open_tags);
127
-		if(count($open_tags) > 0)
127
+		if (count($open_tags) > 0)
128 128
 		{
129
-			foreach($open_tags as $key => $open_tag)
129
+			foreach ($open_tags as $key => $open_tag)
130 130
 			{
131
-				if($key == count($open_tags) - 1)
131
+				if ($key == count($open_tags) - 1)
132 132
 					$content .= $etc;
133 133
 				$content .= "</{$open_tag}>";
134 134
 			}
Please login to merge, or discard this patch.
utility/Cookie.class.inc.php 2 patches
Doc Comments   +17 added lines patch added patch discarded remove patch
@@ -14,9 +14,20 @@  discard block
 block discarded – undo
14 14
 		$this->class_new = $class_name;
15 15
 	}
16 16
 
17
+	/**
18
+	 * @return string
19
+	 */
17 20
 	abstract protected function getName();
18 21
 	abstract protected function getDuration();
22
+
23
+	/**
24
+	 * @return string|null
25
+	 */
19 26
 	abstract protected function getDomain();
27
+
28
+	/**
29
+	 * @return string|null
30
+	 */
20 31
 	abstract protected function getPath();
21 32
 
22 33
 	public function setValue($value)
@@ -28,6 +39,9 @@  discard block
 block discarded – undo
28 39
 		return $this;
29 40
 	}
30 41
 
42
+	/**
43
+	 * @return string|null
44
+	 */
31 45
 	public function getValue()
32 46
 	{
33 47
 		if(!$this->is_loaded)
@@ -118,6 +132,9 @@  discard block
 block discarded – undo
118 132
 		return $set_cookie;
119 133
 	}
120 134
 
135
+	/**
136
+	 * @param string $class_name
137
+	 */
121 138
 	public static function instance($class_name)
122 139
 	{
123 140
 		return Loader::loadNew('utility', "cookie/{$class_name}Cookie", (array) $class_name);
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
 	public function setValue($value)
23 23
 	{
24
-		if(!$this->is_loaded)
24
+		if (!$this->is_loaded)
25 25
 			$this->load();
26 26
 		
27 27
 		$this->value = $value;
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 	public function getValue()
32 32
 	{
33
-		if(!$this->is_loaded)
33
+		if (!$this->is_loaded)
34 34
 			$this->load();
35 35
 		return $this->value;
36 36
 	}
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
 	public function exists()
44 44
 	{
45
-		if(!$this->is_loaded)
45
+		if (!$this->is_loaded)
46 46
 			$this->load();
47 47
 		return $this->exists;
48 48
 	}
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
 	private final function load()
51 51
 	{
52 52
 		$name = $this->getName();
53
-		if(isset($_COOKIE[$name]))
53
+		if (isset($_COOKIE[$name]))
54 54
 			$value = $_COOKIE[$name];
55 55
 		
56
-		if(isset($value))
56
+		if (isset($value))
57 57
 		{
58 58
 			$this->value = $value;
59 59
 			$this->exists = true;
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
 
67 67
 	public final function save()
68 68
 	{
69
-		if(!$this->check_values())
69
+		if (!$this->check_values())
70 70
 		{
71 71
 			Debugger::error('Attempt to create a cookie without all of the values being set!');
72 72
 			return false;
73 73
 		}
74 74
 		
75
-		if(!$this->set_cookie())
75
+		if (!$this->set_cookie())
76 76
 		{
77 77
 			Debugger::log('There was a problem saving the cookie.');
78 78
 			return false;
@@ -84,23 +84,23 @@  discard block
 block discarded – undo
84 84
 	private final function check_values()
85 85
 	{
86 86
 		$name = $this->getName();
87
-		if(empty($name) || strlen($name) < 1)
87
+		if (empty($name) || strlen($name) < 1)
88 88
 			return false;
89 89
 		
90 90
 		$value = $this->getValue();
91
-		if(!isset($value) || strlen($value) < 1)
91
+		if (!isset($value) || strlen($value) < 1)
92 92
 			return false;
93 93
 		
94 94
 		$expiration = $this->getExpiration();
95
-		if(!isset($expiration) || !is_int($expiration))
95
+		if (!isset($expiration) || !is_int($expiration))
96 96
 			return false;
97 97
 		
98 98
 		$domain = $this->getDomain();
99
-		if(!isset($domain) || strlen($domain) < 1)
99
+		if (!isset($domain) || strlen($domain) < 1)
100 100
 			return false;
101 101
 		
102 102
 		$path = $this->getPath();
103
-		if(!isset($path) || strlen($path) < 1)
103
+		if (!isset($path) || strlen($path) < 1)
104 104
 			return false;
105 105
 		
106 106
 		return true;
Please login to merge, or discard this patch.
utility/Request.class.inc.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -34,6 +34,9 @@
 block discarded – undo
34 34
 		return false;
35 35
 	}
36 36
 
37
+	/**
38
+	 * @param string $key
39
+	 */
37 40
 	static function getGet($key = null)
38 41
 	{
39 42
 		if($key)
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
 
19 19
 	static function getServer($key = null)
20 20
 	{
21
-		if($key)
21
+		if ($key)
22 22
 		{
23
-			if(isset(self::$server[$key]))
23
+			if (isset(self::$server[$key]))
24 24
 				return self::$server[$key];
25 25
 			return false;
26 26
 		}
@@ -29,16 +29,16 @@  discard block
 block discarded – undo
29 29
 
30 30
 	static function isAjax()
31 31
 	{
32
-		if(self::getServer(self::$AJAX_REQUEST))
32
+		if (self::getServer(self::$AJAX_REQUEST))
33 33
 			return true;
34 34
 		return false;
35 35
 	}
36 36
 
37 37
 	static function getGet($key = null)
38 38
 	{
39
-		if($key)
39
+		if ($key)
40 40
 		{
41
-			if(isset(self::$get[$key]))
41
+			if (isset(self::$get[$key]))
42 42
 				return self::$get[$key];
43 43
 			return false;
44 44
 		}
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 
48 48
 	static function getPost($key = null)
49 49
 	{
50
-		if($key)
50
+		if ($key)
51 51
 		{
52
-			if(isset(self::$post[$key]))
52
+			if (isset(self::$post[$key]))
53 53
 				return self::$post[$key];
54 54
 			return false;
55 55
 		}
Please login to merge, or discard this patch.