phug-php/compiler

View on GitHub
Compiler/NodeCompiler/ForNodeCompiler.php

Summary

Maintainability
A
1 hr
Test Coverage

Showing 2 of 2 total issues

Method compileNode has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

public function compileNode(NodeInterface $node, ?ElementInterface $parent = null)
{
$this->getCompiler()->assert(
$node instanceof ForNode,
'Unexpected '.get_class($node).' given to for compiler.',
Severity: Minor
Found in Compiler/NodeCompiler/ForNodeCompiler.php - About 1 hr to fix

    Function compileNode has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    public function compileNode(NodeInterface $node, ?ElementInterface $parent = null)
    {
    $this->getCompiler()->assert(
    $node instanceof ForNode,
    'Unexpected '.get_class($node).' given to for compiler.',
    Severity: Minor
    Found in Compiler/NodeCompiler/ForNodeCompiler.php - About 25 mins to fix
    Category
    Status