GetFirstMatchAction   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 10 2
1
<?php
2
declare(strict_types=1);
3
4
namespace kosuha606\HtmlUniParser\action;
5
6
/**
7
 * @package kosuha606\HtmlUniParser\action
8
 */
9
class GetFirstMatchAction extends AbstractLogicAction
10
{
11
    /**
12
     * @return array|void
13
     */
14
    public function run()
15
    {
16
        $results = $this->args[0];
17
        $result = array();
18
        foreach ($results as $r) {
19
            $result = $r;
20
            break;
21
        }
22
23
        return $result;
24
    }
25
}