Skip to content

Commit

Permalink
Fix disabling of class tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Nov 19, 2024
1 parent db1f4bb commit 3adadac
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/Annotator/ClassAnnotatorTaskCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,7 @@ class ClassAnnotatorTaskCollection {
public function __construct(array $tasks = []) {
$defaultTasks = $this->defaultTasks();
$tasks += $defaultTasks;

foreach ($tasks as $task) {
if (!$task) {
continue;
}

$this->tasks = $tasks;
}
$this->tasks = $tasks;
}

/**
Expand All @@ -60,6 +53,12 @@ public function defaultTasks(): array {
if (is_numeric($k)) {
$tasks[$v] = $v;
unset($tasks[$k]);

continue;
}

if (!$v) {
unset($tasks[$k]);
}
}

Expand Down

0 comments on commit 3adadac

Please sign in to comment.