GuzzleStreamFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 8
ccs 2
cts 2
cp 1
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A createStream() 0 3 1
1
<?php
2
3
namespace Http\Message\StreamFactory;
4
5
use Http\Message\StreamFactory;
6
7
/**
8
 * Creates Guzzle streams.
9
 *
10
 * @author Михаил Красильников <[email protected]>
11
 *
12
 * @deprecated This will be removed in php-http/message2.0. Consider using the official Guzzle PSR-17 factory
13
 */
14
final class GuzzleStreamFactory implements StreamFactory
15
{
16
    /**
17 7
     * {@inheritdoc}
18
     */
19 7
    public function createStream($body = null)
20
    {
21
        return \GuzzleHttp\Psr7\stream_for($body);
0 ignored issues
show
Deprecated Code introduced by
The function GuzzleHttp\Psr7\stream_for() has been deprecated: stream_for will be removed in guzzlehttp/psr7:2.0. Use Utils::streamFor instead. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

21
        return /** @scrutinizer ignore-deprecated */ \GuzzleHttp\Psr7\stream_for($body);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
22
    }
23
}
24