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

Test Setup Failed
Pull Request — master (#3490)
by
unknown
16:50
created

CanChangeRouteKey::getKey()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 2
eloc 1
c 1
b 0
f 1
nc 2
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Backpack\CRUD\app\Models\Traits;
4
/**
5
 * Allows the ability to change the exposed route key simply by setting the public $routeKey parameter.
6
 * public $routeKey = 'uuid';
7
 */
8
9
trait CanChangeRouteKey{
10
	
11
12
		    /**
13
	 * Get the route key for the model.
14
	 *
15
	 * @return string
16
	 */
17
	public function getRouteKeyName()
18
	{
19
	  return $this->routeKey ?? parent::getRouteKeyName();
20
	}
21
22
23
	public function getKey()
24
	{	
25
		return $this->routeKey ? $this->{$this->getRouteKeyName()} : parent::getKey();	
26
	}
27
}