@@ -26,11 +26,11 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | const TITLES = [ |
| 28 | 28 | 'Mr.', |
| 29 | - 'Ms.', // address for women regardless of their marital status |
|
| 29 | + 'Ms.', // address for women regardless of their marital status |
|
| 30 | 30 | 'Mrs.', |
| 31 | 31 | 'Miss', |
| 32 | - 'Mx.', // a title that does not indicate gender |
|
| 33 | - 'Adv.', // advocate |
|
| 32 | + 'Mx.', // a title that does not indicate gender |
|
| 33 | + 'Adv.', // advocate |
|
| 34 | 34 | 'Capt.', // captain |
| 35 | 35 | 'Dr.', |
| 36 | 36 | 'Prof.', // professor |
@@ -84,8 +84,8 @@ |
||
| 84 | 84 | public static function createFromCidrNotation($cidr) |
| 85 | 85 | { |
| 86 | 86 | list($subnet, $bits) = explode('/', $cidr); |
| 87 | - $start = long2ip((ip2long($subnet)) & ((-1 << (32 - (int)$bits)))); |
|
| 88 | - $end = long2ip((ip2long($subnet)) + pow(2, (32 - (int)$bits))-1); |
|
| 87 | + $start = long2ip((ip2long($subnet)) & ((-1 << (32 - (int) $bits)))); |
|
| 88 | + $end = long2ip((ip2long($subnet)) + pow(2, (32 - (int) $bits)) - 1); |
|
| 89 | 89 | |
| 90 | 90 | return new IpRange(new IpAddress($start), new IpAddress($end)); |
| 91 | 91 | } |
@@ -163,7 +163,7 @@ |
||
| 163 | 163 | /** |
| 164 | 164 | * Returns distance between two colors. |
| 165 | 165 | * |
| 166 | - * @param array $color1 RGB color |
|
| 166 | + * @param integer[] $color1 RGB color |
|
| 167 | 167 | * @param array $color2 RGB color |
| 168 | 168 | * |
| 169 | 169 | * @see https://stackoverflow.com/questions/4057475/rounding-colours |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | { |
| 74 | 74 | list($r, $g, $b) = sscanf($this->color, "%02x%02x%02x"); |
| 75 | 75 | |
| 76 | - return [ $r, $g, $b ]; |
|
| 76 | + return [$r, $g, $b]; |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /** |
@@ -173,9 +173,9 @@ discard block |
||
| 173 | 173 | private function distanceL2(array $color1, array $color2) |
| 174 | 174 | { |
| 175 | 175 | return sqrt( |
| 176 | - pow($color1[0]-$color2[0], 2) + |
|
| 177 | - pow($color1[1]-$color2[1], 2) + |
|
| 178 | - pow($color1[2]-$color2[2], 2) |
|
| 176 | + pow($color1[0] - $color2[0], 2) + |
|
| 177 | + pow($color1[1] - $color2[1], 2) + |
|
| 178 | + pow($color1[2] - $color2[2], 2) |
|
| 179 | 179 | ); |
| 180 | 180 | } |
| 181 | 181 | |