We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
9 | public function checkForTemplatesAndUniquePagesNotDistinct() |
||
10 | { |
||
11 | if (config('backpack.pagemanager.page_model_class') != config('backpack.pagemanager.unique_page_model_class')) { |
||
12 | return; |
||
13 | } |
||
14 | |||
15 | $uniquePages = collect($this->getUniquePages())->pluck('name'); |
||
16 | $templates = collect($this->getTemplates())->pluck('name'); |
||
17 | |||
18 | if ($uniquePages->intersect($templates)->isNotEmpty()) { |
||
19 | throw new \Exception('Templates and unique pages should not have the same function names when same model class is used.'); |
||
|
|||
20 | } |
||
21 | } |
||
22 | |||
50 | } |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.