Completed
Push — master ( e7b529...3b65c3 )
by Scott
02:52
created

EmptyQuestion::id()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
namespace Desmond\functions\core;
3
use Desmond\functions\DesmondFunction;
4
use Desmond\ArgumentHelper;
5
6
class EmptyQuestion extends DesmondFunction
7
{
8
    use ArgumentHelper;
9
10 260
    public function id()
11
    {
12 260
        return 'empty?';
13
    }
14
15 5
    public function run(array $args)
16
    {
17 5
        return (empty($args)) || empty($args[0]->value())
18 3
            ? $this->newReturnType('True')
19 5
            : $this->newReturnType('False');
20
    }
21
}
22