Passed
Branch master (1fd71c)
by Nicolas
03:28
created

GetProfileController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 3 1
1
<?php
2
3
namespace App\Controller\Profile;
4
5
use App\Entity\User;
6
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
7
use Symfony\Component\Routing\Annotation\Route;
8
9
/**
10
 * @Route("/api/profiles/{username}", name="api_profiles_get")
11
 * @Method("GET")
12
 */
13
final class GetProfileController
14
{
15
    /**
16
     * @param User $profile
17
     *
18
     * @return array
19
     */
20 1
    public function __invoke(User $profile)
21
    {
22 1
        return ['profile' => $profile];
23
    }
24
}
25