GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Psr7Trait::createServerRequest()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Lookyman\NetteOAuth2Server\UI;
5
6
use Lookyman\NetteOAuth2Server\Psr7\Response;
7
use Lookyman\NetteOAuth2Server\Psr7\ApplicationPsr7ResponseInterface;
8
use Psr\Http\Message\ServerRequestInterface;
9
use Psr\Http\Message\StreamInterface;
10
use Zend\Diactoros\ServerRequestFactory;
11
use Zend\Diactoros\Stream;
12
13
trait Psr7Trait
14
{
15
	/**
16
	 * @return ServerRequestInterface
17
	 * @throws \InvalidArgumentException
18
	 */
19
	protected function createServerRequest(): ServerRequestInterface
20
	{
21
		return ServerRequestFactory::fromGlobals();
22
	}
23
24
	/**
25
	 * @return ApplicationPsr7ResponseInterface
26
	 */
27
	protected function createResponse(): ApplicationPsr7ResponseInterface
28
	{
29
		return new Response();
30
	}
31
32
	/**
33
	 * @return StreamInterface
34
	 */
35
	protected function createStream(): StreamInterface
36
	{
37
		return new Stream('php://temp', 'r+');
38
	}
39
}
40