@@ -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 | */ |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Alpha\Model\Type\Integer; |
| 6 | 6 | use Alpha\Model\Type\Timestamp; |
| 7 | -use Alpha\Model\Type\Enum; |
|
| 8 | 7 | use Alpha\Model\Type\Relation; |
| 9 | 8 | use Alpha\Util\Config\ConfigProvider; |
| 10 | 9 | use Alpha\Util\Logging\Logger; |
@@ -1162,7 +1162,7 @@ discard block |
||
| 1162 | 1162 | * to be overridden in case you want to do something different with the ID of your objects outside |
| 1163 | 1163 | * of the standard 11 digit OID sequence used internally in Alpha. |
| 1164 | 1164 | * |
| 1165 | - * @return int 11 digit zero-padded OID value. |
|
| 1165 | + * @return string 11 digit zero-padded OID value. |
|
| 1166 | 1166 | * |
| 1167 | 1167 | * @since 1.0 |
| 1168 | 1168 | */ |
@@ -1179,7 +1179,7 @@ discard block |
||
| 1179 | 1179 | * Gets the OID for the object in zero-padded format (same as getID()). This version is final so cannot |
| 1180 | 1180 | * be overridden. |
| 1181 | 1181 | * |
| 1182 | - * @return int 11 digit zero-padded OID value. |
|
| 1182 | + * @return string 11 digit zero-padded OID value. |
|
| 1183 | 1183 | * |
| 1184 | 1184 | * @since 1.0 |
| 1185 | 1185 | */ |
@@ -2176,7 +2176,7 @@ discard block |
||
| 2176 | 2176 | /** |
| 2177 | 2177 | * Starts a new database transaction. |
| 2178 | 2178 | * |
| 2179 | - * @param $BO The ActiveRecord instance to pass to the database provider. Leave empty to have a new Person passed. |
|
| 2179 | + * @param ActiveRecord $BO The ActiveRecord instance to pass to the database provider. Leave empty to have a new Person passed. |
|
| 2180 | 2180 | * |
| 2181 | 2181 | * @since 1.0 |
| 2182 | 2182 | * |
@@ -2209,7 +2209,7 @@ discard block |
||
| 2209 | 2209 | /** |
| 2210 | 2210 | * Commits the current database transaction. |
| 2211 | 2211 | * |
| 2212 | - * @param $BO The ActiveRecord instance to pass to the database provider. Leave empty to have a new Person passed. |
|
| 2212 | + * @param ActiveRecord $BO The ActiveRecord instance to pass to the database provider. Leave empty to have a new Person passed. |
|
| 2213 | 2213 | * |
| 2214 | 2214 | * @since 1.0 |
| 2215 | 2215 | * |
@@ -2242,7 +2242,7 @@ discard block |
||
| 2242 | 2242 | /** |
| 2243 | 2243 | * Aborts the current database transaction. |
| 2244 | 2244 | * |
| 2245 | - * @param $BO The ActiveRecord instance to pass to the database provider. Leave empty to have a new Person passed. |
|
| 2245 | + * @param ActiveRecord $BO The ActiveRecord instance to pass to the database provider. Leave empty to have a new Person passed. |
|
| 2246 | 2246 | * |
| 2247 | 2247 | * @since 1.0 |
| 2248 | 2248 | * |
@@ -2413,7 +2413,7 @@ discard block |
||
| 2413 | 2413 | /** |
| 2414 | 2414 | * Check to see if an attribute exists on the BO. |
| 2415 | 2415 | * |
| 2416 | - * @param $attribute The attribute name. |
|
| 2416 | + * @param string $attribute The attribute name. |
|
| 2417 | 2417 | * |
| 2418 | 2418 | * @return bool |
| 2419 | 2419 | * |
@@ -2383,7 +2383,7 @@ |
||
| 2383 | 2383 | * parameters. If arrays of attribute names and values are provided, only those will be bound to |
| 2384 | 2384 | * the supplied statement. |
| 2385 | 2385 | * |
| 2386 | - * @param mysqli_stmt $stmt The SQL statement to bind to. |
|
| 2386 | + * @param \mysqli_stmt $stmt The SQL statement to bind to. |
|
| 2387 | 2387 | * @param array Optional array of BO attributes. |
| 2388 | 2388 | * @param array Optional array of BO values. |
| 2389 | 2389 | * |
@@ -1033,7 +1033,7 @@ discard block |
||
| 1033 | 1033 | } else { |
| 1034 | 1034 | // there has been an error, so decrement the version number back |
| 1035 | 1035 | $temp = $this->BO->getVersionNumber()->getValue(); |
| 1036 | - $this->BO->set('version_num', $temp - 1); |
|
| 1036 | + $this->BO->set('version_num', $temp-1); |
|
| 1037 | 1037 | |
| 1038 | 1038 | // check for unique violations |
| 1039 | 1039 | if (self::getConnection()->errno == '1062') { |
@@ -1065,7 +1065,7 @@ discard block |
||
| 1065 | 1065 | $this->BO->setLastQuery($sqlQuery); |
| 1066 | 1066 | $stmt = self::getConnection()->stmt_init(); |
| 1067 | 1067 | |
| 1068 | - $newVersionNumber = $this->BO->getVersionNumber()->getValue() + 1; |
|
| 1068 | + $newVersionNumber = $this->BO->getVersionNumber()->getValue()+1; |
|
| 1069 | 1069 | |
| 1070 | 1070 | if ($stmt->prepare($sqlQuery)) { |
| 1071 | 1071 | if ($this->BO->getPropObject($attribute) instanceof Integer) { |
@@ -2441,7 +2441,7 @@ discard block |
||
| 2441 | 2441 | |
| 2442 | 2442 | if ($propName == 'version_num') { |
| 2443 | 2443 | $temp = $this->BO->getVersionNumber()->getValue(); |
| 2444 | - $this->BO->set('version_num', $temp + 1); |
|
| 2444 | + $this->BO->set('version_num', $temp+1); |
|
| 2445 | 2445 | $bindingsTypes .= 'i'; |
| 2446 | 2446 | array_push($params, $this->BO->getVersionNumber()->getValue()); |
| 2447 | 2447 | } |
@@ -2542,7 +2542,7 @@ discard block |
||
| 2542 | 2542 | $singleQuote1 = mb_strpos($error, "'"); |
| 2543 | 2543 | $singleQuote2 = mb_strrpos($error, "'"); |
| 2544 | 2544 | |
| 2545 | - $value = mb_substr($error, $singleQuote1, ($singleQuote2 - $singleQuote1) + 1); |
|
| 2545 | + $value = mb_substr($error, $singleQuote1, ($singleQuote2-$singleQuote1)+1); |
|
| 2546 | 2546 | self::$logger->debug('<<findOffendingValue ['.$value.'])'); |
| 2547 | 2547 | |
| 2548 | 2548 | return $value; |
@@ -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 | */ |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | use Alpha\Model\Type\Boolean; |
| 9 | 9 | use Alpha\Model\Type\Relation; |
| 10 | 10 | use Alpha\Util\Logging\Logger; |
| 11 | -use Alpha\Util\Config\Configprovider; |
|
| 12 | 11 | use Alpha\Util\Http\Session\SessionProviderFactory; |
| 13 | 12 | use Alpha\Exception\ValidationException; |
| 14 | 13 | use Alpha\Exception\FileNotFoundException; |
@@ -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 | * |
@@ -541,7 +541,7 @@ discard block |
||
| 541 | 541 | * @param string $sourceDir The path to the source directory. |
| 542 | 542 | * @param string $fileList The HTML list of files generated (pass by reference). |
| 543 | 543 | * @param int $fileCount The current file count (used in recursive calls). |
| 544 | - * @param array $excludeFiles An array of file names to exclude from the list rendered. |
|
| 544 | + * @param string[] $excludeFiles An array of file names to exclude from the list rendered. |
|
| 545 | 545 | * |
| 546 | 546 | * @return int The current filecount for the directory. |
| 547 | 547 | * |
@@ -578,7 +578,7 @@ discard block |
||
| 578 | 578 | * Recursively deletes the contents of the directory indicated (the directory itself is not deleted). |
| 579 | 579 | * |
| 580 | 580 | * @param string $sourceDir The path to the source directory. |
| 581 | - * @param array $excludeFiles An array of file names to exclude from the deletion. |
|
| 581 | + * @param string[] $excludeFiles An array of file names to exclude from the deletion. |
|
| 582 | 582 | * |
| 583 | 583 | * @throws Alpha\Exception\AlphaException |
| 584 | 584 | * |
@@ -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; |