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.

MethodNotSupported::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the ICanBoogie package.
5
 *
6
 * (c) Olivier Laviale <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace ICanBoogie\HTTP;
13
14
use ICanBoogie\Accessor\AccessorTrait;
15
16
/**
17
 * Exception thrown when the HTTP method is not supported.
18
 *
19
 * @property-read string $method The unsupported HTTP method.
20
 */
21
class MethodNotSupported extends ClientError implements Exception
22
{
23
	use AccessorTrait;
24
25
	/**
26
	 * @var string
27
	 */
28
	private $method;
29
30
	/**
31
	 * @return string
32
	 */
33
	protected function get_method()
34
	{
35
		return $this->method;
36
	}
37
38
	/**
39
	 * @param string $method The unsupported HTTP method.
40
	 * @param int $code
41
	 * @param \Exception $previous
42
	 */
43
	public function __construct($method, $code = Status::INTERNAL_SERVER_ERROR, \Exception $previous = null)
44
	{
45
		$this->method = $method;
46
47
		parent::__construct(\ICanboogie\format('Method not supported: %method', [ 'method' => $method ]), $code, $previous);
48
	}
49
}
50