Field   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 1 Features 0
Metric Value
wmc 3
c 3
b 1
f 0
lcom 0
cbo 1
dl 0
loc 24
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A isShort() 0 4 2
1
<?php
2
3
namespace Crummy\Phlack\Message;
4
5
class Field extends Partial implements FieldInterface
6
{
7
    protected $optional = ['title', 'value', 'short'];
8
9
    /**
10
     * Constructor.
11
     *
12
     * @param string $title
13
     * @param string $value
14
     * @param bool   $isShort
15
     */
16 8
    public function __construct($title = null, $value = null, $isShort = null)
17
    {
18 8
        parent::__construct(['title' => $title, 'value' => $value, 'short' => $isShort]);
19 8
    }
20
21
    /**
22
     * @return bool
23
     */
24 2
    public function isShort()
25
    {
26 2
        return isset($this['short']) ? $this['short'] : false;
27
    }
28
}
29