Code Duplication    Length = 14-14 lines in 2 locations

Rule/CleanCode/InlineIf.php 1 location

@@ 18-31 (lines=14) @@
15
 *
16
 * @package MS\PHPMD\Rule\CleanCode
17
 */
18
class InlineIf extends AbstractRule implements MethodAware
19
{
20
    /**
21
     * @param AbstractNode|MethodNode $node
22
     */
23
    public function apply(AbstractNode $node)
24
    {
25
        $conditionalExpressions = $node->findChildrenOfType('ConditionalExpression');
26
27
        foreach ($conditionalExpressions as $conditionalExpression) {
28
            $this->addViolation($conditionalExpression);
29
        }
30
    }
31
}
32

Rule/CleanCode/SwitchStatement.php 1 location

@@ 17-30 (lines=14) @@
14
 *
15
 * @package MS\PHPMD\Rule\CleanCode
16
 */
17
class SwitchStatement extends AbstractRule implements MethodAware
18
{
19
    /**
20
     * @param AbstractNode|MethodNode $node
21
     */
22
    public function apply(AbstractNode $node)
23
    {
24
        $switchStatements = $node->findChildrenOfType('SwitchStatement');
25
26
        foreach ($switchStatements as $switchStatement) {
27
            $this->addViolation($switchStatement);
28
        }
29
    }
30
}