Passed
Push — develop ( dfbdff...d56661 )
by Johnny
02:04
created

ContinueResponse   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 26
rs 10
c 1
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A parse() 0 7 2
A getType() 0 3 1
1
<?php
2
3
/**
4
 * This file handles the "Continue" responses.
5
 *
6
 * @package      Rivescript-php
7
 * @subpackage   Core
8
 * @category     Responses
9
 * @author       Johnny Mast <[email protected]>
10
 */
11
12
namespace Axiom\Rivescript\Cortex\Responses;
13
14
use Axiom\Rivescript\Contracts\Response as ResponseContract;
15
16
/**
17
 * Class Condition
18
 */
19
class ContinueResponse extends Response implements ResponseContract
20
{
21
22
    /**
23
     * Handle Continue responses.
24
     *
25
     * @return false|mixed
26
     */
27
    public function parse()
28
    {
29
        if ($this->responseQueueItem()->getCommand() == '^') {
30
            return $this->source();
31
        }
32
33
        return false;
34
    }
35
36
    /**
37
     * Indicate the type of response this
38
     * class handles.
39
     *
40
     * @return string
41
     */
42
    public function getType(): string
43
    {
44
        return 'continue';
45
    }
46
}
47