condorrocks/condor

View on GitHub
app/Jobs/RunFeed.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '104', column '28').
Open

                return new \App\Condor\Aspects\Whois\WhoisFeed($feed->parameters);
Severity: Minor
Found in app/Jobs/RunFeed.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

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

                return new \App\Condor\Aspects\Uptime\UptimeFeed($feed->parameters);
Severity: Minor
Found in app/Jobs/RunFeed.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

Missing class import via use statement (line '106', column '28').
Open

                return new \App\Condor\Aspects\SSLCertificate\SSLCertificateFeed($feed->parameters);
Severity: Minor
Found in app/Jobs/RunFeed.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

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

                throw new \Exception("Unidentified aspect name:{$aspect->name}", 1);
Severity: Minor
Found in app/Jobs/RunFeed.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

Avoid using static access to class '\Carbon\Carbon' in method 'handle'.
Open

                'timestamp' => Carbon::now(),
Severity: Minor
Found in app/Jobs/RunFeed.php by phpmd

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 '\App\Snapshot' in method 'handle'.
Open

            $snapshot = Snapshot::updateOrCreate([
                'board_id'  => $this->board->id,
                'aspect_id' => $this->aspect->id,
                'feed_id'   => $feed->id,
                ], [
Severity: Minor
Found in app/Jobs/RunFeed.php by phpmd

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

Line exceeds 120 characters; contains 124 characters
Open

                logger()->error("FEED GOT DISABLED BOARD:{$this->board->id} ASPECT:{$this->aspect->id} FEED:{$feed->name}");
Severity: Minor
Found in app/Jobs/RunFeed.php by phpcodesniffer

There are no issues that match your filters.

Category
Status