HomeController::index()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 21
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 10
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 21
rs 9.9332
1
<?php
2
3
namespace App\Admin\Controllers;
4
5
use App\Http\Controllers\Controller;
6
use Encore\Admin\Controllers\Dashboard;
7
use Encore\Admin\Layout\Column;
8
use Encore\Admin\Layout\Content;
9
use Encore\Admin\Layout\Row;
10
11
class HomeController extends Controller
12
{
13
    public function index(Content $content)
14
    {
15
        return $content
16
            ->header(__('admin.home.dashboard'))
0 ignored issues
show
Bug introduced by
It seems like __('admin.home.dashboard') can also be of type array and array; however, parameter $header of Encore\Admin\Layout\Content::header() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

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

16
            ->header(/** @scrutinizer ignore-type */ __('admin.home.dashboard'))
Loading history...
17
            ->description(__('admin.home.description'))
0 ignored issues
show
Bug introduced by
It seems like __('admin.home.description') can also be of type array and array; however, parameter $description of Encore\Admin\Layout\Content::description() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

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

17
            ->description(/** @scrutinizer ignore-type */ __('admin.home.description'))
Loading history...
18
            ->row(function(Row $row) {
19
20
                $row->column(4, function(Column $column) {
21
                    $column->append(DashboardController::general());
22
                });
23
24
                $row->column(4, function(Column $column) {
25
                    $column->append(DashboardController::environment());
26
                });
27
28
                // $row->column(4, function(Column $column) {
29
                //     $column->append(Dashboard::extensions());
30
                // });
31
32
                $row->column(4, function(Column $column) {
33
                    $column->append(Dashboard::dependencies());
34
                });
35
            });
36
    }
37
}
38