Skip to content

Commit

Permalink
Use class aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
GwendolenLynch committed Aug 29, 2017
1 parent 75510c9 commit 7cfa1d1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Debug/Caster/AbstractCasterProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected static function defineCasters()
*/
public static function getCasters()
{
$cls = get_called_class();
$cls = static::class;

return array_map(
function ($func) use ($cls) {
Expand Down
2 changes: 1 addition & 1 deletion src/Debug/Caster/TransparentProxyTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static function registerCaster(AbstractCloner $cloner)
};

$cloner->addCasters([
get_called_class() => $caster,
static::class => $caster,
]);
}
}
2 changes: 1 addition & 1 deletion src/Extension/AssetTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private function loadAssets()
if (!$asset instanceof AssetInterface) {
throw new \InvalidArgumentException(sprintf(
'%s::registerAssets() should return a list of Bolt\Asset\AssetInterface objects. Got: %s',
get_called_class(),
static::class,
is_object($asset) ? get_class($asset) : gettype($asset)
));
}
Expand Down
2 changes: 1 addition & 1 deletion src/Extension/MenuTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function (MenuEntry $menus) {
if (!$menuEntry instanceof MenuEntry) {
throw new \InvalidArgumentException(sprintf(
'%s::registerMenuEntries() should return a list of Bolt\Menu\MenuEntry objects. Got: %s',
get_called_class(),
static::class,
get_class($menuEntry)
));
}
Expand Down
2 changes: 1 addition & 1 deletion src/Nut/PimpleDump.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class PimpleDump extends BaseCommand
*/
public function isEnabled()
{
return class_exists('\Sorien\Provider\PimpleDumpProvider');
return class_exists(PimpleDumpProvider::class);
}

/**
Expand Down

0 comments on commit 7cfa1d1

Please sign in to comment.