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

Process   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 25
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getFormattedTime() 0 5 1
1
<?php
2
3
namespace Phppm;
4
5
use Symfony\Component\Console\Output\OutputInterface;
6
7
abstract class Process 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
    /**
24
     * @return string
25
     */
26
    protected function getFormattedTime() : string
27
    {
28
        $now = \DateTime::createFromFormat('U.u', microtime(true));
29
        return $now->format("Y-d-m H:i:s.u");
30
    }
31
}
32