kai-jacobsen/kontentblocks

View on GitHub

Showing 4,293 of 4,293 total issues

Missing class import via use statement (line '37', column '23').
Open

            throw new \BadFunctionCallException('Missing attachment');

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

The method render has a boolean flag argument $echo, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function render( $echo = false )
Severity: Minor
Found in core/Templating/CoreView.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method render has a boolean flag argument $echo, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function render($echo = false)
Severity: Minor
Found in core/Templating/ModuleView.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method setupEnvironment has a boolean flag argument $public, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function setupEnvironment(Container $services, $public = true)
Severity: Minor
Found in core/Templating/Twig.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method getSize has a boolean flag argument $crop, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function getSize($size = 'thumbnail', $crop = true, $upscale = true)
Severity: Minor
Found in core/Utils/AttachmentHandler.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

Missing class import via use statement (line '47', column '23').
Open

            throw new \Exception('Field MUST extend Kontentblocks Field Class');
Severity: Minor
Found in core/Fields/FieldRegistry.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

The method render has a boolean flag argument $echo, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function render($echo = false)
Severity: Minor
Found in core/Templating/ModuleFormView.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method addCustomFunctions has a boolean flag argument $single, which is a certain sign of a Single Responsibility Principle violation.
Open

            function ($id, $width = null, $height = null, $crop = true, $single = true, $upscale = true) {
Severity: Minor
Found in core/Templating/Twig.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method render has a boolean flag argument $concat, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function render($concat = false)
Severity: Minor
Found in core/Templating/ViewFactory.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method addCustomFunctions has a boolean flag argument $crop, which is a certain sign of a Single Responsibility Principle violation.
Open

            function ($id, $width = null, $height = null, $crop = true, $single = true, $upscale = true) {
Severity: Minor
Found in core/Templating/Twig.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method process has a boolean flag argument $upscale, which is a certain sign of a Single Responsibility Principle violation.
Open

                $upscale = false
Severity: Minor
Found in core/Utils/ImageResize.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method getInputFieldId has a boolean flag argument $rnd, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function getInputFieldId($rnd = false, $suffix = '')
Severity: Minor
Found in core/Fields/FieldFormRenderer.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

Missing class import via use statement (line '62', column '28').
Open

        $environment = new \Twig_Environment(
Severity: Minor
Found in core/Templating/Twig.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '124', column '20').
Open

        return new \Twig_SimpleFilter(
Severity: Minor
Found in core/Templating/Twig.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '107', column '20').
Open

        return new \Twig_SimpleFilter(
Severity: Minor
Found in core/Utils/CommonTwig/SimpleTwig.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

The method render has a boolean flag argument $echo, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function render($echo = false)
Severity: Minor
Found in core/Utils/CommonTwig/SimpleView.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method getAttr has a boolean flag argument $default, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function getAttr($attr, $default = false)
Severity: Minor
Found in core/Utils/AttachmentHandler.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method aq_resize has a boolean flag argument $single, which is a certain sign of a Single Responsibility Principle violation.
Open

        function aq_resize($attachment, $width = null, $height = null, $crop = null, $single = true, $upscale = false)
Severity: Minor
Found in core/Utils/ImageResize.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method render has a boolean flag argument $echo, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function render($echo = false)

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method __construct has a boolean flag argument $tpl, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function __construct($tpl = false, $data = null)
Severity: Minor
Found in core/Templating/FieldView.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

Severity
Category
Status
Source
Language