Skip to content

Commit 1e36b28

Browse files
Maintenance\Cleanup\v3_0\OldFiles → Maintenance\Cleanup\OldFilesBase
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
1 parent a414872 commit 1e36b28

5 files changed

Lines changed: 9 additions & 13 deletions

File tree

Sources/Maintenance/Cleanup/CleanupBase.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff 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
{

Sources/Maintenance/Cleanup/v3_0/OldFiles.php renamed to Sources/Maintenance/Cleanup/OldFilesBase.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@
1313

1414
declare(strict_types=1);
1515

16-
namespace SMF\Maintenance\Cleanup\v3_0;
16+
namespace SMF\Maintenance\Cleanup;
1717

1818
use SMF\Config;
19-
use SMF\Maintenance\Cleanup\CleanupBase;
2019
use 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
{

Sources/Maintenance/Cleanup/v2_1/OldFiles.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515

1616
namespace 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
*/
2323
class OldFiles extends OldFilesBase
2424
{

Sources/Maintenance/Cleanup/v3_0/TasksDirCase.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff 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
{

Sources/Maintenance/Tools/Upgrade.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)