Completed
Push — master ( ccd5f6...55e22e )
by Tyler
03:42 queued 02:32
created

Abbr::message()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace LVR\State;
4
5
class Abbr extends Base
6
{
7
    /**
8
     * Determine if the validation rule passes.
9
     *
10
     * @param  string $attribute
11
     * @param  mixed  $value
12
     * @return bool
13
     */
14 9
    public function passes($attribute, $value)
15
    {
16 9
        return $this->isAbbr($value, $this->country);
17
    }
18
19
    /**
20
     * Get the validation error message.
21
     *
22
     * @return string
23
     */
24 6
    public function message()
25
    {
26 6
        return ":attribute must be an abbreviated {$this->subject}";
27
    }
28
}
29