CouponFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 18
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A definition() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MichaelRubel\Couponables\Models\Factories;
6
7
use Illuminate\Database\Eloquent\Factories\Factory;
8
use MichaelRubel\Couponables\Models\Coupon;
9
10
/**
11
 * @extends Factory<Coupon>
12
 */
13
class CouponFactory extends Factory
14
{
15
    /**
16
     * The name of the factory's corresponding model.
17
     *
18
     * @var class-string<Coupon>
0 ignored issues
show
Documentation Bug introduced by
The doc comment class-string<Coupon> at position 0 could not be parsed: Unknown type name 'class-string' at position 0 in class-string<Coupon>.
Loading history...
19
     */
20
    protected $model = Coupon::class;
21
22
    /**
23
     * Define the model's default state.
24
     *
25
     * @return array<string, mixed>
26
     */
27 56
    public function definition(): array
28
    {
29 56
        return [
30 56
            'code' => 'test-code',
31 56
        ];
32
    }
33
}
34