Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function transform(TournamentTeam $tournamentTeam) |
||
24 | { |
||
25 | return [ |
||
26 | 'id' => $tournamentTeam->id, |
||
|
|||
27 | 'name' => $tournamentTeam->team->name, |
||
28 | 'logoPath' => $tournamentTeam->team->logoPath, |
||
29 | 'teamId' => $tournamentTeam->team->id, |
||
30 | 'tournamentId' => $tournamentTeam->tournamentId, |
||
31 | 'tournament' => $tournamentTeam->tournamentId, |
||
32 | 'updated_at' => $tournamentTeam->team->updated_at->format('F d, Y') |
||
33 | ]; |
||
34 | } |
||
35 | } |
||
36 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.