Showing 137 of 137 total issues

Avoid using static access to class '\Seat\Api\Http\Resources\RoleResource' in method 'postNew'.
Open

        return RoleResource::make($role);

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 '\Illuminate\Support\Arr' in method 'toArray'.
Open

        Arr::forget($definition, 'character_id');

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 unused parameters such as '$parameters'.
Open

    public function validate($attribute, $value, $parameters, $validator)
Severity: Minor
Found in src/Http/Validation/Image.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid using static access to class '\Illuminate\Http\Resources\Json\Resource' in method 'getSkills'.
Open

        return Resource::collection($query->paginate()->appends(request()->except('page')));

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 '\Seat\Web\Models\User' in method 'deleteUser'.
Open

        $user = User::findOrFail($user_id);

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 '\Seat\Api\Models\ApiTokenLog' in method 'log_activity'.
Open

            ApiTokenLog::create([
                'api_token_id' => $token_id,
                'action'       => $action,
                'method'       => $request->method(),
                'request_path' => $request->path(),
Severity: Minor
Found in src/Http/Middleware/ApiToken.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 '\Illuminate\Support\Arr' in method 'toArray'.
Open

        Arr::forget($definition, 'skillpoints.character_id');

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 '\Illuminate\Support\Arr' in method 'toArray'.
Open

        Arr::forget($definition, 'id');

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

The method add_middleware is not named in camelCase.
Open

    public function add_middleware($router)
    {

        // Authenticate checks that the token is valid
        // from an allowed IP address
Severity: Minor
Found in src/ApiServiceProvider.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method add_views is not named in camelCase.
Open

    public function add_views()
    {

        $this->loadViewsFrom(__DIR__ . '/resources/views', 'api');
    }
Severity: Minor
Found in src/ApiServiceProvider.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method add_translations is not named in camelCase.
Open

    public function add_translations()
    {

        $this->loadTranslationsFrom(__DIR__ . '/resources/lang', 'api');
    }
Severity: Minor
Found in src/ApiServiceProvider.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method add_migrations is not named in camelCase.
Open

    private function add_migrations()
    {
        $this->loadMigrationsFrom(__DIR__ . '/database/migrations/');
    }
Severity: Minor
Found in src/ApiServiceProvider.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method add_custom_validators is not named in camelCase.
Open

    public function add_custom_validators()
    {
        Validator::extend('base64image', 'Seat\Api\Http\Validation\Image@validate');
    }
Severity: Minor
Found in src/ApiServiceProvider.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method valid_token_ip is not named in camelCase.
Open

    public function valid_token_ip(Request $request)
    {
        $tk = ApiTokenModel::where('token', $request->header('X-Token'))
                        ->first();

Severity: Minor
Found in src/Http/Middleware/ApiToken.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method add_routes is not named in camelCase.
Open

    public function add_routes()
    {
        $this->loadRoutesFrom(__DIR__ . '/Http/routes.php');
    }
Severity: Minor
Found in src/ApiServiceProvider.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method log_activity is not named in camelCase.
Open

    public function log_activity(Request $request, $action)
    {

        if (config('api.config.log_requests')) {

Severity: Minor
Found in src/Http/Middleware/ApiToken.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method apply_custom_configuration is not named in camelCase.
Open

    public function apply_custom_configuration()
    {

        // Tell L5-swagger where to find annotations. These form
        // part of the controllers themselves.
Severity: Minor
Found in src/ApiServiceProvider.php by phpmd

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

Severity
Category
Status
Source
Language