Passed
Branch 3.0.0 (98e096)
by Pieter
02:47
created

DateTimePlugin::getNormalizers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
4
namespace W2w\Lib\Apie\Plugins;
5
6
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
7
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
8
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
9
use W2w\Lib\Apie\PluginInterfaces\NormalizerProviderInterface;
10
11
class DateTimePlugin implements NormalizerProviderInterface
12
{
13
    /**
14
     * @return NormalizerInterface[]|DenormalizerInterface[]
15
     */
16
    public function getNormalizers(): array
17
    {
18
        return [
19
            new DateTimeNormalizer([DateTimeNormalizer::FORMAT_KEY => 'Y-m-d H:i:s'])
20
        ];
21
    }
22
}
23