Skip to content

Commit 1844457

Browse files
committed
Phpstan: fix missing sfTask* return statement
1 parent 70aa655 commit 1844457

31 files changed

+67
-1
lines changed

lib/task/app/sfAppRoutesTask.class.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ protected function execute($arguments = [], $options = [])
4747

4848
// display
4949
$arguments['name'] ? $this->outputRoute($arguments['application'], $arguments['name']) : $this->outputRoutes($arguments['application']);
50+
51+
return 0;
5052
}
5153

5254
protected function outputRoutes($application)

lib/task/cache/sfCacheClearTask.class.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ protected function execute($arguments = [], $options = [])
154154
if (null === $options['app'] && 'all' == $options['type']) {
155155
$this->getFilesystem()->remove(sfFinder::type('file')->discard('.*')->in(sfConfig::get('sf_cache_dir')));
156156
}
157+
158+
return 0;
157159
}
158160

159161
protected function getClearCacheMethod($type)

lib/task/configure/sfConfigureAuthorTask.class.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,7 @@ protected function execute($arguments = [], $options = [])
6363
}
6464

6565
file_put_contents($file, $ini);
66+
67+
return 0;
6668
}
6769
}

lib/task/generator/sfGenerateAppTask.class.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,5 +153,7 @@ protected function execute($arguments = [], $options = [])
153153

154154
// Create test dir
155155
$this->getFilesystem()->mkdirs(sfConfig::get('sf_test_dir').'/functional/'.$app);
156+
157+
return 0;
156158
}
157159
}

lib/task/generator/sfGenerateModuleTask.class.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,7 @@ protected function execute($arguments = [], $options = [])
104104
// customize php and yml files
105105
$finder = sfFinder::type('file')->name('*.php', '*.yml');
106106
$this->getFilesystem()->replaceTokens($finder->in($moduleDir), '##', '##', $constants);
107+
108+
return 0;
107109
}
108110
}

lib/task/generator/sfGenerateProjectTask.class.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ protected function execute($arguments = [], $options = [])
137137
$fixPerms->run();
138138

139139
$this->replaceTokens();
140+
141+
return 0;
140142
}
141143

142144
protected function canRunInstaller($installer)

lib/task/generator/sfGenerateTaskTask.class.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,5 +178,7 @@ protected function execute(\$arguments = array(), \$options = array())
178178

179179
$this->logSection('task', sprintf('Creating "%s" task file', $taskFile));
180180
file_put_contents($taskFile, $content);
181+
182+
return 0;
181183
}
182184
}

lib/task/help/sfHelpTask.class.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ protected function execute($arguments = [], $options = [])
5757
} else {
5858
$this->outputAsText($task);
5959
}
60+
61+
return 0;
6062
}
6163

6264
protected function outputAsText(sfTask $task)

lib/task/help/sfListTask.class.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ protected function execute($arguments = [], $options = [])
7373
} else {
7474
$this->outputAsText($arguments['namespace'], $tasks);
7575
}
76+
77+
return 0;
7678
}
7779

7880
protected function outputAsText($namespace, $tasks)

lib/task/i18n/sfI18nExtractTask.class.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public function execute($arguments = [], $options = [])
6666

6767
$extract->deleteOldMessages();
6868
}
69+
70+
return 0;
6971
}
7072

7173
/**

0 commit comments

Comments
 (0)