Completed
Push — master ( 3a87d5...4e429b )
by Kirill
04:26
created

FileWriter::write()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 11
c 0
b 0
f 0
ccs 0
cts 8
cp 0
rs 9.4285
cc 2
eloc 5
nc 2
nop 1
crap 6
1
<?php
2
3
namespace AppBundle\Action\Executor;
4
5
use AppBundle\Entity\Action;
6
7
class FileWriter extends BaseExecutor implements ExecutorInterface
8
{
9
    public function write(Action $action)
10
    {
11
12
        $parameters = json_decode($action->getArguments(), true);
13
14
        foreach ($this->parameters as $k => $v) {
15
            $parameters[$k] = $this->parameters[$k];
16
        }
17
18
        return "File written successfully";
19
    }
20
}
21