diff --git a/app/Http/Controllers/Admin/ServersController.php b/app/Http/Controllers/Admin/ServersController.php index 675e64785..529d692b3 100644 --- a/app/Http/Controllers/Admin/ServersController.php +++ b/app/Http/Controllers/Admin/ServersController.php @@ -242,6 +242,7 @@ class ServersController extends Controller * * @throws \Pterodactyl\Exceptions\DisplayException * @throws \Pterodactyl\Exceptions\Model\DataValidationException + * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException */ public function store(ServerFormRequest $request) { @@ -278,6 +279,8 @@ class ServersController extends Controller * * @param int $server * @return \Illuminate\View\View + * + * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException */ public function viewDetails($server) { @@ -294,6 +297,8 @@ class ServersController extends Controller * * @param int $server * @return \Illuminate\View\View + * + * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException */ public function viewBuild($server) { @@ -316,6 +321,8 @@ class ServersController extends Controller * * @param int $server * @return \Illuminate\View\View + * + * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException */ public function viewStartup($server) { @@ -346,6 +353,8 @@ class ServersController extends Controller * * @param int $server * @return \Illuminate\View\View + * + * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException */ public function viewDatabase($server) { @@ -388,6 +397,7 @@ class ServersController extends Controller * * @throws \Pterodactyl\Exceptions\DisplayException * @throws \Pterodactyl\Exceptions\Model\DataValidationException + * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException */ public function setDetails(Request $request, Server $server) { @@ -409,6 +419,7 @@ class ServersController extends Controller * * @throws \Pterodactyl\Exceptions\DisplayException * @throws \Pterodactyl\Exceptions\Model\DataValidationException + * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException */ public function setContainer(Request $request, Server $server) { diff --git a/app/Repositories/Eloquent/EloquentRepository.php b/app/Repositories/Eloquent/EloquentRepository.php index 6249e0c30..d6d82f7ab 100644 --- a/app/Repositories/Eloquent/EloquentRepository.php +++ b/app/Repositories/Eloquent/EloquentRepository.php @@ -187,7 +187,7 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf public function all() { $instance = $this->getBuilder(); - if (interface_exists(SearchableInterface::class)) { + if (is_subclass_of(get_called_class(), SearchableInterface::class)) { $instance = $instance->search($this->searchTerm); }