@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * |
97 | 97 | * @param alpha\Util\Http\Request $request |
98 | 98 | * |
99 | - * @return alpha\Util\Http\Response |
|
99 | + * @return Response |
|
100 | 100 | * |
101 | 101 | * @since 1.0 |
102 | 102 | */ |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | * |
121 | 121 | * @param alpha\Util\Http\Request $request |
122 | 122 | * |
123 | - * @return alpha\Util\Http\Response |
|
123 | + * @return Response |
|
124 | 124 | * |
125 | 125 | * @since 1.0 |
126 | 126 | */ |
@@ -435,7 +435,7 @@ |
||
435 | 435 | /** |
436 | 436 | * Method for returning the calculated score for this article. |
437 | 437 | * |
438 | - * @return float |
|
438 | + * @return string |
|
439 | 439 | * |
440 | 440 | * @since 1.0 |
441 | 441 | */ |
@@ -452,7 +452,7 @@ |
||
452 | 452 | } |
453 | 453 | |
454 | 454 | if ($vote_count > 0) { |
455 | - $score = $total_score / $vote_count; |
|
455 | + $score = $total_score/$vote_count; |
|
456 | 456 | } |
457 | 457 | |
458 | 458 | return sprintf('%01.2f', $score); |
@@ -115,7 +115,7 @@ |
||
115 | 115 | /** |
116 | 116 | * Get config value. |
117 | 117 | * |
118 | - * @param $key string |
|
118 | + * @param string $key string |
|
119 | 119 | * |
120 | 120 | * @return string |
121 | 121 | * |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | /** |
285 | 285 | * Get the node offset. |
286 | 286 | * |
287 | - * @return string |
|
287 | + * @return integer |
|
288 | 288 | * |
289 | 289 | * @since 1.0 |
290 | 290 | */ |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | /** |
461 | 461 | * Calculates and returns the midpoint X coordinate of the children of this node. |
462 | 462 | * |
463 | - * @return int |
|
463 | + * @return double |
|
464 | 464 | * |
465 | 465 | * @since 1.0 |
466 | 466 | */ |
@@ -467,9 +467,9 @@ discard block |
||
467 | 467 | public function getChildrenCenter() |
468 | 468 | { |
469 | 469 | $node = $this->getChildAt(0); |
470 | - $node1 = $this->getChildAt(count($this->children) - 1); |
|
470 | + $node1 = $this->getChildAt(count($this->children)-1); |
|
471 | 471 | |
472 | - return $node->getOffset() + (($node1->getOffset() - $node->getOffset()) + $node1->getWidth()) / 2; |
|
472 | + return $node->getOffset()+(($node1->getOffset()-$node->getOffset())+$node1->getWidth())/2; |
|
473 | 473 | } |
474 | 474 | |
475 | 475 | /** |
@@ -529,14 +529,14 @@ discard block |
||
529 | 529 | $yc = 0; |
530 | 530 | $xd = 0; |
531 | 531 | $yd = 0; |
532 | - $xa = $this->x + ($this->width / 2); |
|
533 | - $ya = $this->y + $this->height; |
|
532 | + $xa = $this->x+($this->width/2); |
|
533 | + $ya = $this->y+$this->height; |
|
534 | 534 | |
535 | 535 | foreach ($this->children as $child) { |
536 | - $xd = $xc = $child->getX() + ($child->getWidth() / 2); |
|
536 | + $xd = $xc = $child->getX()+($child->getWidth()/2); |
|
537 | 537 | $yd = $child->getY(); |
538 | 538 | $xb = $xa; |
539 | - $yb = $yc = $ya + ($yd - $ya) / 2; |
|
539 | + $yb = $yc = $ya+($yd-$ya)/2; |
|
540 | 540 | $this->links[$child->id]['xa'] = $xa; |
541 | 541 | $this->links[$child->id]['ya'] = $ya; |
542 | 542 | $this->links[$child->id]['xb'] = $xb; |
@@ -50,6 +50,7 @@ discard block |
||
50 | 50 | * Starts a new session, or resumes an existing session if there is already a session ID available. |
51 | 51 | * |
52 | 52 | * @since 2.0 |
53 | + * @return void |
|
53 | 54 | */ |
54 | 55 | public function init(); |
55 | 56 | |
@@ -57,13 +58,14 @@ discard block |
||
57 | 58 | * Destroys the current session. |
58 | 59 | * |
59 | 60 | * @since 2.0 |
61 | + * @return void |
|
60 | 62 | */ |
61 | 63 | public function destroy(); |
62 | 64 | |
63 | 65 | /** |
64 | 66 | * Get the key value from the session. Returns false if nothing is found. |
65 | 67 | * |
66 | - * @param $key |
|
68 | + * @param string $key |
|
67 | 69 | * |
68 | 70 | * @since 2.0 |
69 | 71 | * |
@@ -78,6 +80,7 @@ discard block |
||
78 | 80 | * @param mixed $value |
79 | 81 | * |
80 | 82 | * @since 2.0 |
83 | + * @return void |
|
81 | 84 | */ |
82 | 85 | public function set($key, $value); |
83 | 86 | |
@@ -85,9 +88,9 @@ discard block |
||
85 | 88 | * Deletes the value provided at that key in the session. |
86 | 89 | * |
87 | 90 | * @param string $key |
88 | - * @param mixed $value |
|
89 | 91 | * |
90 | 92 | * @since 2.0 |
93 | + * @return void |
|
91 | 94 | */ |
92 | 95 | public function delete($key); |
93 | 96 |
@@ -109,7 +109,7 @@ |
||
109 | 109 | /** |
110 | 110 | * Saves the GD image resource to the file path indicated. |
111 | 111 | * |
112 | - * @param image $imageResource The GD image resource to save |
|
112 | + * @param resource $imageResource The GD image resource to save |
|
113 | 113 | * @param string $type The image type (jpg, png, or gif) |
114 | 114 | * @param string $destination The desination file path of the image file to create |
115 | 115 | * |
@@ -95,7 +95,7 @@ |
||
95 | 95 | list($originalWidth, $originalHeight) = $imageInfo; |
96 | 96 | |
97 | 97 | if ($originalWidth > $originalHeight) { |
98 | - $originalX = floor(($originalWidth - $originalHeight) / 2); |
|
98 | + $originalX = floor(($originalWidth-$originalHeight)/2); |
|
99 | 99 | $sourceWidth = $sourceHeight = $originalHeight; |
100 | 100 | } else { |
101 | 101 | $sourceWidth = $sourceHeight = $originalWidth; |
@@ -132,7 +132,7 @@ |
||
132 | 132 | /** |
133 | 133 | * Returns the size in megabytes of the log file on disc. |
134 | 134 | * |
135 | - * @return float |
|
135 | + * @return integer |
|
136 | 136 | * |
137 | 137 | * @since 1.0 |
138 | 138 | */ |
@@ -146,7 +146,7 @@ |
||
146 | 146 | clearstatcache(); |
147 | 147 | $size = filesize($this->path); |
148 | 148 | |
149 | - return ($size / 1024) /1024; |
|
149 | + return ($size/1024)/1024; |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | /** |
@@ -153,7 +153,7 @@ |
||
153 | 153 | /** |
154 | 154 | * The constructor. |
155 | 155 | * |
156 | - * @param $source |
|
156 | + * @param string $source |
|
157 | 157 | * @param $width |
158 | 158 | * @param $height |
159 | 159 | * @param $sourceType |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | } |
243 | 243 | } else { |
244 | 244 | // make a cache dir for the article |
245 | - $cacheDir = $config->get('app.file.store.dir').'cache/images/article_'.mb_substr($this->source, mb_strpos($this->source, 'attachments/article_') + 20, 11); |
|
245 | + $cacheDir = $config->get('app.file.store.dir').'cache/images/article_'.mb_substr($this->source, mb_strpos($this->source, 'attachments/article_')+20, 11); |
|
246 | 246 | if (!file_exists($cacheDir)) { |
247 | 247 | $success = mkdir($cacheDir); |
248 | 248 | |
@@ -300,11 +300,11 @@ discard block |
||
300 | 300 | $targetScreenY = $targetScreenResolution[1]; |
301 | 301 | |
302 | 302 | // calculate the new units we will scale by |
303 | - $xu = $targetScreenX / $originalScreenX; |
|
304 | - $yu = $targetScreenY / $originalScreenY; |
|
303 | + $xu = $targetScreenX/$originalScreenX; |
|
304 | + $yu = $targetScreenY/$originalScreenY; |
|
305 | 305 | |
306 | - $this->width = new Integer(intval($this->width->getValue() * $xu)); |
|
307 | - $this->height = new Integer(intval($this->height->getValue() * $yu)); |
|
306 | + $this->width = new Integer(intval($this->width->getValue()*$xu)); |
|
307 | + $this->height = new Integer(intval($this->height->getValue()*$yu)); |
|
308 | 308 | |
309 | 309 | // need to update the cache filename as the dimensions have changed |
310 | 310 | $this->setFilename(); |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | if ($this->sourceType->getValue() == 'png' && $config->get('cms.images.perserve.png')) { |
369 | 369 | imagepng($new_image); |
370 | 370 | } else { |
371 | - imagejpeg($new_image, null, 100 * $this->quality->getValue()); |
|
371 | + imagejpeg($new_image, null, 100*$this->quality->getValue()); |
|
372 | 372 | } |
373 | 373 | |
374 | 374 | $this->cache($new_image); |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | if ($this->sourceType->getValue() == 'png' && $config->get('cms.images.perserve.png')) { |
393 | 393 | imagepng($image, $this->filename); |
394 | 394 | } else { |
395 | - imagejpeg($image, $this->filename, 100 * $this->quality->getValue()); |
|
395 | + imagejpeg($image, $this->filename, 100*$this->quality->getValue()); |
|
396 | 396 | } |
397 | 397 | } |
398 | 398 |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | // work out how many columns will be in the table |
219 | 219 | $reflection = new ReflectionClass(get_class($this->BO)); |
220 | 220 | $properties = array_keys($reflection->getDefaultProperties()); |
221 | - $fields['colCount'] = 1 + count(array_diff($properties, $this->BO->getDefaultAttributes(), $this->BO->getTransientAttributes())); |
|
221 | + $fields['colCount'] = 1+count(array_diff($properties, $this->BO->getDefaultAttributes(), $this->BO->getTransientAttributes())); |
|
222 | 222 | |
223 | 223 | // get the class attributes |
224 | 224 | $properties = $reflection->getProperties(); |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | $html .= ' <th>'.$this->BO->getDataLabel($propName).'</th>'; |
240 | 240 | } |
241 | 241 | } else { |
242 | - $fields['colCount'] = $fields['colCount'] - 1; |
|
242 | + $fields['colCount'] = $fields['colCount']-1; |
|
243 | 243 | } |
244 | 244 | } |
245 | 245 | $html .= '</tr><tr>'; |
@@ -1009,7 +1009,7 @@ discard block |
||
1009 | 1009 | if ($viewState->get('markdownTextBoxRows') == '') { |
1010 | 1010 | $text = new TextBox($this->BO->getPropObject($name), $label, $name, 10); |
1011 | 1011 | } else { |
1012 | - $text = new TextBox($this->BO->getPropObject($name), $label, $name, (integer) $viewState->get('markdownTextBoxRows')); |
|
1012 | + $text = new TextBox($this->BO->getPropObject($name), $label, $name, (integer)$viewState->get('markdownTextBoxRows')); |
|
1013 | 1013 | } |
1014 | 1014 | |
1015 | 1015 | $html .= $text->render(); |