qcubed/framework

View on GitHub
includes/watchers/QWatcherBase.class.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '54', column '15').
Open

                throw new QCallerException ($strClassName . ':$blnWatchChanges is false. To be able to watch this table, you should set it to true in your ' . $strClassName . '.class.php file.');

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 unused parameters such as '$strDbName'.
Open

        static public function MarkTableModified ($strDbName, $strTableName) {

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

Avoid unused parameters such as '$strTableName'.
Open

        static public function MarkTableModified ($strDbName, $strTableName) {

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

        protected function RegisterTable ($strDbName, $strTableName) {
            $key = static::GetKey($strDbName, $strTableName);
            if (empty($this->strWatchedKeys[$key])) {
                $this->strWatchedKeys[$key] =  true;
            }

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

        static public function WatchersChanged () {
            $blnChanged = self::$blnWatcherChanged;
            self::$blnWatcherChanged = false;
            return $blnChanged;
        }

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

        abstract public function IsCurrent();

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

        protected static function GetKey($strDbName, $strTableName) {
            return $strDbName . ':' . $strTableName;
        }

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

        public function Watch(QQTableNode $objNode) {
            $strClassName = $objNode->_ClassName;

            if (!$strClassName::$blnWatchChanges) {
                throw new QCallerException ($strClassName . ':$blnWatchChanges is false. To be able to watch this table, you should set it to true in your ' . $strClassName . '.class.php file.');

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

        abstract public function MakeCurrent();

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

        static public function MarkTableModified ($strDbName, $strTableName) {
            self::$blnWatcherChanged = true;
        }

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