DataTransformerCollection::add()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
/*
3
 * WellCommerce Open-Source E-Commerce Platform
4
 * 
5
 * This file is part of the WellCommerce package.
6
 *
7
 * (c) Adam Piotrowski <[email protected]>
8
 * 
9
 * For the full copyright and license information,
10
 * please view the LICENSE file that was distributed with this source code.
11
 */
12
13
namespace WellCommerce\Component\Form\DataTransformer;
14
15
use WellCommerce\Component\Collections\ArrayCollection;
16
17
/**
18
 * Class DataTransformerCollection
19
 *
20
 * @author  Adam Piotrowski <[email protected]>
21
 */
22
class DataTransformerCollection extends ArrayCollection
23
{
24
    /**
25
     * Adds new transformer
26
     *
27
     * @param string $alias
28
     * @param string $transformer $serviceId
0 ignored issues
show
Bug introduced by
There is no parameter named $transformer. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
29
     */
30
    public function add($alias, $serviceId)
31
    {
32
        $this->items[$alias] = $serviceId;
33
    }
34
}
35