File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,9 +38,7 @@ abstract class CleanupBase implements SubStepInterface
3838 ****************/
3939
4040 /**
41- * Check if the task should be performed or not.
4241 *
43- * @return bool True if this task needs to be run, false otherwise.
4442 */
4543 public function isCandidate (): bool
4644 {
Original file line number Diff line number Diff line change 1313
1414declare (strict_types=1 );
1515
16- namespace SMF \Maintenance \Cleanup \ v3_0 ;
16+ namespace SMF \Maintenance \Cleanup ;
1717
1818use SMF \Config ;
19- use SMF \Maintenance \Cleanup \CleanupBase ;
2019use SMF \Utils ;
2120
22- class OldFiles extends CleanupBase
21+ /**
22+ * Base class for cleanup tasks that delete files that have been removed in a
23+ * new version of SMF.
24+ */
25+ abstract class OldFilesBase extends CleanupBase
2326{
2427 /*******************
2528 * Public properties
@@ -37,7 +40,7 @@ class OldFiles extends CleanupBase
3740 /**
3841 * @var array
3942 *
40- * List of files removed in SMF 3.0 .
43+ * List of files removed in the relevant version of SMF .
4144 */
4245 protected array $ removed = [
4346 // Files in the Themes directory.
@@ -57,9 +60,7 @@ class OldFiles extends CleanupBase
5760 ****************/
5861
5962 /**
60- * Check if the task should be performed or not.
6163 *
62- * @return bool True if this task needs to be run, false otherwise.
6364 */
6465 public function isCandidate (): bool
6566 {
Original file line number Diff line number Diff line change 1515
1616namespace SMF \Maintenance \Cleanup \v2_1 ;
1717
18- use SMF \Maintenance \Cleanup \v3_0 \ OldFiles as OldFilesBase ;
18+ use SMF \Maintenance \Cleanup \OldFilesBase ;
1919
2020/**
21- * Just like the v3_0 version of OldFiles, but with a different list of files .
21+ * Deletes files that were present in SMF 2.0 but not in SMF 2.1 .
2222 */
2323class OldFiles extends OldFilesBase
2424{
Original file line number Diff line number Diff line change @@ -35,9 +35,7 @@ class TasksDirCase extends CleanupBase
3535 ****************/
3636
3737 /**
38- * Check if the task should be performed or not.
3938 *
40- * @return bool True if this task needs to be run, false otherwise.
4139 */
4240 public function isCandidate (): bool
4341 {
Original file line number Diff line number Diff line change @@ -193,7 +193,6 @@ class Upgrade extends ToolsBase implements ToolsInterface
193193 // Cleanup steps for 2.1 -> 3.0
194194 'v3_0 ' => [
195195 Cleanup \v3_0 \TasksDirCase::class,
196- Cleanup \v3_0 \OldFiles::class,
197196 ],
198197 ];
199198
You can’t perform that action at this time.
0 commit comments