qcubed/framework

View on GitHub
install/project/includes/codegen/QCodeGen.class.php

Summary

Maintainability
A
30 mins
Test Coverage

Avoid too many return statements within this method.
Open

                    return parent::Pluralize($strName);
Severity: Major
Found in install/project/includes/codegen/QCodeGen.class.php - About 30 mins to fix

    Avoid unused parameters such as '$objSettingsXml'.
    Open

            public function __construct($objSettingsXml) {

    UnusedFormalParameter

    Since: 0.2

    Avoid passing parameters to methods or constructors and then not using those parameters.

    Example

    class Foo
    {
        private function bar($howdy)
        {
            // $howdy is not used
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

    The method Pluralize is not named in camelCase.
    Open

            protected function Pluralize($strName) {
                // Special Rules go Here
                switch (true) {
                    case ($strName == 'person'):
                        return 'people';

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    There are no issues that match your filters.

    Category
    Status