Replace class references with "self"

This commit is contained in:
Nathan van der Werf 2018-08-15 18:47:06 +02:00
parent 02bd38cfb1
commit a075be206b
3 changed files with 8 additions and 8 deletions

View File

@ -759,7 +759,7 @@ class MediaManager extends WidgetBase
if ($result) {
if (!isset($result['mode'])) {
$result['mode'] = MediaManager::SELECTION_MODE_NORMAL;
$result['mode'] = self::SELECTION_MODE_NORMAL;
}
if (!isset($result['width'])) {
@ -774,7 +774,7 @@ class MediaManager extends WidgetBase
}
return [
'mode' => MediaManager::SELECTION_MODE_NORMAL,
'mode' => self::SELECTION_MODE_NORMAL,
'width' => null,
'height' => null
];
@ -783,9 +783,9 @@ class MediaManager extends WidgetBase
protected function setSelectionParams($selectionMode, $selectionWidth, $selectionHeight)
{
if (!in_array($selectionMode, [
MediaManager::SELECTION_MODE_NORMAL,
MediaManager::SELECTION_MODE_FIXED_RATIO,
MediaManager::SELECTION_MODE_FIXED_SIZE
self::SELECTION_MODE_NORMAL,
self::SELECTION_MODE_FIXED_RATIO,
self::SELECTION_MODE_FIXED_SIZE
])) {
throw new ApplicationException('Invalid input data');
}

View File

@ -85,11 +85,11 @@ class ThemeData extends Model
}
try {
$themeData = ThemeData::firstOrCreate(['theme' => $dirName]);
$themeData = self::firstOrCreate(['theme' => $dirName]);
}
catch (Exception $ex) {
// Database failed
$themeData = new ThemeData(['theme' => $dirName]);
$themeData = new self(['theme' => $dirName]);
}
return self::$instances[$dirName] = $themeData;

View File

@ -736,7 +736,7 @@ class PluginManager
/*
* Delete from file system
*/
if ($pluginPath = PluginManager::instance()->getPluginPath($id)) {
if ($pluginPath = self::instance()->getPluginPath($id)) {
File::deleteDirectory($pluginPath);
}
}