DummyEntry::init()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 10
cc 1
nc 1
nop 3
crap 1
1
<?php
2
3
namespace kalanis\kw_clipr\Clipr;
4
5
6
use kalanis\kw_input\Entries\Entry;
7
8
9
/**
10
 * Class DummyEntry
11
 * @package kalanis\kw_clipr\Clipr
12
 * Entry for testing content in tasks - make simple array of these to set testing input data
13
 */
14
class DummyEntry extends Entry
15
{
16
    /**
17
     * @param string $key
18
     * @param mixed|null $value
19
     * @param string $source
20
     * @return DummyEntry
21
     */
22 13
    public static function init(string $key, $value, string $source = self::SOURCE_EXTERNAL): self
23
    {
24 13
        $lib = new self();
25 13
        $lib->setEntry($source, $key, $value);
26 13
        return $lib;
27
    }
28
}
29