rhosocial/rho.social

View on GitHub
api.rho.social/modules/v1/helpers/GrantType.php

Summary

Maintainability
A
0 mins
Test Coverage

The parameter $grant_type is not named in camelCase.
Open

    public static function check($grant_type, $valid_grant_type = null)
    {
        if (empty($grant_type)) {
            throw new BadRequestHttpException('Grant Type Not Specified.', 10041);
        }

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

class GrantType
{

    const GRANT_TYPE_AUTHORIZATION_CODE = 'authorization_code';
    const GRANT_TYPE_CLIENT_CREDENTIALS = 'client_credentials';

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

    public static function check($grant_type, $valid_grant_type = null)
    {
        if (empty($grant_type)) {
            throw new BadRequestHttpException('Grant Type Not Specified.', 10041);
        }

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

Whitespace found at end of line
Open

     * @throws BadRequestHttpException 

The variable $grant_type is not named in camelCase.
Open

    public static function check($grant_type, $valid_grant_type = null)
    {
        if (empty($grant_type)) {
            throw new BadRequestHttpException('Grant Type Not Specified.', 10041);
        }

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

    public static function check($grant_type, $valid_grant_type = null)
    {
        if (empty($grant_type)) {
            throw new BadRequestHttpException('Grant Type Not Specified.', 10041);
        }

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

    public static function check($grant_type, $valid_grant_type = null)
    {
        if (empty($grant_type)) {
            throw new BadRequestHttpException('Grant Type Not Specified.', 10041);
        }

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

    public static function check($grant_type, $valid_grant_type = null)
    {
        if (empty($grant_type)) {
            throw new BadRequestHttpException('Grant Type Not Specified.', 10041);
        }

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

    public static function check($grant_type, $valid_grant_type = null)
    {
        if (empty($grant_type)) {
            throw new BadRequestHttpException('Grant Type Not Specified.', 10041);
        }

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