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.
Completed
Pull Request — master (#182)
by
unknown
02:07
created

PermissionController::all()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 14

Duplication

Lines 20
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 20
loc 20
rs 9.4285
cc 1
eloc 14
nc 1
nop 1
1
<?php
2
3
namespace Serverfireteam\Panel;
4
5
use Serverfireteam\Panel\CrudController;
6
7
class PermissionController extends CrudController {
8
9 View Code Duplication
	public function all($entity) {
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
10
11
		parent::all($entity);
12
13
		$this->filter = \DataFilter::source(new Permission());
14
		$this->filter->add('id', 'ID', 'text');
15
		$this->filter->add('name', 'Name', 'text');
16
		$this->filter->submit('search');
17
		$this->filter->reset('reset');
18
		$this->filter->build();
19
20
		$this->grid = \DataGrid::source($this->filter);
21
		$this->grid->add('id', 'ID', true)->style("width:100px");
22
		$this->grid->add('name', 'Url')->style('width:100px');
23
		$this->grid->add('label', 'Description');
24
25
		$this->addStylesToGrid();
26
27
		return $this->returnView();
28
	}
29
30
	public function edit($entity) {
31
32
		parent::edit($entity);
33
34
		$this->edit = \DataEdit::source(new Permission());
35
36
		$helpMessage = (\Lang::get('panel::fields.roleHelp'));
37
38
		$this->edit->label('Edit Permission');
39
		$this->edit->link("rapyd-demo/filter", "Articles", "TR")->back();
40
		$this->edit->add('name', 'Url', 'text')->rule('required');
41
		$this->edit->add('label', 'Description', 'text')->rule('required');
42
43
		$this->edit->saved(function () use ($entity) {
44
			$this->edit->message('Awesome, Data Saved successfully');
45
			$this->edit->link('panel/Permission/all', 'Back');
46
		});
47
48
		$this->addHelperMessage($helpMessage);
49
50
		return $this->returnEditView();
51
	}
52
}
53