Passed
Push — master ( 9253d7...e42fcd )
by Sebastian
03:09
created

Mailcode_Parser_Statement_Tokenizer_Process_Operands   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A _process() 0 7 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Mailcode;
6
7
class Mailcode_Parser_Statement_Tokenizer_Process_Operands extends Mailcode_Parser_Statement_Tokenizer_Process
8
{
9
    /**
10
     * @var string[]
11
     */
12
    private $operands = array(
13
        '==',
14
        '<=',
15
        '>=',
16
        '!=',
17
        '=',
18
        '+',
19
        '-',
20
        '/',
21
        '*',
22
        '>',
23
        '<'
24
    );
25
26
    protected function _process() : void
27
    {
28
        foreach($this->operands as $operand)
29
        {
30
            if(strstr($this->tokenized, $operand))
31
            {
32
                $this->registerToken('Operand', $operand);
33
            }
34
        }
35
    }
36
}
37