landrok/laravel-request-logger

View on GitHub

Showing 3 of 3 total issues

Method getValue has 66 lines of code (exceeds 60 allowed). Consider refactoring.
Open

    private function getValue(string $key)
    {
        switch($key) {
            // User
            case 'session_id':
Severity: Major
Found in src/RequestLogger/RequestLoggerMiddleware.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

                    return $this->request->header('user-agent');
    Severity: Major
    Found in src/RequestLogger/RequestLoggerMiddleware.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                      return Meta::toJson();
      Severity: Major
      Found in src/RequestLogger/RequestLoggerMiddleware.php - About 30 mins to fix
        Severity
        Category
        Status
        Source
        Language