jidaikobo-shibata/a11yc

View on GitHub
classes/Controller/Checklist.php

Summary

Maintainability
A
1 hr
Test Coverage

Method form has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function form($url, $users = array(), $current_user_id = null)
    {
        // dbio
        if (Input::isPostExists())
        {
Severity: Minor
Found in classes/Controller/Checklist.php - About 1 hr to fix

    Remove error control operator '@' on line 173.
    Open

        public static function form($url, $users = array(), $current_user_id = null)
        {
            // dbio
            if (Input::isPostExists())
            {
    Severity: Minor
    Found in classes/Controller/Checklist.php by phpmd

    ErrorControlOperator

    Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

    Example

    function foo($filePath) {
        $file = @fopen($filPath); // hides exceptions
        $key = @$array[$notExistingKey]; // assigns null to $key
    }

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

    There are no issues that match your filters.

    Category
    Status