Completed
Push — master ( bd4c23...b341c0 )
by Filipe
10:29
created

NameSpaceCollection   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A offsetSet() 0 4 1
A add() 0 5 1
1
<?php
2
3
/**
4
 * This file is part of slick/mvc package
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Slick\Mvc\Console\Command\Task\AskForNamespace;
11
12
use Slick\Common\Utils\Collection\AbstractCollection;
13
use Slick\Common\Utils\CollectionInterface;
14
15
/**
16
 * NameSpaceCollection
17
 *
18
 * @package Slick\Mvc\Console\Command\Task\AskForNamespace
19
 * @author  Filipe Silva <[email protected]>
20
 */
21
class NameSpaceCollection extends AbstractCollection implements
22
    CollectionInterface
23
{
24
25
    public function offsetSet($offset, $value)
26
    {
27
        $this->add($value);
28
    }
29
30
    /**
31
     * Adds an item to the collection
32
     *
33
     * @param NameSpaceEntry $nameSpace
34
     *
35
     * @return NameSpaceCollection
36
     */
37
    public function add(NameSpaceEntry $nameSpace)
38
    {
39
        $this->data[] = $nameSpace;
40
        return $this;
41
    }
42
}