Completed
Push — master ( 3dbd04...274624 )
by Maciej
02:48
created

StringifyCarbonHandler   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 0
Metric Value
wmc 1
c 1
b 0
f 0
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 StringifyCarbonHandler
9
{
10
    /**
11
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
12
     *
13
     * @param JsonSerializationVisitor $visitor
14
     * @param Carbon                   $value
15
     *
16
     * @return string
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 $value->toDateTimeString();
21
    }
22
}
23