Completed
Push — master ( e8b86c...279d13 )
by Sullivan
02:12
created

__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace Nexy\PayboxDirect\Request;
4
5
/**
6
 * @author Sullivan Senechal <[email protected]>
7
 */
8
abstract class AbstractReferencedTransactionRequest extends AbstractTransactionRequest
9
{
10
    /**
11
     * @var string
12
     */
13
    private $reference;
14
15
    /**
16
     * @param int $reference
17
     * @param int $amount
18
     */
19
    public function __construct($reference, $amount)
20
    {
21
        parent::__construct($amount);
22
23
        $this->reference = $reference;
0 ignored issues
show
Documentation Bug introduced by
The property $reference was declared of type string, but $reference is of type integer. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
24
    }
25
26
    public function getParameters()
27
    {
28
        $parameters = [
29
            'REFERENCE' => $this->reference,
30
        ];
31
32
        return array_merge(parent::getParameters(), $parameters);
33
    }
34
}
35