Completed
Push — master ( 2f7cd3...6e4050 )
by Scott
03:46
created

EmptyQuestion   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 28
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A id() 0 4 1
A synopsis() 0 4 1
A usage() 0 4 1
A examples() 0 10 1
1
<?php
2
namespace Desmond\functions\docs;
3
use Desmond\functions\Doc;
4
5
class EmptyQuestion implements Doc
6
{
7
    public function id()
8
    {
9
        return 'empty?';
10
    }
11
12
    public function synopsis()
13
    {
14
        return 'Returns boolean true or false based on whether the supplied argument is empty. (php empty() function)';
15
    }
16
17
    public function usage()
18
    {
19
        return '(empty? <?argument:Mixed>)';
20
    }
21
22
    public function examples()
23
    {
24
        return [
25
            '(empty) #> true',
26
            '(empty nil) #> true',
27
            '(empty []) #> true',
28
            '(empty [1 2 3]) #> false',
29
            '(empty "something") #> false'
30
        ];
31
    }
32
}