Completed
Push — main ( 6dedc5...e39b54 )
by
unknown
01:09
created

SimpleRequest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 3
1
<?php
2
3
namespace Addwiki\Mediawiki\Api\Client\Request;
4
5
use InvalidArgumentException;
6
7
class SimpleRequest extends FluentRequest implements Request {
0 ignored issues
show
Bug introduced by
There is at least one abstract method in this class. Maybe declare it as abstract, or implement the remaining methods: addParams, getHeaders, getParams, getPostRequestEncoding, setAction, setHeaders, setParam, setParams
Loading history...
8
9
	/**
10
	 * @param string $action The API action.
11
	 * @param array $params The parameters for the action.
12
	 * @param array $headers Any extra HTTP headers to send.
13
	 *
14
	 * @throws InvalidArgumentException
15
	 */
16
	public function __construct( string $action, array $params = [], array $headers = [] ) {
17
		$this->setAction( $action );
18
		$this->addParams( $params );
19
		$this->setHeaders( $headers );
20
	}
21
22
}
23