Intraface_Standard::get()   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 11
Code Lines 7

Duplication

Lines 11
Ratio 100 %

Code Coverage

Tests 6
CRAP Score 3

Importance

Changes 0
Metric Value
cc 3
eloc 7
nc 3
nop 1
dl 11
loc 11
rs 9.4285
c 0
b 0
f 0
ccs 6
cts 6
cp 1
crap 3
1
<?php
2
/**
3
 * Standard
4
 *
5
 * En standardklasse med f�lles funktioner. Alle klasser kan nedarve fra denne
6
 * klasse.
7
 *
8
 * @package Intraface
9
 * @author  Lars Olesen <[email protected]>
10
 * @since   0.1.0
11
 * @version @package-version@
12
 *
13
 */
14
class Intraface_Standard
15
{
16
    public $value;
17
18
    function __construct()
19
    {
20
        // init
21
    }
22
23 225 View Code Duplication
    function get($key = '')
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
24
    {
25 225
        if (!empty($key)) {
26 224
            if (isset($this->value[$key])) {
27 204
                return($this->value[$key]);
28
            } else {
29 136
                return '';
30
            }
31
        }
32 72
        return $this->value;
33
    }
34
}
35