| 1 | <?php |
||
| 15 | class ViewHelper |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * This class should not be instantiate. |
||
| 19 | */ |
||
| 20 | private function __construct() |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Returns side CSS class for block. |
||
| 26 | * This method should use in loops. |
||
| 27 | * |
||
| 28 | * @param string $right CSS class for right block. |
||
| 29 | * @param string $left CSS class for left block. |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | public static function sideCssClass($right = 'right', $left = 'left') |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Check whether is last iteration of the loop. |
||
| 40 | * |
||
| 41 | * @param int $total |
||
| 42 | * @return bool |
||
| 43 | */ |
||
| 44 | public static function isLast($total) |
||
| 49 | |||
| 50 | /** |
||
| 51 | * If number less than 9 before this number will be added zero. |
||
| 52 | * |
||
| 53 | * @param int|string $number |
||
| 54 | * @return string |
||
|
|
|||
| 55 | */ |
||
| 56 | public static function zeroNumber($number) |
||
| 60 | |||
| 61 | /** |
||
| 62 | * Generates even numbers. |
||
| 63 | * |
||
| 64 | * @return int Returns even number. |
||
| 65 | */ |
||
| 66 | public static function evenNumber() |
||
| 74 | |||
| 75 | /** |
||
| 76 | * Generates odd numbers. |
||
| 77 | * |
||
| 78 | * @return int Returns add number. |
||
| 79 | */ |
||
| 80 | public static function oddNumber() |
||
| 88 | } |
||
| 89 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.