GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( d376a5...e682e0 )
by
unknown
04:24
created

BlogFixture::load()   B

Complexity

Conditions 6
Paths 10

Size

Total Lines 55
Code Lines 27

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 27
c 1
b 0
f 1
dl 0
loc 55
rs 8.8657
cc 6
nc 10
nop 1

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
declare(strict_types=1);
4
5
namespace Odiseo\SyliusBlogPlugin\Fixture;
6
7
use Sylius\Bundle\CoreBundle\Fixture\AbstractResourceFixture;
8
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
9
10
final class BlogFixture extends AbstractResourceFixture
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15
    protected function configureResourceNode(ArrayNodeDefinition $resourceNode): void
16
    {
17
        $resourceNode
18
            ->children()
19
                ->arrayNode('channels')->scalarPrototype()->end()->end()
0 ignored issues
show
Bug introduced by
The method end() does not exist on Symfony\Component\Config...der\NodeParentInterface. It seems like you code against a sub-type of said class. However, the method does not exist in Symfony\Component\Config...ion\Builder\TreeBuilder. Are you sure you never get one of those? ( Ignorable by Annotation )

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

19
                ->arrayNode('channels')->scalarPrototype()->end()->/** @scrutinizer ignore-call */ end()
Loading history...
20
                ->scalarNode('image')->end()
21
        ;
22
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function getName(): string
28
    {
29
        return 'blog';
30
    }
31
}
32