Passed
Push — master ( 5c2945...175940 )
by Mougrim
06:27
created

Example::stringLength()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Mougrim\PhpunitSoftMocks\Example;
4
5
define('SOME_CONSTANT', 3);
6
7
/**
8
 * @author Mougrim <[email protected]>
9
 */
10
class Example
11
{
12
    const CLASS_CONSTANT = 5;
13
14
    public $property;
15
16 3
    public function __construct($value = 0)
17
    {
18 3
        $this->property = $value;
19
    }
20
21 1
    public function factorial($number)
22
    {
23 1
        if ($number <= 1) {
24 1
            return 1;
25
        }
26
27 1
        return $number * $this->factorial($number - 1);
28
    }
29
30 1
    public function stringLength()
31
    {
32 1
        return strlen('a');
33
    }
34
}
35