These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Hateoas\Tests\Fixtures; |
||
4 | |||
5 | use Hateoas\Configuration\Annotation as Hateoas; |
||
6 | use JMS\Serializer\Annotation as Serializer; |
||
7 | |||
8 | /** |
||
9 | * @Serializer\ExclusionPolicy("all") |
||
10 | * |
||
11 | * @Hateoas\Relation("reference2", embedded="expr(object.getReference2())") |
||
12 | */ |
||
13 | class CircularReference1 |
||
14 | { |
||
15 | /** |
||
16 | * @Serializer\Expose |
||
17 | */ |
||
18 | private $name = 'reference1'; |
||
0 ignored issues
–
show
|
|||
19 | |||
20 | private $reference2; |
||
21 | |||
22 | public function setReference2($reference2) |
||
23 | { |
||
24 | $this->reference2 = $reference2; |
||
25 | } |
||
26 | |||
27 | public function getReference2() |
||
28 | { |
||
29 | return $this->reference2; |
||
30 | } |
||
31 | } |
||
32 |
This check marks private properties in classes that are never used. Those properties can be removed.