SimpleClass::testMe()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
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