Completed
Push — master ( 1961b7...c175fe )
by Maciej
02:33
created

StringifyHandler   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A toDateTime() 0 4 1
1
<?php
2
3
namespace Clearcode\ElkBridgeBundle\Serializer\Handler;
4
5
use Carbon\Carbon;
6
use JMS\Serializer\JsonSerializationVisitor;
7
8
class StringifyHandler
9
{
10
    /**
11
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
12
     *
13
     * @param JsonSerializationVisitor $visitor
14
     * @param Carbon                   $value
15
     *
16
     * @return []
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...
17
     */
18
    public function toDateTime(JsonSerializationVisitor $visitor, Carbon $value)
0 ignored issues
show
Unused Code introduced by
The parameter $visitor is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
19
    {
20
        return new \DateTime($value->toDateTimeString());
21
    }
22
}
23