Skip to content

Commit

Permalink
Add fixes proposed by Rector
Browse files Browse the repository at this point in the history
  • Loading branch information
dragomano committed Jan 3, 2024
1 parent b56d108 commit bf8051e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 11 deletions.
3 changes: 0 additions & 3 deletions Sources/SimpleModMaker/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,6 @@ private function createTables(): void

private function addScheduledTasks(string &$database): void
{
if (empty($this->skeleton['scheduled_tasks']))
return;

foreach ($this->skeleton['scheduled_tasks'] as $task) {
switch ($task['regularity']) {
case 0:
Expand Down
6 changes: 0 additions & 6 deletions Sources/SimpleModMaker/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -842,9 +842,6 @@ private function prepareScheduledTasks(array &$tasks, string $baseClassname): vo
{
global $context;

if (empty($context['smm_skeleton']['scheduled_tasks']))
return;

foreach ($context['smm_skeleton']['scheduled_tasks'] as $id => $task) {
$classname = $this->getCamelName($task['slug']);
$filename = $classname . '.php';
Expand Down Expand Up @@ -877,9 +874,6 @@ private function prepareBackgroundTasks(array &$tasks, string $baseClassname): v
{
global $context;

if (empty($context['smm_skeleton']['background_tasks']))
return;

foreach ($context['smm_skeleton']['background_tasks'] as $id => $task) {
$classname = $task['classname'];
$filename = $classname . '.php';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

$tasks = '';

foreach ($context['smm_skeleton']['legacy_tasks'] as $id => $task) {
foreach ($context['smm_skeleton']['legacy_tasks'] as $task) {
if (empty($task['regularity'])) {
$tasks .= "\$this->{$task['method']};";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

$tasks = '';

foreach ($context['smm_skeleton']['legacy_tasks'] as $id => $task) {
foreach ($context['smm_skeleton']['legacy_tasks'] as $task) {
if (empty($task['regularity']))
continue;

Expand Down

0 comments on commit bf8051e

Please sign in to comment.