Completed
Branch dev-v3 (d0b49e)
by Propa
01:27
created

NumberParseException::countryRequired()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 7
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
c 1
b 0
f 0
1
<?php namespace Propaganistas\LaravelPhone\Exceptions;
2
3
use libphonenumber\NumberParseException as libNumberParseException;
4
5
class NumberParseException extends libNumberParseException
6
{
7
    /**
8
     * Country specification required static constructor.
9
     *
10
     * @param string $number
11
     * @return static
12
     */
13 27
    public static function countryRequired($number)
14
    {
15 27
        return new static(
16 27
            libNumberParseException::INVALID_COUNTRY_CODE,
17 27
            'Country specification for number "' . $number . '" required.'
18
        );
19
    }
20
}