Code Duplication    Length = 21-22 lines in 2 locations

app/Transformers/TeamSearchTransformer.php 1 location

@@ 12-32 (lines=21) @@
9
 * Class TeamSearchTransformer
10
 * @package App\Transformers
11
 */
12
class TeamSearchTransformer extends TransformerAbstract
13
{
14
    /**
15
     * @var array
16
     */
17
    protected $defaultIncludes = [];
18
19
    /**
20
     * @param Team $team
21
     * @return array
22
     */
23
    public function transform(Team $team)
24
    {
25
        return [
26
            'id' => $team->id,
27
            'text' => $team->name,
28
            'logoPath' => $team->logoPath,
29
            'updated_at' => $team->updated_at->format('F d, Y')
30
        ];
31
    }
32
}
33

app/Transformers/TeamTransformer.php 1 location

@@ 12-33 (lines=22) @@
9
 * Class TeamTransformer
10
 * @package App\Transformers
11
 */
12
class TeamTransformer extends TransformerAbstract
13
{
14
    /**
15
     * @var array
16
     */
17
    protected $defaultIncludes = [];
18
19
    /**
20
     * @param Team $team
21
     * @return array
22
     */
23
    public function transform(Team $team)
24
    {
25
        return [
26
            'id' => $team->id,
27
            'leagueId' => $team->leagueId,
28
            'name' => $team->name,
29
            'logoPath' => $team->logoPath,
30
            'updated_at' => $team->updated_at->format('F d, Y')
31
        ];
32
    }
33
}
34