Passed
Branch develop (7f369c)
by Nicolas
04:24
created

ProfilesGetController   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\Api;
4
5
use App\Entity\User;
6
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
7
use Symfony\Component\Routing\Annotation\Route;
8
9
/**
10
 * ProfilesGetController.
11
 *
12
 * @Route("/api/profiles/{username}", name="api_profiles_get")
13
 * @Method("GET")
14
 */
15
class ProfilesGetController
16
{
17
    /**
18
     * @param User $profile
19
     *
20
     * @return array
21
     */
22 1
    public function __invoke(User $profile)
23
    {
24 1
        return ['profile' => $profile];
25
    }
26
}
27