| Total Complexity | 5 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Coverage | 75% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class ProfileController extends Controller |
||
| 15 | { |
||
| 16 | private $hash; |
||
| 17 | |||
| 18 | 2 | public function __construct(Hash $hash) |
|
| 21 | 2 | } |
|
| 22 | |||
| 23 | /** |
||
| 24 | * Get current user's profile. |
||
| 25 | * |
||
| 26 | * @response { |
||
| 27 | * "id": 42, |
||
| 28 | * "name": "John Doe", |
||
| 29 | * "email": "[email protected]" |
||
| 30 | * } |
||
| 31 | * |
||
| 32 | * @return JsonResponse |
||
| 33 | */ |
||
| 34 | public function show(Request $request) |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Update current user's profile. |
||
| 41 | * |
||
| 42 | * @bodyParam name string required New name. Example: Johny Doe |
||
| 43 | * @bodyParam email string required New email. Example: [email protected] |
||
| 44 | * @bodyParam password string New password (null/blank for no change) |
||
| 45 | * |
||
| 46 | * @response [] |
||
| 47 | * |
||
| 48 | * @throws RuntimeException |
||
| 49 | * |
||
| 50 | * @return JsonResponse |
||
| 51 | */ |
||
| 52 | 2 | public function update(ProfileUpdateRequest $request) |
|
| 67 |