Completed
Push — master ( 00c305...784882 )
by Nate
03:32
created

SerializationContext::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 9
rs 9.6666
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
/*
3
 * Copyright (c) Nate Brunette.
4
 * Distributed under the MIT License (http://opensource.org/licenses/MIT)
5
 */
6
 
7
namespace Tebru\Retrofit\Annotation\Serializer;
8
9
/**
10
 * SerializationContext
11
 *
12
 * Define a context when serializing an object for a request.
13
 *
14
 * @author Matthew Loberg <[email protected]>
15
 * @author Nate Brunette <[email protected]>
16
 *
17
 * @Annotation
18
 * @Target({"CLASS", "METHOD"})
19
 */
20
class SerializationContext extends SerializerContext
21
{
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function __construct(array $params)
26
    {
27
        parent::__construct(['value' => $params]);
28
29
        trigger_error(
30
            'Retrofit Deprecation: @SerializationContext is deprecated and will be removed in v3.  Use @SerializerContext instead.',
31
            E_USER_DEPRECATED
32
        );
33
    }
34
}
35