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 | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 7 | public function checkForTemplatesAndUniquePagesNotDistinct() | ||
| 8 |     { | ||
| 9 |         if (config('backpack.pagemanager.page_model_class') != config('backpack.pagemanager.unique_page_model_class')) { | ||
| 10 | return; | ||
| 11 | } | ||
| 12 | |||
| 13 |         $uniquePages = collect($this->getUniquePages())->pluck('name'); | ||
| 14 |         $templates = collect($this->getTemplates())->pluck('name'); | ||
| 15 | |||
| 16 |         if ($uniquePages->intersect($templates)->isNotEmpty()) { | ||
| 17 |             throw new \Exception('Templates and unique pages should not have the same function names when same model class is used.'); | ||
|  | |||
| 18 | } | ||
| 19 | } | ||
| 20 | |||
| 49 | 
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.