Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Pull Request — master (#61)
by Oliver
01:31
created

UniquePages::about_us()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 9
rs 9.6666
cc 1
eloc 6
nc 1
nop 0
1
<?php
2
3
namespace App;
4
5
trait UniquePages
6
{
7
    /*
8
    |--------------------------------------------------------------------------
9
    | Unique pages for Backpack\PageManager
10
    |--------------------------------------------------------------------------
11
    |
12
    | Each unique page has its own method that defines what fields should show up using the Backpack\CRUD API.
13
    | Use snake_case for naming and PageManager will generate the page on first edit.
14
    |
15
    | Any fields defined here will show up after the standard page fields:
16
    | - select template (hidden field and not editable)
17
    | - page name (only seen by admins)
18
    | - page title
19
    | - page slug (hidden and not editable, generated as slug of method name)
20
    */
21
22
    private function about_us()
0 ignored issues
show
Unused Code introduced by
This method is not used, and could be removed.
Loading history...
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes databaseConnectionSeeker.

Loading history...
23
    {
24
        $this->crud->addField([
0 ignored issues
show
Bug introduced by
The property crud does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
25
            'name' => 'content',
26
            'label' => trans('backpack::pagemanager.content'),
27
            'type' => 'wysiwyg',
28
            'placeholder' => trans('backpack::pagemanager.content_placeholder'),
29
        ]);
30
    }
31
}
32