Completed
Push — master ( 4bf91f...d42076 )
by Nicolas
03:14
created

CommandGenerator::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Puzzle\AMQP\Services;
4
5
use Puzzle\Pieces\PathManipulation;
6
7
class CommandGenerator
8
{
9
    const WORKER_ENTRYPOINT_FILENAME = 'worker';
10
11
    use
12
        PathManipulation;
13
14 7
    public function generate($worker)
15
    {
16 7
        $pattern = '/usr/bin/php worker run %s';
17
18 7
        return sprintf($pattern, $worker);
19
    }
20
}
21