Skip to content

Commit eb59d2b

Browse files
committed
refactor: by rector
1 parent f49a557 commit eb59d2b

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

‎system/Config/Factories.php‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,12 +467,10 @@ public static function getComponentInstances(string $component): array
467467
];
468468
}
469469

470-
$data = [
470+
return [
471471
'aliases' => static::$aliases[$component],
472472
'instances' => self::$instances[$component],
473473
];
474-
475-
return $data;
476474
}
477475

478476
/**
@@ -494,6 +492,6 @@ public static function setComponentInstances(string $component, array $data)
494492
*/
495493
public static function isUpdated(string $component): bool
496494
{
497-
return isset(self::$updated[$component]) ? true : false;
495+
return isset(self::$updated[$component]);
498496
}
499497
}

‎tests/system/Config/FactoriesTest.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace CodeIgniter\Config;
1313

1414
use CodeIgniter\Test\CIUnitTestCase;
15+
use Config\Database;
1516
use InvalidArgumentException;
1617
use ReflectionClass;
1718
use stdClass;
@@ -402,7 +403,7 @@ public function testDefineAndLoad()
402403
public function testGetComponentInstances()
403404
{
404405
Factories::config('App');
405-
Factories::config(\Config\Database::class);
406+
Factories::config(Database::class);
406407

407408
$data = Factories::getComponentInstances('config');
408409

0 commit comments

Comments
 (0)