From 2a3e2fa5769cd901ff9057433924836be83b3586 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Wed, 2 Mar 2016 22:10:49 +0100 Subject: [PATCH] Fix typos in class docs/exception messages --- lib/Pico.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/Pico.php b/lib/Pico.php index a0cb75f..00f9e9e 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -405,7 +405,13 @@ class Pico $this->plugins[$className] = $plugin; } else { // TODO: breaks backward compatibility - //throw new RuntimeException("Unable to load plugin '" . $className . "'"); + /* + $pluginFileName = substr($pluginFile, strlen($this->getPluginsDir())); + throw new RuntimeException( + "Unable to load plugin '" . $className . "' " + . "from '" . $pluginFileName . "'" + ); + */ } } } @@ -431,15 +437,15 @@ class Pico if (class_exists($className)) { $plugin = new $className($this); } else { - throw new RuntimeException("Unable to load plugin '" . $className . "'"); + throw new RuntimeException("Unable to load plugin '" . $className . "': Class not found"); } } $className = get_class($plugin); if (!is_a($plugin, 'PicoPluginInterface')) { throw new RuntimeException( - "Manually loaded plugins must implement 'PicoPluginInterface', " - . "'" . $className . "' given" + "Unable to load plugin '" . $className . "': " + . "Manually loaded plugins must implement 'PicoPluginInterface'" ); } @@ -1382,7 +1388,7 @@ class Pico * * Deprecated events (as used by plugins not implementing * {@link PicoPluginInterface}) are triggered by {@link PicoDeprecated}. - * You MUST NOT trigger events of Pico's core through a plugin! + * You MUST NOT trigger events of Pico's core with a plugin! * * @see PicoPluginInterface * @see AbstractPicoPlugin