StringAttribute   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 5
c 2
b 0
f 0
dl 0
loc 14
ccs 2
cts 4
cp 0.5
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A factory() 0 3 1
A rules() 0 3 1
1
<?php
2
3
namespace Larapie\Actions\Attributes;
4
5
use Faker\Generator;
6
use Larapie\Actions\Attribute;
7
use Larapie\Actions\Attributes\Rules\StringRules;
8
9
class StringAttribute extends Attribute
10
{
11
    use StringRules;
12
13
    protected $cast = 'string';
14
15 2
    protected function rules()
16
    {
17 2
        return 'string';
18
    }
19
20
    public function factory(Generator $faker)
21
    {
22
        return $faker->text;
23
    }
24
}
25