Test Setup Failed
Push — master ( 746af9...581479 )
by Vasil
04:39
created

Parser::unit()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 1
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Parser
4
 *
5
 * @copyright Copyright (c) Vasil Dakov <[email protected]>
6
 * @license http://opensource.org/licenses/MIT MIT
7
 */
8
9
namespace VasilDakov\Postcode;
10
11
use VasilDakov\Postcode\Postcode;
12
13
class Parser implements ParserInterface
14
{
15
    /**
16
     * Constructor
17
     *
18
     * @param Postcode $postcode
19
     */
20
    public function __construct(Postcode $postcode)
21
    {
22
        $this->postcode = $postcode;
0 ignored issues
show
Bug introduced by
The property postcode does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
23
    }
24
25
    /**
26
     * @return string $outward
27
     */
28
    public function outward() {}
29
30
    /**
31
     * @return string $inward
32
     */
33
    public function inward() {}
34
35
    /**
36
     * @return string $district
37
     */
38
    public function district() {}
39
40
    /**
41
     * @return string $area
42
     */
43
    public function area() {}
44
45
    /**
46
     * @return string $unit
47
     */
48
    public function unit() {}
49
50
    /**
51
     * @return array
52
     */
53
    public function parse() {}
54
}
55