Skip to content

Commit f8ca5b1

Browse files
committed
add factory stub for phpstan
1 parent e8e2155 commit f8ca5b1

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

phpstan.neon.dist

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ parameters:
22
level: max
33
checkMissingIterableValueType: false
44
treatPhpDocTypesAsCertain: false
5+
stubFiles:
6+
- stubs/RequestFactory.php
57
paths:
68
- src
79
ignoreErrors:

stubs/RequestFactory.php

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
namespace Http\Message;
4+
5+
use Psr\Http\Message\UriInterface;
6+
use Psr\Http\Message\RequestInterface;
7+
use Psr\Http\Message\StreamInterface;
8+
9+
/**
10+
* Factory for PSR-7 Request.
11+
*
12+
* @author Márk Sági-Kazár <[email protected]>
13+
*
14+
* @deprecated since version 1.1, use Psr\Http\Message\RequestFactoryInterface instead.
15+
*/
16+
interface RequestFactory
17+
{
18+
/**
19+
* Creates a new PSR-7 request.
20+
*
21+
* @param string $method
22+
* @param string|UriInterface $uri
23+
* @param array $headers
24+
* @param resource|string|StreamInterface|null $body
25+
* @param string $protocolVersion
26+
*
27+
* @return RequestInterface
28+
*/
29+
public function createRequest(
30+
$method,
31+
$uri,
32+
array $headers = [],
33+
$body = null,
34+
$protocolVersion = '1.1'
35+
);
36+
}

0 commit comments

Comments
 (0)