ViewModelService::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 1
1
<?php
2
3
namespace gotakk\ViewModelBundle\Services;
4
5
use gotakk\ViewModelBundle\ViewModel\ViewModelNode;
6
7
class ViewModelService
8
{
9
    public function __construct($irregularPlurals = array())
10
    {
11
        foreach ($irregularPlurals as $singular => $plural)
12
            ViewModelNode::addPlural($singular, $plural);
13
    }
14
15
    public function createViewModel()
16
    {
17
        return new ViewModelNode();
18
    }
19
}
20