@@ -4,14 +4,14 @@ |
||
4 | 4 | |
5 | 5 | class NumberFormatException extends Exception implements PhoneNumberException |
6 | 6 | { |
7 | - /** |
|
8 | - * Invalid number format static constructor. |
|
9 | - * |
|
10 | - * @param string $format |
|
11 | - * @return static |
|
12 | - */ |
|
13 | - public static function invalid($format) |
|
14 | - { |
|
15 | - return new static('Invalid number format "' . $format . '".'); |
|
16 | - } |
|
7 | + /** |
|
8 | + * Invalid number format static constructor. |
|
9 | + * |
|
10 | + * @param string $format |
|
11 | + * @return static |
|
12 | + */ |
|
13 | + public static function invalid($format) |
|
14 | + { |
|
15 | + return new static('Invalid number format "' . $format . '".'); |
|
16 | + } |
|
17 | 17 | } |
18 | 18 | \ No newline at end of file |
@@ -4,14 +4,14 @@ |
||
4 | 4 | |
5 | 5 | class CountryCodeException extends Exception implements PhoneNumberException |
6 | 6 | { |
7 | - /** |
|
8 | - * Invalid country code static constructor. |
|
9 | - * |
|
10 | - * @param string $country |
|
11 | - * @return static |
|
12 | - */ |
|
13 | - public static function invalid($country) |
|
14 | - { |
|
15 | - return new static('Invalid country code "' . $country . '".'); |
|
16 | - } |
|
7 | + /** |
|
8 | + * Invalid country code static constructor. |
|
9 | + * |
|
10 | + * @param string $country |
|
11 | + * @return static |
|
12 | + */ |
|
13 | + public static function invalid($country) |
|
14 | + { |
|
15 | + return new static('Invalid country code "' . $country . '".'); |
|
16 | + } |
|
17 | 17 | } |
@@ -5,17 +5,17 @@ |
||
5 | 5 | |
6 | 6 | class NumberParseException extends Exception implements PhoneNumberException |
7 | 7 | { |
8 | - /** |
|
9 | - * Country specification required static constructor. |
|
10 | - * |
|
11 | - * @param string $number |
|
12 | - * @return static |
|
13 | - */ |
|
14 | - public static function countryRequired($number) |
|
15 | - { |
|
16 | - return new static( |
|
17 | - libNumberParseException::INVALID_COUNTRY_CODE, |
|
18 | - 'Country specification for number "' . $number . '" required.' |
|
19 | - ); |
|
20 | - } |
|
8 | + /** |
|
9 | + * Country specification required static constructor. |
|
10 | + * |
|
11 | + * @param string $number |
|
12 | + * @return static |
|
13 | + */ |
|
14 | + public static function countryRequired($number) |
|
15 | + { |
|
16 | + return new static( |
|
17 | + libNumberParseException::INVALID_COUNTRY_CODE, |
|
18 | + 'Country specification for number "' . $number . '" required.' |
|
19 | + ); |
|
20 | + } |
|
21 | 21 | } |
22 | 22 | \ No newline at end of file |
@@ -5,27 +5,27 @@ |
||
5 | 5 | |
6 | 6 | class InvalidParameterException extends Exception implements PhoneNumberException |
7 | 7 | { |
8 | - /** |
|
9 | - * Ambiguous parameter static constructor. |
|
10 | - * |
|
11 | - * @param string $parameter |
|
12 | - * @return static |
|
13 | - */ |
|
14 | - public static function ambiguous($parameter) |
|
15 | - { |
|
16 | - return new static('Ambiguous phone validation parameter: "' . $parameter . '". This parameter is recognized as an input field and as a phone type. Please rename the input field.'); |
|
17 | - } |
|
8 | + /** |
|
9 | + * Ambiguous parameter static constructor. |
|
10 | + * |
|
11 | + * @param string $parameter |
|
12 | + * @return static |
|
13 | + */ |
|
14 | + public static function ambiguous($parameter) |
|
15 | + { |
|
16 | + return new static('Ambiguous phone validation parameter: "' . $parameter . '". This parameter is recognized as an input field and as a phone type. Please rename the input field.'); |
|
17 | + } |
|
18 | 18 | |
19 | - /** |
|
20 | - * Invalid parameters static constructor. |
|
21 | - * |
|
22 | - * @param array|Collection $parameters |
|
23 | - * @return static |
|
24 | - */ |
|
25 | - public static function parameters($parameters) |
|
26 | - { |
|
27 | - $parameters = Collection::make($parameters); |
|
19 | + /** |
|
20 | + * Invalid parameters static constructor. |
|
21 | + * |
|
22 | + * @param array|Collection $parameters |
|
23 | + * @return static |
|
24 | + */ |
|
25 | + public static function parameters($parameters) |
|
26 | + { |
|
27 | + $parameters = Collection::make($parameters); |
|
28 | 28 | |
29 | - return new static('Invalid phone validation parameters: "' . $parameters->implode(',') . '".'); |
|
30 | - } |
|
29 | + return new static('Invalid phone validation parameters: "' . $parameters->implode(',') . '".'); |
|
30 | + } |
|
31 | 31 | } |
32 | 32 | \ No newline at end of file |