GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 1a8261...832f12 )
by Piyapan
02:19
created

PostController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 10
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A index() 0 4 1
A create() 0 3 1
1
<?php
2
3
namespace Raystech\StarterKit\Http\Controllers;
4
5
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
6
use Illuminate\Foundation\Bus\DispatchesJobs;
7
use Illuminate\Foundation\Validation\ValidatesRequests;
8
use Illuminate\Routing\Controller as BaseController;
9
use Illuminate\Http\Request;
10
11
use Raystech\StarterKit\Traits\Crudable;
12
use Raystech\StarterKit\Models\Post;
13
14
class PostController extends BaseController
15
{
16
  use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
17
18
  use Crudable;
19
  const ADD_MESSAGE = 'Added Successfully!';
20
  const DELETE_MESSAGE = 'Deleted Successfully!';
21
  const UPDATE_MESSAGE = 'Updated Successfully!';
22
23
  public function index() {
24
    // return self::ADD_MESSAGE;
25
    $posts = Post::orderBy('created_at')->get();
26
    return view('rt-starter-kit::posts.index', compact('posts'));
27
  }
28
29
  public function create(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 create(/** @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
    $posts = Post::orderBy('created_at')->get();
31
    return view('rt-starter-kit::posts.index', compact('posts'));
32
  }
33
}
34