Completed
Pull Request — develop (#3)
by
unknown
04:46
created

TransformDefault   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A apply() 0 4 2
1
<?php namespace Cerbero\Transformer\Transformations;
2
3
/**
4
 * Transform a value to a string.
5
 *
6
 * @author	Andrea Marco Sartori
7
 */
8
class TransformDefault extends AbstractTransformation
9
{
10
    /**
11
     * Apply the transformation.
12
     *
13
     * @author	Andrea Marco Sartori
14
     * @param	array	$params
15
     * @return	string
16
     */
17
    public function apply(array $params)
18
    {
19
        return empty($this->value) ? $params[0] : $this->value;
20
    }
21
}
22