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.
Completed
Push — master ( c19cc3...72cdd3 )
by joseph
30:50 queued 27:52
created

MockEntityFactory   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 7
dl 0
loc 22
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A hp$0 ➔ setCustomRepositoryClass() 0 2 1
A hp$0 ➔ getId() 0 3 1
createMockEntity() 0 20 ?
A hp$0 ➔ createMockEntity() 0 20 1
A hp$0 ➔ __construct() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Tests\Assets;
4
5
use Doctrine\ORM\Mapping\Builder\ClassMetadataBuilder;
6
use Doctrine\ORM\Mapping\ClassMetadata;
7
use EdmondsCommerce\DoctrineStaticMeta\Entity\Interfaces\EntityInterface;
8
use EdmondsCommerce\DoctrineStaticMeta\Entity\Traits\ImplementNotifyChangeTrackingPolicy;
9
use EdmondsCommerce\DoctrineStaticMeta\Entity\Traits\UsesPHPMetaDataTrait;
10
use EdmondsCommerce\DoctrineStaticMeta\Entity\Traits\ValidatedEntityTrait;
11
12
/**
13
 * Class MockEntityFactory
14
 *
15
 * @package EdmondsCommerce\DoctrineStaticMeta\Tests\Assets
16
 * @SuppressWarnings(PHPMD.UnusedLocalVariable)
17
 */
18
class MockEntityFactory
19
{
20
    public static function createMockEntity(): EntityInterface
21
    {
22
        return new class() implements EntityInterface
23
        {
24
            use ImplementNotifyChangeTrackingPolicy,
25
                UsesPHPMetaDataTrait,
26
                ValidatedEntityTrait;
27
28
            public function __construct()
29
            {
30
                self::getDoctrineStaticMeta()->setMetaData(new ClassMetadata('anon'));
31
            }
32
33
            protected static function setCustomRepositoryClass(ClassMetadataBuilder $builder)
0 ignored issues
show
Unused Code introduced by
The parameter $builder is not used and could be removed. ( Ignorable by Annotation )

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

33
            protected static function setCustomRepositoryClass(/** @scrutinizer ignore-unused */ ClassMetadataBuilder $builder)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
34
            {
35
            }
36
37
            public function getId()
38
            {
39
                return 1;
40
            }
41
        };
42
    }
43
}
44