| @@ 49-60 (lines=12) @@ | ||
| 46 | * @param IUserManager|null $userManager |
|
| 47 | * @param Expiration|null $expiration |
|
| 48 | */ |
|
| 49 | public function __construct(IUserManager $userManager = null, |
|
| 50 | Expiration $expiration = null) { |
|
| 51 | // Run once per 30 minutes |
|
| 52 | $this->setInterval(60 * 30); |
|
| 53 | ||
| 54 | if (is_null($expiration) || is_null($userManager)) { |
|
| 55 | $this->fixDIForJobs(); |
|
| 56 | } else { |
|
| 57 | $this->userManager = $userManager; |
|
| 58 | $this->expiration = $expiration; |
|
| 59 | } |
|
| 60 | } |
|
| 61 | ||
| 62 | protected function fixDIForJobs() { |
|
| 63 | $application = new Application(); |
|
| @@ 44-54 (lines=11) @@ | ||
| 41 | */ |
|
| 42 | private $userManager; |
|
| 43 | ||
| 44 | public function __construct(IUserManager $userManager = null, Expiration $expiration = null) { |
|
| 45 | // Run once per 30 minutes |
|
| 46 | $this->setInterval(60 * 30); |
|
| 47 | ||
| 48 | if (is_null($expiration) || is_null($userManager)) { |
|
| 49 | $this->fixDIForJobs(); |
|
| 50 | } else { |
|
| 51 | $this->expiration = $expiration; |
|
| 52 | $this->userManager = $userManager; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| 56 | protected function fixDIForJobs() { |
|
| 57 | $application = new Application(); |
|