Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
ResetGhostWorkstationCountByCron
n/a
0 / 0
n/a
0 / 0
2
n/a
0 / 0
 init
n/a
0 / 0
n/a
0 / 0
2
1<?php
2
3namespace BO\Zmsdb\Helper;
4
5/**
6 * @codeCoverageIgnore
7 */
8class ResetGhostWorkstationCountByCron
9{
10    /**
11     * reset ghostWorkstationCount by cron
12     *
13     * @return Entity
14     */
15
16    public static function init()
17    {
18        $dateTime = new \DateTimeImmutable();
19        $query = new \BO\Zmsdb\Scope();
20        $scopeList = $query->readList();
21        foreach ($scopeList as $scope) {
22            $scope->setStatusQueue('ghostWorkstationCount', '-1');
23            $query->updateGhostWorkstationCount($scope, $dateTime);
24        }
25    }
26}