MikeNGarrett/Play-Later

View on GitHub
spotify-config.php

Summary

Maintainability
A
0 mins
Test Coverage

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

        $this->session = new SpotifyWebAPI\Session( $spotify_client_id, $spotify_client_secret, $spotify_redirect_uri );
Severity: Minor
Found in spotify-config.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 '25', column '20').
Open

        $this->api = new SpotifyWebAPI\SpotifyWebAPI();
Severity: Minor
Found in spotify-config.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 excessively long variable names like $spotify_client_secret. Keep variable name length under 20.
Open

    public function __construct( $spotify_client_id = '', $spotify_client_secret = '', $spotify_redirect_uri = '', $callback_url = '')
Severity: Minor
Found in spotify-config.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

The parameter $class_name is not named in camelCase.
Open

function __autoload( $class_name ) {
    $class = str_replace( '\\', '/', $class_name );
    if (file_exists(dirname(__FILE__).'/'.$class . '.php')) {
        require_once dirname(__FILE__).'/'.$class . '.php';
        return true;
Severity: Minor
Found in spotify-config.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The property $callback_url is not named in camelCase.
Open

class Spotify
{
    public $callback_url;
    public $session;
    public $api;
Severity: Minor
Found in spotify-config.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $spotify_client_id is not named in camelCase.
Open

    public function __construct( $spotify_client_id = '', $spotify_client_secret = '', $spotify_redirect_uri = '', $callback_url = '')
    {
        // Spotify credentials
        $this->callback_url = $callback_url;

Severity: Minor
Found in spotify-config.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $spotify_client_secret is not named in camelCase.
Open

    public function __construct( $spotify_client_id = '', $spotify_client_secret = '', $spotify_redirect_uri = '', $callback_url = '')
    {
        // Spotify credentials
        $this->callback_url = $callback_url;

Severity: Minor
Found in spotify-config.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $callback_url is not named in camelCase.
Open

    public function __construct( $spotify_client_id = '', $spotify_client_secret = '', $spotify_redirect_uri = '', $callback_url = '')
    {
        // Spotify credentials
        $this->callback_url = $callback_url;

Severity: Minor
Found in spotify-config.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $spotify_redirect_uri is not named in camelCase.
Open

    public function __construct( $spotify_client_id = '', $spotify_client_secret = '', $spotify_redirect_uri = '', $callback_url = '')
    {
        // Spotify credentials
        $this->callback_url = $callback_url;

Severity: Minor
Found in spotify-config.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The variable $spotify_client_secret is not named in camelCase.
Open

    public function __construct( $spotify_client_id = '', $spotify_client_secret = '', $spotify_redirect_uri = '', $callback_url = '')
    {
        // Spotify credentials
        $this->callback_url = $callback_url;

Severity: Minor
Found in spotify-config.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $callback_url is not named in camelCase.
Open

    public function __construct( $spotify_client_id = '', $spotify_client_secret = '', $spotify_redirect_uri = '', $callback_url = '')
    {
        // Spotify credentials
        $this->callback_url = $callback_url;

Severity: Minor
Found in spotify-config.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $spotify_redirect_uri is not named in camelCase.
Open

    public function __construct( $spotify_client_id = '', $spotify_client_secret = '', $spotify_redirect_uri = '', $callback_url = '')
    {
        // Spotify credentials
        $this->callback_url = $callback_url;

Severity: Minor
Found in spotify-config.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $spotify_client_id is not named in camelCase.
Open

    public function __construct( $spotify_client_id = '', $spotify_client_secret = '', $spotify_redirect_uri = '', $callback_url = '')
    {
        // Spotify credentials
        $this->callback_url = $callback_url;

Severity: Minor
Found in spotify-config.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $class_name is not named in camelCase.
Open

function __autoload( $class_name ) {
    $class = str_replace( '\\', '/', $class_name );
    if (file_exists(dirname(__FILE__).'/'.$class . '.php')) {
        require_once dirname(__FILE__).'/'.$class . '.php';
        return true;
Severity: Minor
Found in spotify-config.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

There are no issues that match your filters.

Category
Status