EscolaLMS/model-fields

View on GitHub
src/Services/Contracts/ModelFieldsServiceContract.php

Summary

Maintainability
A
50 mins
Test Coverage
F
0%

Method addOrUpdateMetadataField has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function addOrUpdateMetadataField(string $class_type, string $name, string $type, string $default = '', array $rules = null, int $visibility = 1 << 0, array $extra = null): Metadata;
Severity: Major
Found in src/Services/Contracts/ModelFieldsServiceContract.php - About 50 mins to fix

    syntax error, unexpected '|', expecting ';' or '{'
    Open

        public function getFieldsMetadataListPaginated(string $class_type, ?int $perPage = 15, ?OrderDto $orderDto = null): Collection|LengthAwarePaginator;

    The parameter $class_type is not named in camelCase.
    Open

        public function addOrUpdateMetadataField(string $class_type, string $name, string $type, string $default = '', array $rules = null, int $visibility = 1 << 0, array $extra = null): Metadata;

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

        public function getFieldsMetadataRules(string $class_type): array;

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

        public function getFieldsMetadata(string $class_type): Collection;

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

        public function getFieldsMetadataListPaginated(string $class_type, ?int $perPage = 15, ?OrderDto $orderDto = null): Collection|LengthAwarePaginator;

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

        public function removeMetaField(string $class_type, string $name): bool;

    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

    Line exceeds 120 characters; contains 193 characters
    Open

        public function addOrUpdateMetadataField(string $class_type, string $name, string $type, string $default = '', array $rules = null, int $visibility = 1 << 0, array $extra = null): Metadata;

    Line exceeds 120 characters; contains 152 characters
    Open

        public function getFieldsMetadataListPaginated(string $class_type, ?int $perPage = 15, ?OrderDto $orderDto = null): Collection|LengthAwarePaginator;

    There are no issues that match your filters.

    Category
    Status