SAREhub/PHP_Commons

View on GitHub

Showing 139 of 139 total issues

There must be one blank line after the namespace declaration
Open

namespace SAREhub\Commons\Task;

There must be one blank line after the namespace declaration
Open

namespace SAREhub\Commons\Misc;

Expected 1 blank line at end of file; 2 found
Open

printOutputFromProcess("subscriber", $pipes[1]);

The closing brace for the class must go on the next line after the body
Open

}

Missing class import via use statement (line '43', column '19').
Open

        throw new \OutOfBoundsException("Timer with id '$id' not found");

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

        $device = new \ZMQDevice($this->frontend->getSocket(), $this->backend->getSocket());

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 uint16 has a boolean flag argument $bigEndian, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function uint16($bigEndian = true)

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

Missing class import via use statement (line '57', column '23').
Open

            throw new \LogicException("Can't bind to binded socket");

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 publish has a boolean flag argument $wait, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function publish($topic, $message, $wait = false)

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

Missing class import via use statement (line '39', column '23').
Open

            throw new \LogicException("socket can't be bind second time");

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

            throw new \LogicException("Can't connect when socket is connected");

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 create has a boolean flag argument $install, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function create($install = true)

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

Missing class import via use statement (line '35', column '23').
Open

            throw new \LogicException("Publishing message when not binded or connected");

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 receive has a boolean flag argument $wait, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function receive($wait = false)

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

Missing class import via use statement (line '42', column '30').
Open

        $this->storage = new \SQLite3($this->filePath);

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 '19').
Open

        throw new \LogicException("Can't receive message when socket isn't connected or binded");

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 uint64 has a boolean flag argument $bigEndian, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function uint64($bigEndian = true)

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

The method uint32 has a boolean flag argument $bigEndian, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function uint32($bigEndian = true)

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

Missing class import via use statement (line '88', column '23').
Open

            throw new \LogicException('set same logger instance');

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 '19').
Open

        throw new \Exception("creator with name '" . $creatorName . "' not registered");

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

Severity
Category
Status
Source
Language