Passed
Push — master ( 19aa6f...a676bf )
by Sebastian
03:24
created

getValidations()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
1
<?php
2
/**
3
 * File containing the {@see Mailcode_Commands_Command_If_ListNotContains} class.
4
 *
5
 * @package Mailcode
6
 * @subpackage Commands
7
 * @see Mailcode_Commands_Command_If_ListNotContains
8
 */
9
10
declare(strict_types=1);
11
12
namespace Mailcode;
13
14
/**
15
 * Mailcode command: opening IF LIST NOT CONTAINS statement.
16
 * 
17
 * Checks if a list variable value does not contains a search string.
18
 *
19
 * @package Mailcode
20
 * @subpackage Commands
21
 * @author Sebastian Mordziol <[email protected]>
22
 */
23
class Mailcode_Commands_Command_If_ListNotContains extends Mailcode_Commands_Command_If_NotContains implements Mailcode_Interfaces_Commands_ListVariables, Mailcode_Interfaces_Commands_ListPropertyVariable
24
{
25
    use Mailcode_Traits_Commands_ListVariables;
26
    use Mailcode_Traits_Commands_Validation_ListPropertyVariable;
27
28
    protected function getValidations(): array
29
    {
30
        $validations = parent::getValidations();
31
        $validations[] = 'list_property_variable';
32
33
        return $validations;
34
    }
35
36
    protected function _collectListVariables(Mailcode_Variables_Collection_Regular $collection): void
37
    {
38
        $collection->add($this->getListVariable());
39
    }
40
}
41