AbstractAccount   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 4
dl 0
loc 9
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getLocation() 0 4 1
1
<?php
2
3
namespace LE_ACME2\Response\Account;
4
5
use LE_ACME2\Response\AbstractResponse;
6
7
abstract class AbstractAccount extends AbstractResponse {
8
9
    const STATUS_VALID = 'valid';
10
11
12
    public function getLocation() : string {
13
14
        $matches = $this->_preg_match_headerLine($this->_pattern_header_location);
0 ignored issues
show
Bug introduced by
Are you sure the assignment to $matches is correct as $this->_preg_match_heade...attern_header_location) targeting LE_ACME2\Response\Abstra...preg_match_headerLine() seems to always return null.

This check looks for function or method calls that always return null and whose return value is assigned to a variable.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
$object = $a->getObject();

The method getObject() can return nothing but null, so it makes no sense to assign that value to a variable.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
15
        return trim($matches[1]);
16
    }
17
}