Completed
Pull Request — master (#72)
by Nate
03:35
created

DefaultRequestBodyConverter::convert()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
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
declare(strict_types=1);
8
9
namespace Tebru\Retrofit\Internal\Converter;
10
11
use Psr\Http\Message\StreamInterface;
12
use Tebru\Retrofit\RequestBodyConverter;
13
14
/**
15
 * Class DefaultRequestBodyConverter
16
 *
17
 * Noop, defaults to returning stream
18
 *
19
 * @author Nate Brunette <[email protected]>
20
 */
21
final class DefaultRequestBodyConverter implements RequestBodyConverter
22
{
23
    /**
24
     * The value here should already be a stream, so we can return it
25
     *
26
     * @param mixed $value
27
     * @return StreamInterface
28
     */
29
    public function convert($value): StreamInterface
30
    {
31
        return $value;
32
    }
33
}
34