Completed
Push — master ( dd8ca6...ed1ab1 )
by Antonio Carlos
06:33 queued 01:44
created

Base   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 14
c 0
b 0
f 0
ccs 7
cts 7
cp 1
rs 10
wmc 2
lcom 1
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A defineConstants() 0 11 2
1
<?php
2
3
namespace PragmaRX\Countries\Package\Support;
4
5
class Base
6
{
7 34
    public function defineConstants()
8
    {
9 34
        if (! \defined('__COUNTRIES_DIR__')) {
10 1
            \define(
11 1
                '__COUNTRIES_DIR__',
12 1
                realpath(
13 1
                    __DIR__.$this->helper->toDir('/../../../')
0 ignored issues
show
Bug introduced by
The property helper 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...
14
                )
15
            );
16
        }
17 34
    }
18
}
19