Completed
Push — feature/middleware ( b01694...96a471 )
by Derek Stephen
03:17
created

AppPackage::hasEntityPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace BoneMvc\Module\App;
4
5
use App\Controller\IndexController;
6
use Bone\Mvc\Router\RouterConfigInterface;
7
use Barnacle\RegistrationInterface;
8
use Barnacle\Container;
9
use League\Route\Router;
10
11
class AppPackage implements RegistrationInterface, RouterConfigInterface
12
{
13
    /**
14
     * @param Container $c
15
     */
16
    public function addToContainer(Container $c)
17
    {
18
19
    }
20
21
    /**
22
     * @return string
23
     */
24
    public function getEntityPath(): string
25
    {
26
        return '';
27
    }
28
29
    /**
30
     * @return bool
31
     */
32
    public function hasEntityPath(): bool
33
    {
34
        return false;
35
    }
36
37
    /**
38
     * @param Container $c
39
     * @param Router $router
40
     * @return Router
41
     */
42
    public function addRoutes(Container $c, Router $router): Router
43
    {
44
        $router->map('GET', '/', [IndexController::class, 'indexAction']);
45
46
        return $router;
47
    }
48
}
49