Skip to content

Commit

Permalink
refactor: replace ::static with ::self
Browse files Browse the repository at this point in the history
For consistency.
  • Loading branch information
kenjis committed Oct 12, 2023
1 parent 272ebaf commit 4b5d112
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions system/Config/Factories.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,19 +430,19 @@ public static function reset(?string $component = null)
{
if ($component) {
unset(
static::$options[$component],
static::$aliases[$component],
static::$instances[$component],
static::$updated[$component]
self::$options[$component],
self::$aliases[$component],
self::$instances[$component],
self::$updated[$component]
);

return;
}

static::$options = [];
static::$aliases = [];
static::$instances = [];
static::$updated = [];
self::$options = [];
self::$aliases = [];
self::$instances = [];
self::$updated = [];
}

/**
Expand Down Expand Up @@ -500,7 +500,7 @@ public static function getBasename(string $alias): string
*/
public static function getComponentInstances(string $component): array
{
if (! isset(static::$aliases[$component])) {
if (! isset(self::$aliases[$component])) {
return [
'options' => [],
'aliases' => [],
Expand All @@ -509,8 +509,8 @@ public static function getComponentInstances(string $component): array
}

return [
'options' => static::$options[$component],
'aliases' => static::$aliases[$component],
'options' => self::$options[$component],
'aliases' => self::$aliases[$component],
'instances' => self::$instances[$component],
];
}
Expand All @@ -522,11 +522,11 @@ public static function getComponentInstances(string $component): array
*/
public static function setComponentInstances(string $component, array $data): void
{
static::$options[$component] = $data['options'];
static::$aliases[$component] = $data['aliases'];
static::$instances[$component] = $data['instances'];
self::$options[$component] = $data['options'];
self::$aliases[$component] = $data['aliases'];
self::$instances[$component] = $data['instances'];

unset(static::$updated[$component]);
unset(self::$updated[$component]);
}

/**
Expand Down

0 comments on commit 4b5d112

Please sign in to comment.