qcubed/framework

View on GitHub
assets/php/examples/advanced_ajax/jquery_effects.php

Summary

Maintainability
A
1 hr
Test Coverage

Method Form_Create has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function Form_Create() {
        $this->txtTextbox = new QTextbox($this);
        $this->txtTextbox->TextMode = QTextMode::MultiLine;
        $this->txtTextbox->Text = 'Click a button to start an animation.';
        $this->txtTextbox->Height = 200;
Severity: Minor
Found in assets/php/examples/advanced_ajax/jquery_effects.php - About 1 hr to fix

    The class ExampleForm has a coupling between objects value of 15. Consider to reduce the number of dependencies under 13.
    Open

    class ExampleForm extends QForm {
        protected $txtTextbox;
    
        protected $btnToggle;
        protected $btnHide;

    CouplingBetweenObjects

    Since: 1.1.0

    A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

    Example

    class Foo {
        /**
         * @var \foo\bar\X
         */
        private $x = null;
    
        /**
         * @var \foo\bar\Y
         */
        private $y = null;
    
        /**
         * @var \foo\bar\Z
         */
        private $z = null;
    
        public function setFoo(\Foo $foo) {}
        public function setBar(\Bar $bar) {}
        public function setBaz(\Baz $baz) {}
    
        /**
         * @return \SplObjectStorage
         * @throws \OutOfRangeException
         * @throws \InvalidArgumentException
         * @throws \ErrorException
         */
        public function process(\Iterator $it) {}
    
        // ...
    }

    Source https://phpmd.org/rules/design.html#couplingbetweenobjects

    Missing class import via use statement (line '41', column '27').
    Open

            $this->btnPulsate = new QButton($this);

    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 '51', column '59').
    Open

            $this->btnHide->AddAction       (new QClickEvent(), new QJQHideEffectAction($this->txtTextbox, "blind"));

    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 '18', column '27').
    Open

            $this->txtTextbox = new QTextbox($this);

    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 '26', column '24').
    Open

            $this->btnShow = new QButton($this);

    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 '50', column '40').
    Open

            $this->btnToggle->AddAction     (new QClickEvent(), new QJQToggleEffectAction($this->txtTextbox, "scale", ""));

    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 '61', column '59').
    Open

            $this->btnTransfer->AddAction   (new QClickEvent(), new QJQTransferAction($this->txtTextbox, $this->btnTransfer));

    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 '62', column '59').
    Open

            $this->btnTransfer->AddAction   (new QClickEvent(), new QJQHideAction($this->txtTextbox, "fast"));

    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 '32', column '26').
    Open

            $this->btnBounce = new QButton($this);

    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 '60', column '40').
    Open

            $this->btnTransfer->AddAction   (new QClickEvent(), new QJQShowAction($this->txtTextbox, "fast"));

    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 '53', column '59').
    Open

            $this->btnBounce->AddAction     (new QClickEvent(), new QJQBounceAction($this->txtTextbox, "", 300));

    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 '44', column '24').
    Open

            $this->btnSize = new QButton($this);

    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 '52', column '59').
    Open

            $this->btnShow->AddAction       (new QClickEvent(), new QJQShowEffectAction($this->txtTextbox, "slide", "direction: 'up'"));

    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 '54', column '59').
    Open

            $this->btnHighlight->AddAction  (new QClickEvent(), new QJQHighlightAction($this->txtTextbox, "", 2000));

    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 '56', column '59').
    Open

            $this->btnPulsate->AddAction    (new QClickEvent(), new QJQPulsateAction($this->txtTextbox,"times:2",700));

    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 '54', column '40').
    Open

            $this->btnHighlight->AddAction  (new QClickEvent(), new QJQHighlightAction($this->txtTextbox, "", 2000));

    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 '29', column '24').
    Open

            $this->btnHide = new QButton($this);

    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 '38', column '25').
    Open

            $this->btnShake = new QButton($this);

    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 '52', column '40').
    Open

            $this->btnShow->AddAction       (new QClickEvent(), new QJQShowEffectAction($this->txtTextbox, "slide", "direction: 'up'"));

    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 '57', column '40').
    Open

            $this->btnSize->AddAction       (new QClickEvent(), new QJQSizeAction($this->txtTextbox,"to: {width: 100, height: 100}, scale: 'box'"));

    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 '57', column '59').
    Open

            $this->btnSize->AddAction       (new QClickEvent(), new QJQSizeAction($this->txtTextbox,"to: {width: 100, height: 100}, scale: 'box'"));

    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 '60', column '59').
    Open

            $this->btnTransfer->AddAction   (new QClickEvent(), new QJQShowAction($this->txtTextbox, "fast"));

    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 '23', column '26').
    Open

            $this->btnToggle = new QButton($this);

    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 '47', column '28').
    Open

            $this->btnTransfer = new QButton($this);

    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 '61', column '40').
    Open

            $this->btnTransfer->AddAction   (new QClickEvent(), new QJQTransferAction($this->txtTextbox, $this->btnTransfer));

    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 '51', column '40').
    Open

            $this->btnHide->AddAction       (new QClickEvent(), new QJQHideEffectAction($this->txtTextbox, "blind"));

    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 '53', column '40').
    Open

            $this->btnBounce->AddAction     (new QClickEvent(), new QJQBounceAction($this->txtTextbox, "", 300));

    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 '62', column '40').
    Open

            $this->btnTransfer->AddAction   (new QClickEvent(), new QJQHideAction($this->txtTextbox, "fast"));

    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 '35', column '29').
    Open

            $this->btnHighlight = new QButton($this);

    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 '55', column '40').
    Open

            $this->btnShake->AddAction      (new QClickEvent(), new QJQShakeAction($this->txtTextbox,"",300));

    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 '55', column '59').
    Open

            $this->btnShake->AddAction      (new QClickEvent(), new QJQShakeAction($this->txtTextbox,"",300));

    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 '50', column '59').
    Open

            $this->btnToggle->AddAction     (new QClickEvent(), new QJQToggleEffectAction($this->txtTextbox, "scale", ""));

    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 '56', column '40').
    Open

            $this->btnPulsate->AddAction    (new QClickEvent(), new QJQPulsateAction($this->txtTextbox,"times:2",700));

    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 Form_Create is not named in camelCase.
    Open

        protected function Form_Create() {
            $this->txtTextbox = new QTextbox($this);
            $this->txtTextbox->TextMode = QTextMode::MultiLine;
            $this->txtTextbox->Text = 'Click a button to start an animation.';
            $this->txtTextbox->Height = 200;

    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