Skip to content

Commit 809242a

Browse files
committed
refactor: Simplify error and info message handling in RefactorCommand
1 parent e2d6030 commit 809242a

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/Commands/RefactorCommand.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function handle(): int
119119
$this->loadEnums();
120120

121121
if (count($this->enums) === 0) {
122-
$this->components->error('No enums found. Check your enumify.paths.enums configuration.');
122+
$this->error('No enums found. Check your enumify.paths.enums configuration.');
123123

124124
return self::FAILURE;
125125
}
@@ -160,7 +160,7 @@ private function runInteractive(): int
160160
$this->loadEnums();
161161

162162
if (count($this->enums) === 0) {
163-
$this->components->error('No enums found. Check your enumify.paths.enums configuration.');
163+
$this->error('No enums found. Check your enumify.paths.enums configuration.');
164164

165165
return self::FAILURE;
166166
}
@@ -257,7 +257,7 @@ private function runNormalizeKeys(): int
257257
$this->loadEnumsWithPaths();
258258

259259
if (count($this->enums) === 0) {
260-
$this->components->error('No enums found. Check your enumify.paths.enums configuration.');
260+
$this->error('No enums found. Check your enumify.paths.enums configuration.');
261261

262262
return self::FAILURE;
263263
}
@@ -266,7 +266,7 @@ private function runNormalizeKeys(): int
266266
$this->findNonUppercaseKeys();
267267

268268
if (empty($this->keyNormalizationIssues)) {
269-
$this->components->info('All enum keys are already UPPERCASE!');
269+
$this->info('All enum keys are already UPPERCASE!');
270270

271271
return self::SUCCESS;
272272
}
@@ -313,7 +313,7 @@ private function runNormalizeKeysInteractive(): int
313313
$this->findNonUppercaseKeys();
314314

315315
if (empty($this->keyNormalizationIssues)) {
316-
$this->components->info('All enum keys are already UPPERCASE!');
316+
$this->info('All enum keys are already UPPERCASE!');
317317

318318
return self::SUCCESS;
319319
}

0 commit comments

Comments
 (0)