arkaitzgarro/elastic-apm-laravel

View on GitHub
src/Services/ApmCollectorService.php

Summary

Maintainability
A
35 mins
Test Coverage
A
100%

Method startMeasure has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

        string $name,
        string $type = 'request',
        ?string $action = null,
        ?string $label = null,
        ?float $start_time = null
Severity: Minor
Found in src/Services/ApmCollectorService.php - About 35 mins to fix

    The parameter $collector_class is not named in camelCase.
    Open

        public function addCollector(string $collector_class): void
        {
            if ($this->is_agent_disabled) {
                return;
            }
    Severity: Minor
    Found in src/Services/ApmCollectorService.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 $is_agent_disabled is not named in camelCase.
    Open

    class ApmCollectorService
    {
        /**
         * @var Application
         */
    Severity: Minor
    Found in src/Services/ApmCollectorService.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 $start_time is not named in camelCase.
    Open

        public function startMeasure(
            string $name,
            string $type = 'request',
            ?string $action = null,
            ?string $label = null,
    Severity: Minor
    Found in src/Services/ApmCollectorService.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 $collector_class is not named in camelCase.
    Open

        public function addCollector(string $collector_class): void
        {
            if ($this->is_agent_disabled) {
                return;
            }
    Severity: Minor
    Found in src/Services/ApmCollectorService.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 $start_time is not named in camelCase.
    Open

        public function startMeasure(
            string $name,
            string $type = 'request',
            ?string $action = null,
            ?string $label = null,
    Severity: Minor
    Found in src/Services/ApmCollectorService.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