AbstractDealProcessor   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 32
ccs 0
cts 9
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
process() 0 1 ?
1
<?php
2
/**
3
 * @author Jean Silva <[email protected]>
4
 * @license MIT
5
 */
6
namespace Jeancsil\FlightSpy\Facade;
7
8
use Jeancsil\FlightSpy\Api\DataTransfer\SessionParametersFactory;
9
use Jeancsil\FlightSpy\Api\Flights\LivePrice;
10
use Jeancsil\FlightSpy\Api\Processor\LivePricePostProcessor;
11
use Symfony\Component\Console\Input\InputInterface;
12
13
abstract class AbstractDealProcessor
14
{
15
    /**
16
     * @var SessionParametersFactory
17
     */
18
    protected $sessionParametersFactory;
0 ignored issues
show
Comprehensibility Naming introduced by
The variable name $sessionParametersFactory exceeds the maximum configured length of 20.

Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.

Loading history...
19
20
    /**
21
     * @var LivePrice
22
     */
23
    protected $livePricesApi;
24
25
    /**
26
     * @var LivePricePostProcessor
27
     */
28
    protected $livePricePostProcessor;
0 ignored issues
show
Comprehensibility Naming introduced by
The variable name $livePricePostProcessor exceeds the maximum configured length of 20.

Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.

Loading history...
29
30
    public function __construct(
31
        SessionParametersFactory $factory,
32
        LivePrice $livePriceApi,
33
        LivePricePostProcessor $livePricePostProcessor
0 ignored issues
show
Comprehensibility Naming introduced by
The variable name $livePricePostProcessor exceeds the maximum configured length of 20.

Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.

Loading history...
34
    ) {
35
        $this->sessionParametersFactory = $factory;
36
        $this->livePricesApi = $livePriceApi;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 12 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
37
        $this->livePricePostProcessor = $livePricePostProcessor;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 3 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
38
    }
39
40
    /**
41
     * @param InputInterface $input
42
     */
43
    abstract public function process(InputInterface $input);
0 ignored issues
show
Documentation introduced by
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
44
}
45