UuidPlugin   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 28
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getDynamicSchemaLogic() 0 3 1
A getNormalizers() 0 4 1
A getDefinedStaticData() 0 4 1
1
<?php
2
3
namespace W2w\Lib\Apie\Plugins\Uuid;
4
5
use erasys\OpenApi\Spec\v3\Schema;
6
use Ramsey\Uuid\UuidInterface;
7
use W2w\Lib\Apie\OpenApiSchema\Factories\SchemaFactory;
8
use W2w\Lib\Apie\PluginInterfaces\NormalizerProviderInterface;
9
use W2w\Lib\Apie\PluginInterfaces\SchemaProviderInterface;
10
use W2w\Lib\Apie\Plugins\Uuid\Normalizers\UuidNormalizer;
11
12
class UuidPlugin implements NormalizerProviderInterface, SchemaProviderInterface
13
{
14
    /**
15
     * {@inheritDoc}
16
     */
17
    public function getNormalizers(): array
18
    {
19
        return [
20
            new UuidNormalizer()
21
        ];
22
    }
23
24
    /**
25
     * {@inheritDoc}
26
     */
27
    public function getDefinedStaticData(): array
28
    {
29
        return [
30
            UuidInterface::class => SchemaFactory::createStringSchema('uuid')
31
        ];
32
    }
33
34
    /**
35
     * {@inheritDoc}
36
     */
37
    public function getDynamicSchemaLogic(): array
38
    {
39
        return [];
40
    }
41
}
42