Failed Conditions
Branch newinternal (104de7)
by Simon
09:33
created

maintenance/ClearExpiredIdentificationData.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
namespace Waca;
3
4
use Waca\ConsoleTasks\ClearExpiredIdentificationData;
5
6
chdir(__DIR__);
7
chdir('..');
8
9
require_once('config.inc.php');
10
11
global $siteConfiguration;
0 ignored issues
show
Compatibility Best Practice introduced by
Use of global functionality is not recommended; it makes your code harder to test, and less reusable.

Instead of relying on global state, we recommend one of these alternatives:

1. Pass all data via parameters

function myFunction($a, $b) {
    // Do something
}

2. Create a class that maintains your state

class MyClass {
    private $a;
    private $b;

    public function __construct($a, $b) {
        $this->a = $a;
        $this->b = $b;
    }

    public function myFunction() {
        // Do something
    }
}
Loading history...
12
$application = new ConsoleStart($siteConfiguration, new ClearExpiredIdentificationData());
13
14
$application->run();
15