Code Duplication    Length = 23-23 lines in 2 locations

src/Graviton/TestBundle/Client.php 2 locations

@@ 55-77 (lines=23) @@
52
     *
53
     * @api
54
     */
55
    public function post(
56
        $uri,
57
        $content,
58
        array $parameters = array(),
59
        array $files = array(),
60
        array $server = array(),
61
        $jsonEncode = true
62
    ) {
63
        $this->jsonRequest = $jsonEncode;
64
65
        if ($jsonEncode) {
66
            $content = json_encode($content);
67
        }
68
69
        return $this->request(
70
            'POST',
71
            $uri,
72
            $parameters,
73
            $files,
74
            $server,
75
            $content
76
        );
77
    }
78
79
    /**
80
     * PUTs to an URI.
@@ 93-115 (lines=23) @@
90
     *
91
     * @api
92
     */
93
    public function put(
94
        $uri,
95
        $content,
96
        array $parameters = array(),
97
        array $files = array(),
98
        array $server = array(),
99
        $jsonEncode = true
100
    ) {
101
        $this->jsonRequest = $jsonEncode;
102
103
        if ($jsonEncode) {
104
            $content = json_encode($content);
105
        }
106
107
        return $this->request(
108
            'PUT',
109
            $uri,
110
            $parameters,
111
            $files,
112
            $server,
113
            $content
114
        );
115
    }
116
117
    /**
118
     * prepare a deserialized copy of a json response