Completed
Branch master (b0c9cf)
by Nick
04:29
created

EnvironmentController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 0
f 0
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getInfo() 0 6 1
1
<?php declare(strict_types=1);
2
/**
3
 * Environment API Controller.
4
 *
5
 * @package   App\Http\Controllers\Api
6
 * @author    David Hernandez <[email protected]>
7
 * @copyright 2018-2019 Nick Menke
8
 * @link      https://github.com/nlmenke/vertebrae
9
 */
10
11
namespace App\Http\Controllers\Api;
12
13
use Illuminate\Http\Request;
14
15
/**
16
 * The Environment API controller class.
17
 *
18
 * This class allows a user to fetch information about the environment on which
19
 * the application is deployed.
20
 *
21
 * @since x.x.x introduced
22
 */
23
class EnvironmentController extends AbstractApiController
24
{
25
    /**
26
     * @param Request $request
27
     * @return array
28
     */
29
    public function getInfo(Request $request)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

29
    public function getInfo(/** @scrutinizer ignore-unused */ Request $request)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
30
    {
31
        return [
32
            'environment' => env('APP_ENV'),
33
            'url' => env('APP_URL'),
34
            'laravel_version' => app()->version(),
0 ignored issues
show
introduced by
The method version() does not exist on Illuminate\Container\Container. Are you sure you never get this type here, but always one of the subclasses? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

34
            'laravel_version' => app()->/** @scrutinizer ignore-call */ version(),
Loading history...
35
        ];
36
    }
37
}
38