Lint
This commit is contained in:
parent
53b92624d1
commit
a06f5a573d
|
@ -4,10 +4,9 @@ namespace Silva\Adrema\Components;
|
|||
|
||||
use Cms\Classes\ComponentBase;
|
||||
use Cms\Classes\Page;
|
||||
use FetchAllEvents;
|
||||
use Silva\Adrema\Exceptions\ComponentException;
|
||||
use Silva\Adrema\Models\Settings;
|
||||
use Silva\Adrema\Support\FetchAllEvents as SupportFetchAllEvents;
|
||||
use Silva\Adrema\Support\FetchAllEvents;
|
||||
|
||||
class EventIndex extends ComponentBase
|
||||
{
|
||||
|
@ -40,7 +39,7 @@ class EventIndex extends ComponentBase
|
|||
$this->eventSlug = $this->property('eventSlug');
|
||||
|
||||
if ($this->eventSlug) {
|
||||
$events = data_get(app(SupportFetchAllEvents::class)->run(), 'data');
|
||||
$events = data_get(app(FetchAllEvents::class)->run(), 'data');
|
||||
throw_if(is_null($events), ComponentException::class, 'event_fetching_failed');
|
||||
|
||||
$this->event = collect($events)->first(fn ($event) => $event['slug'] === $this->eventSlug);
|
||||
|
|
Loading…
Reference in New Issue