qcubed/framework

View on GitHub
includes/base_controls/QSelectMenuGen.class.php

Summary

Maintainability
B
4 hrs
Test Coverage

The class QSelectMenuGen has 14 public methods. Consider refactoring QSelectMenuGen to keep number of public methods under 10.
Open

    class QSelectMenuGen extends QListBox    {
        protected $strJavaScripts = __JQUERY_EFFECTS__;
        protected $strStyleSheets = __JQUERY_CSS__;
        /** @var mixed */
        protected $mixAppendTo = null;

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

Method __set has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public function __set($strName, $mixValue) {
            switch ($strName) {
                case 'AppendTo':
                    $this->mixAppendTo = $mixValue;
                    $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'appendTo', $mixValue);
Severity: Minor
Found in includes/base_controls/QSelectMenuGen.class.php - About 1 hr to fix

    Function __set has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

            public function __set($strName, $mixValue) {
                switch ($strName) {
                    case 'AppendTo':
                        $this->mixAppendTo = $mixValue;
                        $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'appendTo', $mixValue);
    Severity: Minor
    Found in includes/base_controls/QSelectMenuGen.class.php - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Avoid too many return statements within this method.
    Open

                    case 'Width': return $this->intWidth;
    Severity: Major
    Found in includes/base_controls/QSelectMenuGen.class.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                              return parent::__get($strName); 
      Severity: Major
      Found in includes/base_controls/QSelectMenuGen.class.php - About 30 mins to fix

        The method __set() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
        Open

                public function __set($strName, $mixValue) {
                    switch ($strName) {
                        case 'AppendTo':
                            $this->mixAppendTo = $mixValue;
                            $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'appendTo', $mixValue);

        CyclomaticComplexity

        Since: 0.1

        Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

        Example

        // Cyclomatic Complexity = 11
        class Foo {
        1   public function example() {
        2       if ($a == $b) {
        3           if ($a1 == $b1) {
                        fiddle();
        4           } elseif ($a2 == $b2) {
                        fiddle();
                    } else {
                        fiddle();
                    }
        5       } elseif ($c == $d) {
        6           while ($c == $d) {
                        fiddle();
                    }
        7        } elseif ($e == $f) {
        8           for ($n = 0; $n < $h; $n++) {
                        fiddle();
                    }
                } else {
                    switch ($z) {
        9               case 1:
                            fiddle();
                            break;
        10              case 2:
                            fiddle();
                            break;
        11              case 3:
                            fiddle();
                            break;
                        default:
                            fiddle();
                            break;
                    }
                }
            }
        }

        Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

        Missing class import via use statement (line '379', column '9').
        Open

                        new QModelConnectorParam (get_called_class(), 'Width', 'The width of the menu, in pixels. When the value is null, the width ofthe native select is used.', QType::Integer),

        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 '378', column '9').
        Open

                        new QModelConnectorParam (get_called_class(), 'Disabled', 'Disables the selectmenu if set to true.', QType::Boolean),

        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

        Avoid using static access to class 'QApplication' in method 'Refresh'.
        Open

                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "refresh", QJsPriority::Low);

        StaticAccess

        Since: 1.4.0

        Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

        Example

        class Foo
        {
            public function bar()
            {
                Bar::baz();
            }
        }

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

        Avoid assigning values to variables in if clauses and the like (line '141', column '17').
        Open

                protected function MakeJqOptions() {
                    $jqOptions = null;
                    if (!is_null($val = $this->AppendTo)) {$jqOptions['appendTo'] = $val;}
                    if (!is_null($val = $this->Disabled)) {$jqOptions['disabled'] = $val;}
                    if (!is_null($val = $this->Icons)) {$jqOptions['icons'] = $val;}

        IfStatementAssignment

        Since: 2.7.0

        Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

        Example

        class Foo
        {
            public function bar($flag)
            {
                if ($foo = 'bar') { // possible typo
                    // ...
                }
                if ($baz = 0) { // always false
                    // ...
                }
            }
        }

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

        Avoid using static access to class 'QApplication' in method 'GetEndScript'.
        Open

                        QApplication::ExecuteControlCommand($strId, $strFunc, QJsPriority::High);

        StaticAccess

        Since: 1.4.0

        Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

        Example

        class Foo
        {
            public function bar()
            {
                Bar::baz();
            }
        }

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

        The method GetEndScript uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                    } else {
                        QApplication::ExecuteControlCommand($strId, $strFunc, $jqOptions, QJsPriority::High);
                    }

        ElseExpression

        Since: 1.4.0

        An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

        Example

        class Foo
        {
            public function bar($flag)
            {
                if ($flag) {
                    // one branch
                } else {
                    // another branch
                }
            }
        }

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

        Avoid using static access to class 'QApplication' in method 'GetEndScript'.
        Open

                        QApplication::ExecuteControlCommand($strId, 'off', QJsPriority::High);

        StaticAccess

        Since: 1.4.0

        Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

        Example

        class Foo
        {
            public function bar()
            {
                Bar::baz();
            }
        }

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

        Avoid using static access to class 'QApplication' in method 'Destroy'.
        Open

                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "destroy", QJsPriority::Low);

        StaticAccess

        Since: 1.4.0

        Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

        Example

        class Foo
        {
            public function bar()
            {
                Bar::baz();
            }
        }

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

        Avoid using static access to class 'QType' in method '__set'.
        Open

                                $this->intWidth = QType::Cast($mixValue, QType::Integer);

        StaticAccess

        Since: 1.4.0

        Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

        Example

        class Foo
        {
            public function bar()
            {
                Bar::baz();
            }
        }

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

        Avoid assigning values to variables in if clauses and the like (line '140', column '17').
        Open

                protected function MakeJqOptions() {
                    $jqOptions = null;
                    if (!is_null($val = $this->AppendTo)) {$jqOptions['appendTo'] = $val;}
                    if (!is_null($val = $this->Disabled)) {$jqOptions['disabled'] = $val;}
                    if (!is_null($val = $this->Icons)) {$jqOptions['icons'] = $val;}

        IfStatementAssignment

        Since: 2.7.0

        Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

        Example

        class Foo
        {
            public function bar($flag)
            {
                if ($foo = 'bar') { // possible typo
                    // ...
                }
                if ($baz = 0) { // always false
                    // ...
                }
            }
        }

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

        Avoid using static access to class 'QApplication' in method 'Disable'.
        Open

                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "disable", QJsPriority::Low);

        StaticAccess

        Since: 1.4.0

        Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

        Example

        class Foo
        {
            public function bar()
            {
                Bar::baz();
            }
        }

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

        Avoid using static access to class 'QApplication' in method 'Instance'.
        Open

                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "instance", QJsPriority::Low);

        StaticAccess

        Since: 1.4.0

        Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

        Example

        class Foo
        {
            public function bar()
            {
                Bar::baz();
            }
        }

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

        Avoid using static access to class 'QApplication' in method 'Option2'.
        Open

                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "option", $optionName, $value, QJsPriority::Low);

        StaticAccess

        Since: 1.4.0

        Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

        Example

        class Foo
        {
            public function bar()
            {
                Bar::baz();
            }
        }

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

        Avoid using static access to class 'QApplication' in method 'Option3'.
        Open

                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "option", $options, QJsPriority::Low);

        StaticAccess

        Since: 1.4.0

        Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

        Example

        class Foo
        {
            public function bar()
            {
                Bar::baz();
            }
        }

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

        Avoid using static access to class 'QType' in method '__set'.
        Open

                                $this->blnDisabled = QType::Cast($mixValue, QType::Boolean);

        StaticAccess

        Since: 1.4.0

        Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

        Example

        class Foo
        {
            public function bar()
            {
                Bar::baz();
            }
        }

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

        Avoid assigning values to variables in if clauses and the like (line '139', column '17').
        Open

                protected function MakeJqOptions() {
                    $jqOptions = null;
                    if (!is_null($val = $this->AppendTo)) {$jqOptions['appendTo'] = $val;}
                    if (!is_null($val = $this->Disabled)) {$jqOptions['disabled'] = $val;}
                    if (!is_null($val = $this->Icons)) {$jqOptions['icons'] = $val;}

        IfStatementAssignment

        Since: 2.7.0

        Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

        Example

        class Foo
        {
            public function bar($flag)
            {
                if ($foo = 'bar') { // possible typo
                    // ...
                }
                if ($baz = 0) { // always false
                    // ...
                }
            }
        }

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

        Avoid using static access to class 'QApplication' in method 'GetEndScript'.
        Open

                        QApplication::ExecuteControlCommand($strId, $strFunc, $jqOptions, QJsPriority::High);

        StaticAccess

        Since: 1.4.0

        Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

        Example

        class Foo
        {
            public function bar()
            {
                Bar::baz();
            }
        }

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

        Avoid assigning values to variables in if clauses and the like (line '137', column '17').
        Open

                protected function MakeJqOptions() {
                    $jqOptions = null;
                    if (!is_null($val = $this->AppendTo)) {$jqOptions['appendTo'] = $val;}
                    if (!is_null($val = $this->Disabled)) {$jqOptions['disabled'] = $val;}
                    if (!is_null($val = $this->Icons)) {$jqOptions['icons'] = $val;}

        IfStatementAssignment

        Since: 2.7.0

        Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

        Example

        class Foo
        {
            public function bar($flag)
            {
                if ($foo = 'bar') { // possible typo
                    // ...
                }
                if ($baz = 0) { // always false
                    // ...
                }
            }
        }

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

        Avoid assigning values to variables in if clauses and the like (line '138', column '17').
        Open

                protected function MakeJqOptions() {
                    $jqOptions = null;
                    if (!is_null($val = $this->AppendTo)) {$jqOptions['appendTo'] = $val;}
                    if (!is_null($val = $this->Disabled)) {$jqOptions['disabled'] = $val;}
                    if (!is_null($val = $this->Icons)) {$jqOptions['icons'] = $val;}

        IfStatementAssignment

        Since: 2.7.0

        Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

        Example

        class Foo
        {
            public function bar($flag)
            {
                if ($foo = 'bar') { // possible typo
                    // ...
                }
                if ($baz = 0) { // always false
                    // ...
                }
            }
        }

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

        Avoid using static access to class 'QApplication' in method 'Close'.
        Open

                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "close", QJsPriority::Low);

        StaticAccess

        Since: 1.4.0

        Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

        Example

        class Foo
        {
            public function bar()
            {
                Bar::baz();
            }
        }

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

        Avoid using static access to class 'QApplication' in method 'Open'.
        Open

                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "open", QJsPriority::Low);

        StaticAccess

        Since: 1.4.0

        Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

        Example

        class Foo
        {
            public function bar()
            {
                Bar::baz();
            }
        }

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

        Avoid using static access to class 'QApplication' in method 'Enable'.
        Open

                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "enable", QJsPriority::Low);

        StaticAccess

        Since: 1.4.0

        Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

        Example

        class Foo
        {
            public function bar()
            {
                Bar::baz();
            }
        }

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

        Avoid using static access to class 'QApplication' in method 'MenuWidget'.
        Open

                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "menuWidget", QJsPriority::Low);

        StaticAccess

        Since: 1.4.0

        Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

        Example

        class Foo
        {
            public function bar()
            {
                Bar::baz();
            }
        }

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

        Avoid using static access to class 'QApplication' in method 'Option'.
        Open

                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "option", $optionName, QJsPriority::Low);

        StaticAccess

        Since: 1.4.0

        Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

        Example

        class Foo
        {
            public function bar()
            {
                Bar::baz();
            }
        }

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

        Avoid using static access to class 'QApplication' in method 'Option1'.
        Open

                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "option", QJsPriority::Low);

        StaticAccess

        Since: 1.4.0

        Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

        Example

        class Foo
        {
            public function bar()
            {
                Bar::baz();
            }
        }

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

        The class QSelectMenu_OpenEvent is not named in CamelCase.
        Open

            class QSelectMenu_OpenEvent extends QJqUiEvent {
                const EventName = 'selectmenuopen';
            }

        CamelCaseClassName

        Since: 0.2

        It is considered best practice to use the CamelCase notation to name classes.

        Example

        class class_name {
        }

        Source

        The class QSelectMenu_CreateEvent is not named in CamelCase.
        Open

            class QSelectMenu_CreateEvent extends QJqUiEvent {
                const EventName = 'selectmenucreate';
            }

        CamelCaseClassName

        Since: 0.2

        It is considered best practice to use the CamelCase notation to name classes.

        Example

        class class_name {
        }

        Source

        The class QSelectMenu_SelectEvent is not named in CamelCase.
        Open

            class QSelectMenu_SelectEvent extends QJqUiEvent {
                const EventName = 'selectmenuselect';
            }

        CamelCaseClassName

        Since: 0.2

        It is considered best practice to use the CamelCase notation to name classes.

        Example

        class class_name {
        }

        Source

        The class QSelectMenu_ChangeEvent is not named in CamelCase.
        Open

            class QSelectMenu_ChangeEvent extends QJqUiEvent {
                const EventName = 'selectmenuchange';
            }

        CamelCaseClassName

        Since: 0.2

        It is considered best practice to use the CamelCase notation to name classes.

        Example

        class class_name {
        }

        Source

        The class QSelectMenu_FocusEvent is not named in CamelCase.
        Open

            class QSelectMenu_FocusEvent extends QJqUiEvent {
                const EventName = 'selectmenufocus';
            }

        CamelCaseClassName

        Since: 0.2

        It is considered best practice to use the CamelCase notation to name classes.

        Example

        class class_name {
        }

        Source

        The class QSelectMenu_CloseEvent is not named in CamelCase.
        Open

            class QSelectMenu_CloseEvent extends QJqUiEvent {
                const EventName = 'selectmenuclose';
            }

        CamelCaseClassName

        Since: 0.2

        It is considered best practice to use the CamelCase notation to name classes.

        Example

        class class_name {
        }

        Source

        Constant EventName should be defined in uppercase
        Open

                const EventName = 'selectmenucreate';

        ConstantNamingConventions

        Since: 0.2

        Class/Interface constant names should always be defined in uppercase.

        Example

        class Foo {
            const MY_NUM = 0; // ok
            const myTest = ""; // fail
        }

        Source https://phpmd.org/rules/naming.html#constantnamingconventions

        Constant EventName should be defined in uppercase
        Open

                const EventName = 'selectmenuopen';

        ConstantNamingConventions

        Since: 0.2

        Class/Interface constant names should always be defined in uppercase.

        Example

        class Foo {
            const MY_NUM = 0; // ok
            const myTest = ""; // fail
        }

        Source https://phpmd.org/rules/naming.html#constantnamingconventions

        Constant EventName should be defined in uppercase
        Open

                const EventName = 'selectmenuclose';

        ConstantNamingConventions

        Since: 0.2

        Class/Interface constant names should always be defined in uppercase.

        Example

        class Foo {
            const MY_NUM = 0; // ok
            const myTest = ""; // fail
        }

        Source https://phpmd.org/rules/naming.html#constantnamingconventions

        Constant EventName should be defined in uppercase
        Open

                const EventName = 'selectmenufocus';

        ConstantNamingConventions

        Since: 0.2

        Class/Interface constant names should always be defined in uppercase.

        Example

        class Foo {
            const MY_NUM = 0; // ok
            const myTest = ""; // fail
        }

        Source https://phpmd.org/rules/naming.html#constantnamingconventions

        Constant EventName should be defined in uppercase
        Open

                const EventName = 'selectmenuselect';

        ConstantNamingConventions

        Since: 0.2

        Class/Interface constant names should always be defined in uppercase.

        Example

        class Foo {
            const MY_NUM = 0; // ok
            const myTest = ""; // fail
        }

        Source https://phpmd.org/rules/naming.html#constantnamingconventions

        Constant EventName should be defined in uppercase
        Open

                const EventName = 'selectmenuchange';

        ConstantNamingConventions

        Since: 0.2

        Class/Interface constant names should always be defined in uppercase.

        Example

        class Foo {
            const MY_NUM = 0; // ok
            const myTest = ""; // fail
        }

        Source https://phpmd.org/rules/naming.html#constantnamingconventions

        The method Instance is not named in camelCase.
        Open

                public function Instance() {
                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "instance", QJsPriority::Low);
                }

        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

        The method Option is not named in camelCase.
        Open

                public function Option($optionName) {
                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "option", $optionName, QJsPriority::Low);
                }

        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

        The method MenuWidget is not named in camelCase.
        Open

                public function MenuWidget() {
                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "menuWidget", QJsPriority::Low);
                }

        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

        The method Disable is not named in camelCase.
        Open

                public function Disable() {
                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "disable", QJsPriority::Low);
                }

        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

        The method Option3 is not named in camelCase.
        Open

                public function Option3($options) {
                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "option", $options, QJsPriority::Low);
                }

        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

        The method Open is not named in camelCase.
        Open

                public function Open() {
                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "open", QJsPriority::Low);
                }

        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

        The method Option2 is not named in camelCase.
        Open

                public function Option2($optionName, $value) {
                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "option", $optionName, $value, QJsPriority::Low);
                }

        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

        The method Refresh is not named in camelCase.
        Open

                public function Refresh() {
                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "refresh", QJsPriority::Low);
                }

        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

        The method GetJqSetupFunction is not named in camelCase.
        Open

                public function GetJqSetupFunction() {
                    return 'selectmenu';
                }

        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

        The method Destroy is not named in camelCase.
        Open

                public function Destroy() {
                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "destroy", QJsPriority::Low);
                }

        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

        The method Enable is not named in camelCase.
        Open

                public function Enable() {
                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "enable", QJsPriority::Low);
                }

        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

        The method GetModelConnectorParams is not named in camelCase.
        Open

                public static function GetModelConnectorParams() {
                    return array_merge(parent::GetModelConnectorParams(), array(
                        new QModelConnectorParam (get_called_class(), 'Disabled', 'Disables the selectmenu if set to true.', QType::Boolean),
                        new QModelConnectorParam (get_called_class(), 'Width', 'The width of the menu, in pixels. When the value is null, the width ofthe native select is used.', QType::Integer),
                    ));

        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

        The method Option1 is not named in camelCase.
        Open

                public function Option1() {
                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "option", QJsPriority::Low);
                }

        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

        The method Close is not named in camelCase.
        Open

                public function Close() {
                    QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "close", QJsPriority::Low);
                }

        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

        The method MakeJqOptions is not named in camelCase.
        Open

                protected function MakeJqOptions() {
                    $jqOptions = null;
                    if (!is_null($val = $this->AppendTo)) {$jqOptions['appendTo'] = $val;}
                    if (!is_null($val = $this->Disabled)) {$jqOptions['disabled'] = $val;}
                    if (!is_null($val = $this->Icons)) {$jqOptions['icons'] = $val;}

        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

        The method GetEndScript is not named in camelCase.
        Open

                public function GetEndScript() {
                    $strId = $this->GetJqControlId();
                    $jqOptions = $this->makeJqOptions();
                    $strFunc = $this->getJqSetupFunction();
        
        

        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