Completed
Push — master ( ea15e4...6b748c )
by Michał
04:07
created

SecondProcess   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 1
dl 0
loc 43
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A exec() 0 6 1
A open() 0 4 1
A close() 0 4 1
A terminate() 0 4 1
A status() 0 4 1
1
<?php
2
3
namespace Phppm;
4
5
use Symfony\Component\Console\Output\OutputInterface;
6
7
class SecondProcess implements ProcessInterface
8
{
9
    /**
10
     * @var OutputInterface 
11
     */
12
    protected $output;
13
14
    /**
15
     * Process constructor.
16
     * @param OutputInterface $output
17
     */
18
    public function __construct(OutputInterface $output)
19
    {
20
        $this->output = $output;
21
    }
22
23
    public function exec()
24
    {
25
        $now = \DateTime::createFromFormat('U.u', microtime(true));
26
        $time = $now->format("Y-d-m H:i:s.u");
27
        $this->output->writeln("[$time] heartbeattttt");
28
    }
29
30
    public function open()
31
    {
32
33
    }
34
35
    public function close()
36
    {
37
        // TODO: Implement close() method.
38
    }
39
40
    public function terminate()
41
    {
42
        // TODO: Implement terminate() method.
43
    }
44
45
    public function status()
46
    {
47
        // TODO: Implement status() method.
48
    }
49
}
50