Skip to content

Commit 8827862

Browse files
authored
Use config dot notation (#288)
1 parent a677281 commit 8827862

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/NightwatchServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ private function registerAndCaptureConfig(): void
184184

185185
$this->config = $this->app->make(Repository::class);
186186

187-
$this->nightwatchConfig = $this->config->all()['nightwatch'] ?? [];
187+
$this->nightwatchConfig = $this->config->get('nightwatch') ?? []; // @phpstan-ignore assign.propertyType
188188
}
189189

190190
private function registerBindings(): void
@@ -197,7 +197,7 @@ private function registerBindings(): void
197197

198198
private function registerLogger(): void
199199
{
200-
if (! isset($this->config->all()['logging']['channels']['nightwatch'])) {
200+
if (! $this->config->has('logging.channels.nightwatch')) {
201201
$this->config->set('logging.channels.nightwatch', [
202202
'driver' => 'custom',
203203
'via' => Logger::class,

src/SensorManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public function queuedJob(JobQueueing|JobQueued $event): ?array
309309
$sensor = $this->queuedJobSensor ??= new QueuedJobSensor(
310310
executionState: $this->executionState,
311311
clock: $this->clock,
312-
connectionConfig: $this->config->all()['queue']['connections'] ?? [],
312+
connectionConfig: $this->config->get('queue.connections') ?? [], // @phpstan-ignore argument.type
313313
);
314314

315315
return $sensor($event);
@@ -323,7 +323,7 @@ public function jobAttempt(JobProcessed|JobReleasedAfterException|JobFailed $eve
323323
$sensor = $this->jobAttemptSensor ??= new JobAttemptSensor(
324324
commandState: $this->executionState, // @phpstan-ignore argument.type
325325
clock: $this->clock,
326-
connectionConfig: $this->config->all()['queue']['connections'] ?? [],
326+
connectionConfig: $this->config->get('queue.connections') ?? [], // @phpstan-ignore argument.type
327327
);
328328

329329
return $sensor($event);

0 commit comments

Comments
 (0)