sansaralab/monk

View on GitHub
src/Monk.php

Summary

Maintainability
A
1 hr
Test Coverage

Showing 7 of 7 total issues

Method send has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

public function send(): Response
{
$this->assertPredefined();
 
$requestParameters = [];
Severity: Minor
Found in src/Monk.php - About 1 hr to fix

    Function send has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    public function send(): Response
    {
    $this->assertPredefined();
     
    $requestParameters = [];
    Severity: Minor
    Found in src/Monk.php - About 35 mins to fix

    Missing class import via use statement (line '181', column '23').
    Open

    throw new \Exception('Url former must be set');
    Severity: Minor
    Found in src/Monk.php by phpmd

    Missing class import via use statement (line '134', column '27').
    Open

    throw new \Exception("Wrong request params type: '{$this->config()->getParamsType()}'");
    Severity: Minor
    Found in src/Monk.php by phpmd

    Missing class import via use statement (line '175', column '23').
    Open

    throw new \Exception('Request method must be set');
    Severity: Minor
    Found in src/Monk.php by phpmd

    Missing class import via use statement (line '178', column '23').
    Open

    throw new \Exception('Request resource must be set');
    Severity: Minor
    Found in src/Monk.php by phpmd

    The method send uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

    } else {
    throw new \Exception("Wrong request params type: '{$this->config()->getParamsType()}'");
    }
    Severity: Minor
    Found in src/Monk.php by phpmd

    There are no issues that match your filters.

    Category
    Status