Completed
Push — master ( 238484...b2edf5 )
by Tyler
126:56 queued 61:56
created

E164::message()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace LVR\Phone;
3
4
use Illuminate\Contracts\Validation\Rule;
5
6
class E164 extends Phone
7
{
8
    /**
9
     * Determine if the validation rule passes.
10
     *
11
     * @param  string $attribute
12
     * @param  mixed  $value
13
     *
14
     * @return bool
15
     */
16
    public function passes($attribute, $value)
17
    {
18
        return $this->isE164($value);
19
    }
20
21
    /**
22
     * Get the validation error message.
23
     *
24
     * @return string
25
     */
26
    public function message()
27
    {
28
        return ':attribute must be in E.164 phone format';
29
    }
30
}