Mailcode_Collection_Error_Message   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 11
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 2
1
<?php
2
/**
3
 * File containing the {@see Mailcode_Commands_Command_ShowVariable} class.
4
 *
5
 * @package Mailcode
6
 * @subpackage Collection
7
 * @see Mailcode_Commands_Command_ShowVariable
8
 */
9
10
declare(strict_types=1);
11
12
namespace Mailcode;
13
14
/**
15
 * Mailcode command: show a variable value.
16
 *
17
 * @package Mailcode
18
 * @subpackage Collection
19
 * @author Sebastian Mordziol <[email protected]>
20
 */
21
class Mailcode_Collection_Error_Message extends Mailcode_Collection_Error
22
{
23
    public function __construct(string $matchedText, int $code, string $message, ?object $subject=null)
24
    {
25
        $this->matchedText = $matchedText;
26
        $this->code = $code;
27
        $this->message = $message;
28
29
        if($subject instanceof Mailcode_Commands_Command)
30
        {
31
            $this->command = $subject;
32
        }
33
    }
34
}
35