Passed
Push — master ( 541085...2b6d09 )
by DeGracia
01:57
created

BaseOccurrence::parse()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 13
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 13
c 0
b 0
f 0
ccs 6
cts 6
cp 1
rs 9.4285
cc 2
eloc 6
nc 2
nop 1
crap 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A BaseOccurrence::size() 0 4 1
1
<?php
2
3
namespace DeGraciaMathieu\Riddler\Occurrences;
4
5
abstract class BaseOccurrence
6
{
7
    /**
8
     * Retourne la taille de l'occurence
9
     *
10
     * @return integer
11
     */
12 14
    public function size()
13
    {
14 14
        return $this->size;
0 ignored issues
show
Bug introduced by
The property size 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...
15
    }
16
}
17