OauthClient::mapEntity()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 3
b 0
f 0
nc 1
nop 1
dl 0
loc 6
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Platine\Framework\OAuth2\Entity;
6
7
use Platine\Orm\Entity;
8
use Platine\Orm\Mapper\EntityMapperInterface;
9
10
/**
11
* @class OauthClient
12
* @package Platine\Framework\OAuth2\Entity
13
* @extends Entity<OauthClient>
14
*/
15
class OauthClient extends Entity
16
{
17
    /**
18
     *
19
     * @param EntityMapperInterface<OauthClient> $mapper
20
     * @return void
21
     */
22
    public static function mapEntity(EntityMapperInterface $mapper): void
23
    {
24
         $mapper->useTimestamp();
25
         $mapper->casts([
26
            'created_at' => 'date',
27
            'updated_at' => '?date',
28
         ]);
29
    }
30
}
31