EmptyReply   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
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 28
ccs 7
cts 7
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A offsetSet() 0 4 1
A toArray() 0 4 1
1
<?php
2
3
namespace Crummy\Phlack\WebHook\Reply;
4
5
class EmptyReply extends Reply
6
{
7
    protected $defaults = ['text' => ''];
8
9
    /**
10
     * Constructor.
11
     */
12 5
    public function __construct()
13
    {
14 5
        parent::__construct($this->defaults);
15 5
    }
16
17
    /**
18
     * {@inheritdoc}
19
     */
20 2
    public function offsetSet($offset, $value)
21
    {
22
        // no-op
23 2
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28 2
    public function toArray()
29
    {
30 2
        return $this->defaults;
31
    }
32
}
33