@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | * |
52 | 52 | * @param integer $num Numerator |
53 | 53 | * @param integer $denom Denominator |
54 | - * @param float $default Default value if denominator null or 0 |
|
55 | - * @return float Result of the safe division |
|
54 | + * @param integer $default Default value if denominator null or 0 |
|
55 | + * @return integer Result of the safe division |
|
56 | 56 | */ |
57 | 57 | public static function safeDivision($num, $denom, $default = 0) { |
58 | 58 | if($denom && $denom!=0){ |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | * |
67 | 67 | * @param int $num Numerator |
68 | 68 | * @param int $denom Denominator |
69 | - * @param float $default Default value if denominator null or 0 |
|
70 | - * @return float Percentage |
|
69 | + * @param integer $default Default value if denominator null or 0 |
|
70 | + * @return integer Percentage |
|
71 | 71 | */ |
72 | 72 | public static function getPercentage($num, $denom, $default = 0){ |
73 | 73 | return 100 * self::safeDivision($num, $denom, $default); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | * |
79 | 79 | * @param string $file The image to resize |
80 | 80 | * @param int $target The final max width/height |
81 | - * @return array array of ($width, $height). One of them must be $target |
|
81 | + * @return integer[] array of ($width, $height). One of them must be $target |
|
82 | 82 | */ |
83 | 83 | static public function getResizedImageSize($file, $target=25){ |
84 | 84 | list($width, $height, $type, $attr) = getimagesize($file); |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | * Returns the generation associated with a Sosa number |
234 | 234 | * |
235 | 235 | * @param int $sosa Sosa number |
236 | - * @return number |
|
236 | + * @return integer |
|
237 | 237 | */ |
238 | 238 | public static function getGeneration($sosa){ |
239 | 239 | return(int)log($sosa, 2)+1; |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | * Returns whether the image type is supported by the system, and if so, return the standardised type |
247 | 247 | * |
248 | 248 | * @param string $reqtype Extension to test |
249 | - * @return boolean|string Is supported? |
|
249 | + * @return false|string Is supported? |
|
250 | 250 | */ |
251 | 251 | public static function isImageTypeSupported($reqtype) { |
252 | 252 | $supportByGD = array('jpg'=>'jpeg', 'jpeg'=>'jpeg', 'gif'=>'gif', 'png'=>'png'); |