diff --git a/Task/Collect/MethodCollector.php b/Task/Collect/MethodCollector.php index f91a9620..1603bf4a 100644 --- a/Task/Collect/MethodCollector.php +++ b/Task/Collect/MethodCollector.php @@ -26,6 +26,10 @@ class MethodCollector { * - 'description': The description from the method's docblock first line. */ public function collectMethods($name) { + if (!$name) { + return []; + } + // Get a reflection class for the interface. $reflection = new \ReflectionClass($name); $methods = $reflection->getMethods(); diff --git a/Task/Collect/PluginTypesCollector.php b/Task/Collect/PluginTypesCollector.php index 36d7d9ff..8bfe10ae 100644 --- a/Task/Collect/PluginTypesCollector.php +++ b/Task/Collect/PluginTypesCollector.php @@ -614,7 +614,7 @@ protected function addPluginBaseClass(&$data) { */ protected function analysePluginTypeBaseClassFromDefiningModule($data) { // Bail if the interface doesn't have an 'Interface' suffix. - if (!preg_match('@Interface$@', $data['plugin_interface'])) { + if (!$data['plugin_interface'] || !preg_match('@Interface$@', $data['plugin_interface'])) { return; }