Failed Conditions
Pull Request — master (#6886)
by Grégoire
63:22
created

ClassMetadataInfoTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 3

5 Methods

Rating   Name   Duplication   Size   Complexity  
testExtendingClassWithOldSignatureStillWorks() 0 5 ?
A hp$0 ➔ testExtendingClassWithOldSignatureStillWorks() 0 5 1
A testTheClassIsDeprecated() 0 3 1
A hp$0 ➔ whatever() 0 2 1
whatever() 0 2 ?
1
<?php
2
3
namespace Doctrine\Tests\ORM\Mapping;
4
5
use Doctrine\ORM\Mapping\ClassMetadata;
6
use Doctrine\ORM\Mapping\ClassMetadataInfo;
7
use PHPUnit\Framework\TestCase;
8
9
class ClassMetadataInfoTest extends TestCase
10
{
11
    /**
12
     * @group legacy
13
     * @expectedDeprecation Doctrine\ORM\Mapping\ClassMetadataInfo is deprecated since 2.x and will be removed in 3.0. Use Doctrine\ORM\Mapping\ClassMetadata instead.
14
     */
15
    public function testTheClassIsDeprecated()
16
    {
17
        class_exists(ClassMetadataInfo::class);
18
    }
19
20
    public function testExtendingClassWithOldSignatureStillWorks()
21
    {
22
        new class () extends ClassMetadataInfoTest {
23
            public function whatever(ClassMetadataInfo $cm)
24
            {
25
            }
26
        };
27
    }
28
29
    public function whatever(ClassMetadata $cm)
0 ignored issues
show
Unused Code introduced by
The parameter $cm 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

29
    public function whatever(/** @scrutinizer ignore-unused */ ClassMetadata $cm)

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...
30
    {
31
    }
32
}
33