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

SecondProcess::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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