InfobipConfig   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 33
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getFrom() 0 4 1
A getNotifyUrl() 0 4 1
1
<?php
2
3
namespace NotificationChannels\Infobip;
4
5
class InfobipConfig
6
{
7
    /**
8
     * @var InfobipConfig
9
     */
10
    public $config;
11
12
    /**
13
     * InfobipConfig constructor.
14
     *
15
     * @param array $config
16
     */
17
    public function __construct(array $config)
18
    {
19
        $this->config = $config;
0 ignored issues
show
Documentation Bug introduced by
It seems like $config of type array is incompatible with the declared type object<NotificationChann...\Infobip\InfobipConfig> of property $config.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
20
    }
21
22
    /**
23
     * @return mixed
24
     */
25
    public function getFrom()
26
    {
27
        return $this->config['from'];
28
    }
29
30
    /**
31
     * @return mixed
32
     */
33
    public function getNotifyUrl()
34
    {
35
        return $this->config['notify_url'];
36
    }
37
}
38