Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
AbstractTranslationDTO
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getLastUpdatedTimestamp
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 toArray
n/a
0 / 0
n/a
0 / 0
0
1<?php
2
3declare( strict_types = 1 );
4
5namespace ContentTranslation\DTO;
6
7/**
8 * This class is a base class that encapsulates all the basic
9 * properties used inside (draft or published) translation DTO
10 * classes.
11 *
12 * @copyright See AUTHORS.txt
13 * @license GPL-2.0-or-later
14 */
15abstract class AbstractTranslationDTO {
16    public function __construct(
17        protected int $translationId,
18        protected string $sourceTitle,
19        protected string $sourceLanguage,
20        protected string $targetLanguage,
21        protected string $startTimestamp,
22        protected string $lastUpdatedTimestamp,
23        protected string $pageRevision,
24        protected ?string $targetTitle
25    ) {
26    }
27
28    public function getLastUpdatedTimestamp(): string {
29        return $this->lastUpdatedTimestamp;
30    }
31
32    abstract public function toArray(): array;
33}