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

Mailcode_Parser_Statement_Tokenizer_Process_Variables   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A _process() 0 7 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Mailcode;
6
7
class Mailcode_Parser_Statement_Tokenizer_Process_Variables extends Mailcode_Parser_Statement_Tokenizer_Process
8
{
9
    protected function _process() : void
10
    {
11
        $vars = Mailcode::create()->findVariables($this->tokenized)->getGroupedByHash();
12
13
        foreach($vars as $var)
14
        {
15
            $this->registerToken('Variable', $var->getMatchedText(), $var);
16
        }
17
    }
18
}