Completed
Pull Request — master (#12)
by
unknown
01:27
created

Config::__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 Escopecz\MauticFormSubmit\Mautic;
4
5
/**
6
 * Mautic Configuration
7
 */
8
class Config
9
{
10
    /**
11
     * Curl verbose logging option
12
     *
13
     * @var bool
14
     */
15
    protected $curlVerbose = 1; 
16
    
17
    /**
18
     * Constructor
19
     *
20
     * @param int $curlVerbose
21
     */
22
    public function __construct(int $curlVerbose)
23
    {
24
        $this->curlVerbose = $curlVerbose;
0 ignored issues
show
Documentation Bug introduced by
The property $curlVerbose was declared of type boolean, but $curlVerbose 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...
25
    }
26
27
    /**
28
     * Returns Curl verbose logging option
29
     *
30
     * @return bool
31
     */
32
    public function getCurlVerbose()
33
    {
34
        return $this->curlVerbose;
35
    }
36
    
37
    /**
38
     * Set Curl verbose logging option
39
     *
40
     * @param bool $curlVerbose
41
     *
42
     * @return Config
43
     */
44
    public function setCurlVerbose($curlVerbose)
45
    {
46
        $this->curlVerbose = $curlVerbose;
47
48
        return $this;
49
    }
50
}
51