PostStory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 14
c 1
b 0
f 0
dl 0
loc 22
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 20 1
1
<?php
2
3
namespace Zenstruck\Foundry\Tests\Fixtures\Stories;
4
5
use Zenstruck\Foundry\Story;
6
use Zenstruck\Foundry\Tests\Fixtures\Factories\PostFactory;
7
8
/**
9
 * @author Kevin Bond <[email protected]>
10
 */
11
final class PostStory extends Story
12
{
13
    public function build(): void
14
    {
15
        $this->addState('postA', PostFactory::new()->create([
16
            'title' => 'Post A',
17
            'category' => CategoryStory::php(),
0 ignored issues
show
Bug introduced by
The method php() does not exist on Zenstruck\Foundry\Tests\...s\Stories\CategoryStory. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

17
            'category' => CategoryStory::/** @scrutinizer ignore-call */ php(),
Loading history...
18
        ]));
19
20
        $this->addState('postB', PostFactory::new()->create([
21
            'title' => 'Post B',
22
            'category' => CategoryStory::php(),
23
        ])->object());
24
25
        $this->addState('postC', PostFactory::new([
26
            'title' => 'Post C',
27
            'category' => CategoryStory::symfony(),
0 ignored issues
show
Bug introduced by
The method symfony() does not exist on Zenstruck\Foundry\Tests\...s\Stories\CategoryStory. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

27
            'category' => CategoryStory::/** @scrutinizer ignore-call */ symfony(),
Loading history...
28
        ]));
29
30
        PostFactory::new()->create([
31
            'title' => 'Post D',
32
            'category' => CategoryStory::php(),
33
        ]);
34
    }
35
}
36