Completed
Push — master ( 3708b9...fb0aff )
by Enrico
03:36
created

InlineHtmlUsage::pass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 6
ccs 3
cts 3
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace PHPSA\Analyzer\Pass\Statement;
4
5
use PhpParser\Node\Stmt;
6
use PhpParser\Node;
7
use PHPSA\Analyzer\Pass;
8
use PHPSA\Context;
9
10
class InlineHtmlUsage implements Pass\AnalyzerPassInterface
11
{
12
    /**
13
     * @param Stmt\InlineHTML $stmt
14
     * @param Context $context
15
     * @return bool
16
     */
17 1
    public function pass(Stmt\InlineHTML $stmt, Context $context)
18
    {
19 1
        $context->notice('inline_html_usage', 'Do not use inline HTML', $stmt);
20
21 1
        return true;
22
    }
23
24
    /**
25
     * @return array
26
     */
27 1
    public function getRegister()
28
    {
29
        return [
30 1
            Stmt\InlineHTML::class,
31 1
        ];
32
    }
33
}
34