Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
14 / 14
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
Apiclient
100.00% covered (success)
100.00%
14 / 14
100.00% covered (success)
100.00%
3 / 3
3
100.00% covered (success)
100.00%
1 / 1
 getEntityMapping
100.00% covered (success)
100.00%
8 / 8
100.00% covered (success)
100.00%
1 / 1
1
 addConditionApiclientKey
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 postProcess
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace BO\Zmsdb\Query;
4
5/**
6 * @SuppressWarnings(Public)
7 */
8class Apiclient extends Base implements MappingInterface
9{
10    /**
11     * @var String TABLE mysql table reference
12     */
13    const TABLE = 'apiclient';
14
15    #[\Override]
16    public function getEntityMapping()
17    {
18        $mapping = [
19            'apiClientID' => 'apiclient.apiClientID',
20            'clientKey' => 'apiclient.clientKey',
21            'shortname' => 'apiclient.shortname',
22            'accesslevel' => 'apiclient.accesslevel',
23            'lastChange' => 'apiclient.updateTimestamp',
24        ];
25        return $mapping;
26    }
27
28    public function addConditionApiclientKey($clientKey)
29    {
30        $this->query->where('apiclient.clientKey', '=', $clientKey);
31        return $this;
32    }
33
34    #[\Override]
35    public function postProcess($data)
36    {
37        $data[$this->getPrefixed("lastChange")] =
38            (new \DateTime($data[$this->getPrefixed("lastChange")] . \BO\Zmsdb\Connection\Select::$connectionTimezone))
39            ->getTimestamp();
40        return $data;
41    }
42}