kiler129/TorrentGhost

View on GitHub

Showing 112 of 112 total issues

Blank line found at end of control structure
Open


The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line
Open

    {

Blank line found at end of control structure
Open


Severity: Minor
Found in src/Util/Blacklist.php by phpcodesniffer

Blank line found at end of control structure
Open


There must be one blank line after the namespace declaration
Open

namespace noFlash\TorrentGhost\Aggregator;

Blank line found at end of control structure
Open


Severity: Minor
Found in src/Http/FetchJob.php by phpcodesniffer

The closing parenthesis of a multi-line function declaration must be on a new line
Open

        LoggerInterface $logger)

Blank line found at end of control structure
Open


The closing parenthesis of a multi-line function declaration must be on a new line
Open

        LoggerInterface $logger)

Blank line found at end of control structure
Open


Severity: Minor
Found in src/Command/RunCommand.php by phpcodesniffer

Remove error control operator '@' on line 186.
Open

    public function extractLink($string)
    {
        $matchResult = @preg_match($this->configuration->getLinkExtractPattern(), $string, $matches);
        if ($matchResult === false) {
            throw new RegexException(
Severity: Minor
Found in src/Aggregator/AbstractAggregator.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

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

Remove error control operator '@' on line 138.
Open

    public function setLinkTransformPattern($linkTransformPattern)
    {
        if ($linkTransformPattern === null) {
            $this->linkTransformPattern = null;

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

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

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

                throw new \RuntimeException("Failed to locate object for $sourceName aggregator! (THIS IS A BUG)");
Severity: Minor
Found in src/Application.php by phpmd

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

Remove error control operator '@' on line 98.
Open

    public function setLinkExtractPattern($linkExtractPattern)
    {
        if (@preg_match($linkExtractPattern, null) === false) {
            throw new RegexException('Link extract pattern invalid', $linkExtractPattern);
        }

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

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

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

            throw new \LogicException('You cannot build object without setting class name');

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

            throw new \InvalidArgumentException(

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

            throw new \RuntimeException(
Severity: Minor
Found in src/Http/FetchJob.php by phpmd

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

Remove error control operator '@' on line 154.
Open

    public function setNameNotContainsPattern($nameNotContainsPattern)
    {
        if ($nameNotContainsPattern !== null && @preg_match($nameNotContainsPattern, null) === false) {
            throw new RegexException('Name not contains pattern invalid', $nameNotContainsPattern);
        }
Severity: Minor
Found in src/Rule/DownloadRule.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

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

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

            throw new \InvalidArgumentException('Non-integer value passed for raw file size limit.');

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

                throw new \RuntimeException("Unexpected value at offset $key - array length invalid");
Severity: Minor
Found in src/Http/CookiesBag.php by phpmd

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