EmptyContainer::has()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
4
namespace TheCodingMachine\GraphQL\Controllers\Containers;
5
6
use Psr\Container\ContainerInterface;
7
8
/**
9
 * An always empty container (to use as a stub for the BasicAutoWiringContainer).
10
 */
11
class EmptyContainer implements ContainerInterface
12
{
13
    public function get($id)
14
    {
15
        throw NotFoundException::notFound($id);
16
    }
17
18
    public function has($id)
19
    {
20
        return false;
21
    }
22
}
23