Dated   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 31
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getCreatedOn() 0 4 1
A getUpdatedOn() 0 4 1
1
<?php
2
declare(strict_types=1);
3
/**
4
 * Minotaur
5
 *
6
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
7
 * use this file except in compliance with the License. You may obtain a copy of
8
 * the License at
9
 *
10
 * http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing, software
13
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
 * License for the specific language governing permissions and limitations under
16
 * the License.
17
 *
18
 * @copyright 2015-2017 Appertly
19
 * @license   Apache-2.0
20
 */
21
namespace Minotaur\Db\Entity;
22
23
use MongoDB\BSON\UTCDateTime;
24
25
/**
26
 * Trait for entities with a create and updated date
27
 */
28
trait Dated
29
{
30
    /**
31
     * @var UTCDateTime The document created date
32
     */
33
    protected $createdOn;
34
    /**
35
     * @var UTCDateTime The document updated date
36
     */
37
    protected $updatedOn;
38
39
    /**
40
     * Gets the created date
41
     *
42
     * @return - The created date
0 ignored issues
show
Documentation introduced by
The doc-type - could not be parsed: Unknown type name "-" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
43
     */
44
    public function getCreatedOn(): UTCDateTime
45
    {
46
        return $this->createdOn;
47
    }
48
49
    /**
50
     * Gets the updated date
51
     *
52
     * @return - The updated date
0 ignored issues
show
Documentation introduced by
The doc-type - could not be parsed: Unknown type name "-" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
53
     */
54
    public function getUpdatedOn(): UTCDateTime
55
    {
56
        return $this->updatedOn;
57
    }
58
}
59