SimpleClass   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 31
rs 10
c 3
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
A testMe() 0 3 1
1
<?php
2
3
namespace Test\TestClass;
4
5
class SimpleClass
6
{
7
    /**
8
     * @var array
9
     */
10
    public $constructorArgs = [];
11
12
    /**
13
     * SimpleClass constructor.
14
     *
15
     * @param int $arg1
16
     * @param int $arg2
17
     * @param bool $exception
18
     * @throws \LogicException
19
     */
20
    public function __construct($arg1 = 0, $arg2 = 0, $exception = false)
21
    {
22
        if ($exception) {
23
            throw new \LogicException('Test exception.');
24
        }
25
26
        $this->constructorArgs[] = $arg1;
27
        $this->constructorArgs[] = $arg2;
28
    }
29
30
    /**
31
     * @return int
32
     */
33
    public function testMe()
34
    {
35
        return 1;
36
    }
37
}
38