CreateShiftInput   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 2
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 11 4
1
<?php
2
3
namespace Scheduler\Web\Radar\Input;
4
5
use Psr\Http\Message\ServerRequestInterface as Request;
6
7
class CreateShiftInput extends Input
8
{
9
    public function __invoke(Request $request)
10
    {
11
        $user = $this->getCurrentUser($request);
12
13
        $body = $request->getParsedBody();
14
        $start = isset($body->start) ? $body->start : '';
15
        $end = isset($body->end) ? $body->end : '';
16
        $break = isset($body->break) ? $body->break : '';
17
18
        return [$user, $start, $end, $break];
19
    }
20
}
21