Completed
Push — master ( f67f4f...77dcfd )
by Curtis
40s queued 12s
created

Mutators::hasSetMutator()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 2
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
namespace App\Traits\enso\DynamicMethods;
4
5
use Illuminate\Support\Str;
6
7
trait Mutators
8
{
9
    use Methods;
10
11
    public function hasGetMutator($key)
12
    {
13
        return isset(static::$dynamicMethods['get'.Str::studly($key).'Attribute'])
14
            || parent::hasGetMutator($key);
15
    }
16
17
    public function hasSetMutator($key)
18
    {
19
        return isset(static::$dynamicMethods['set'.Str::studly($key).'Attribute'])
20
            || parent::hasSetMutator($key);
21
    }
22
}
23