2 Commits
Author SHA1 Message Date
bwilliams 7fbc1a364d Corrected the namespace path for jobs 2024-06-17 16:23:45 +01:00
bwilliams 378b0f5e4b Prevent abstract jobs from being included in the list 2024-06-17 16:23:21 +01:00
+6 -1
View File
@@ -96,13 +96,18 @@ class JobInspector
$basePath = str_replace($file->getBasename(), '', $file->getBasePath());
$name = $basePath . $file->getFilename();
$className = str_replace('/', '\\', $basePath) . $file->getFilename();
$classPath = "\\$sprinkleNS\\Worker\\Jobs\\$className";
$classPath = "\\$sprinkleNS\\Jobs\\$className";
// Exclude known helper classes
if ($className == "JobInterface" || $className == "JobBase" || $className == "JobInspector") {
return null;
}
$reflect = new \ReflectionClass($classPath);
if ($reflect->isAbstract()) {
return null;
}
// Build the class name and namespace
return [
'sprinkle' => $sprinkleName,