Structure   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 27
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A addSubject() 0 4 1
A getSubjects() 0 4 1
1
<?php
2
/**
3
 * Particle.
4
 *
5
 * @link      http://github.com/particle-php for the canonical source repository
6
 * @copyright Copyright (c) 2005-2016 Particle (http://particle-php.com)
7
 * @license   https://github.com/particle-php/validator/blob/master/LICENSE New BSD License
8
 */
9
namespace Particle\Validator\Output;
10
11
/**
12
 * Structure is an object for communicating the internal state and structure of Validator to an output object.
13
 *
14
 * @package Particle\Validator\Output
15
 */
16
class Structure
17
{
18
    /**
19
     * @var Subject[]
20
     */
21
    protected $subjects;
22
23
    /**
24
     * Add a subject (representation of Chain) to the structure.
25
     *
26
     * @param Subject $subject
27
     */
28 2
    public function addSubject(Subject $subject)
29
    {
30 2
        $this->subjects[] = $subject;
31 2
    }
32
33
    /**
34
     * Returns an array of all subjects.
35
     *
36
     * @return Subject[]
37
     */
38 2
    public function getSubjects()
39
    {
40 2
        return $this->subjects;
41
    }
42
}
43