Completed
Push — master ( d98c10...e4052f )
by Nikolas
04:37
created

IndexResource::doGet()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 3
1
<?php
2
namespace rtens\domin\delivery\web\adapters\curir\root;
3
4
use watoki\curir\Container;
5
use watoki\curir\cookie\CookieStore;
6
use watoki\curir\delivery\WebRequest;
7
use watoki\deli\Path;
8
use watoki\deli\Request;
9
10
class IndexResource extends Container {
11
12
    /**
13
     * @param Request|WebRequest $request
14
     * @return \watoki\curir\delivery\WebResponse
15
     */
16
    public function respond(Request $request) {
17
        if (!$this->isContainerTarget($request)) {
18
            $request = $request
19
                ->withTarget(Path::fromString('execute'))
20
                ->withArgument(ExecuteResource::ACTION_ARG, $request->getTarget()->toString());
21
        }
22
        return parent::respond($request);
23
    }
24
}