Test Failed
Branch master (c7fd68)
by Gaetano
06:34
created

FileExecutor   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 5
dl 0
loc 25
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getExecuteFileCallable() 0 3 1
A resultSetToArray() 0 3 1
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace Db3v4l\Core\SqlExecutor\InProcess;
4
5
use Db3v4l\API\Interfaces\SqlExecutor\InProcess\CommandExecutor as InProcessCommandExecutor;
6
use Db3v4l\API\Interfaces\SqlExecutor\InProcess\FileExecutor as InProcessFileExecutor;
7
8
class FileExecutor implements InProcessFileExecutor
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class FileExecutor
Loading history...
9
{
10
    /** @var InProcessCommandExecutor $wrappedExecutor */
0 ignored issues
show
Coding Style introduced by
The open comment tag must be the only content on the line
Loading history...
Coding Style introduced by
Missing short description in doc comment
Loading history...
Coding Style introduced by
The close comment tag must be the only content on the line
Loading history...
11
    protected $wrappedExecutor;
12
13
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
14
     * @param InProcessCommandExecutor $wrappedExecutor
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
15
     */
16
    public function __construct($wrappedExecutor)
17
    {
18
        $this->wrappedExecutor = $wrappedExecutor;
19
    }
20
21
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
22
     * @param string $filename
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
Coding Style introduced by
Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
Loading history...
23
     * @return Callable
0 ignored issues
show
Coding Style introduced by
Tag @return cannot be grouped with parameter tags in a doc comment
Loading history...
24
     */
25
    public function getExecuteFileCallable($filename)
26
    {
27
        return $this->wrappedExecutor->getExecuteCommandCallable(file_get_contents($filename));
28
    }
29
30
    public function resultSetToArray($data)
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function resultSetToArray()
Loading history...
31
    {
32
        return $this->wrappedExecutor->resultSetToArray($data);
33
    }
34
}
35