Completed
Pull Request — master (#46)
by Michael
03:12
created

UberManager   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 5
dl 0
loc 33
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
namespace Michaels\Manager;
3
4
use ArrayAccess;
5
use Countable;
6
use Interop\Container\ContainerInterface;
7
use IteratorAggregate;
8
use JsonSerializable;
9
use Michaels\Manager\Contracts\ChainsNestedItemsInterface;
10
use Michaels\Manager\Contracts\LoadsFilesInterface;
11
use Michaels\Manager\Contracts\ManagesIocInterface;
12
use Michaels\Manager\Contracts\ManagesItemsInterface;
13
use Michaels\Manager\Traits\ArrayableTrait;
14
use Michaels\Manager\Traits\ChainsNestedItemsTrait;
15
use Michaels\Manager\Traits\LoadsFilesTrait;
16
use Michaels\Manager\Traits\ManagesIocTrait;
17
use Michaels\Manager\Traits\ManagesItemsTrait;
18
19
/**
20
 * Manages deeply nested, complex data.
21
 *
22
 * This manager class does it all, and is more a proof of concept than anything else.
23
 * It manages dependencies, loads files, uses magic methods, is arrayable, and all the rest.
24
 *
25
 * @package Michaels\Manager
26
 */
27
class UberManager implements
28
    ManagesItemsInterface,
29
    ChainsNestedItemsInterface,
30
    ManagesIocInterface,
31
    LoadsFilesInterface,
32
33
    // Array Access
34
    ArrayAccess,
35
    Countable,
36
    IteratorAggregate,
37
    JsonSerializable,
38
39
    // Standards
40
    ContainerInterface
41
42
{
0 ignored issues
show
Coding Style introduced by
Opening brace of a class must be on the line following the class declaration; found 1 line(s)
Loading history...
43
    use ManagesItemsTrait, ChainsNestedItemsTrait, ArrayableTrait, ManagesIocTrait, LoadsFilesTrait;
44
45
    /**
46
     * The items stored in the manager
47
     * @var array $items Items governed by manager
48
     */
49
    protected $items;
50
51
    /**
52
     * Build a new manager instance
53
     * @param array $items
54
     */
55
    public function __construct($items = [])
56
    {
57
        $this->initManager($items);
58
    }
59
}
60