arkaitzgarro/elastic-apm-laravel

View on GitHub
src/Agent.php

Summary

Maintainability
A
45 mins
Test Coverage
A
100%

Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

        Config $config,
        ContextCollection $sharedContext,
        Connector $connector,
        EventFactoryInterface $eventFactory,
        TransactionsStore $transactionsStore,
Severity: Minor
Found in src/Agent.php - About 45 mins to fix

    The property $app_config is not named in camelCase.
    Open

    class Agent extends NipwaayoniAgent
    {
        protected $collectors;
    
        /** @var Transaction */
    Severity: Minor
    Found in src/Agent.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 $app_config is not named in camelCase.
    Open

        public function __construct(
            Config $config,
            ContextCollection $sharedContext,
            Connector $connector,
            EventFactoryInterface $eventFactory,
    Severity: Minor
    Found in src/Agent.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 $current_transaction is not named in camelCase.
    Open

    class Agent extends NipwaayoniAgent
    {
        protected $collectors;
    
        /** @var Transaction */
    Severity: Minor
    Found in src/Agent.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 $transaction_name is not named in camelCase.
    Open

        public function collectEvents(string $transaction_name): void
        {
            $transaction = $this->getTransaction($transaction_name);
            $this->collectors->each(function ($collector) use ($transaction) {
                $collector->collect()->each(function ($measure) use ($transaction) {
    Severity: Minor
    Found in src/Agent.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 $app_config is not named in camelCase.
    Open

        public function __construct(
            Config $config,
            ContextCollection $sharedContext,
            Connector $connector,
            EventFactoryInterface $eventFactory,
    Severity: Minor
    Found in src/Agent.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 $transaction_name is not named in camelCase.
    Open

        public function collectEvents(string $transaction_name): void
        {
            $transaction = $this->getTransaction($transaction_name);
            $this->collectors->each(function ($collector) use ($transaction) {
                $collector->collect()->each(function ($measure) use ($transaction) {
    Severity: Minor
    Found in src/Agent.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