Skip to content

Commit

Permalink
Code Cleanup - MissingPluginException
Browse files Browse the repository at this point in the history
Ensure files that use MissingPluginException have the appropriate use
statement
  • Loading branch information
Michael Pirouet committed Apr 5, 2015
1 parent 6261c50 commit 4349adc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Core/Plugin.php
Expand Up @@ -15,6 +15,7 @@
namespace Cake\Core;

use Cake\Core\ClassLoader;
use Cake\Core\Exception\MissingPluginException;
use Cake\Core\Configure;
use DirectoryIterator;

Expand Down Expand Up @@ -146,7 +147,7 @@ public static function load($plugin, array $config = [])
}

if (empty($config['path'])) {
throw new Exception\MissingPluginException(['plugin' => $plugin]);
throw new MissingPluginException(['plugin' => $plugin]);
}

$config['classPath'] = $config['path'] . $config['classBase'] . DS;
Expand Down Expand Up @@ -260,7 +261,7 @@ public static function loadAll(array $options = [])
public static function path($plugin)
{
if (empty(static::$_plugins[$plugin])) {
throw new Exception\MissingPluginException(['plugin' => $plugin]);
throw new MissingPluginException(['plugin' => $plugin]);
}
return static::$_plugins[$plugin]['path'];
}
Expand All @@ -275,7 +276,7 @@ public static function path($plugin)
public static function classPath($plugin)
{
if (empty(static::$_plugins[$plugin])) {
throw new Exception\MissingPluginException(['plugin' => $plugin]);
throw new MissingPluginException(['plugin' => $plugin]);
}
return static::$_plugins[$plugin]['classPath'];
}
Expand All @@ -290,7 +291,7 @@ public static function classPath($plugin)
public static function configPath($plugin)
{
if (empty(static::$_plugins[$plugin])) {
throw new Exception\MissingPluginException(['plugin' => $plugin]);
throw new MissingPluginException(['plugin' => $plugin]);
}
return static::$_plugins[$plugin]['configPath'];
}
Expand Down

0 comments on commit 4349adc

Please sign in to comment.