This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
11
{
12
const URL = '/answers/%s/accept';
13
14
/**
15
* The API URL.
16
*
17
* @var string
18
*/
19
private $url;
20
21
/**
22
* Array that contains StackExchange API params.
23
*
24
* @var array
25
*/
26
private $params;
27
28
/**
29
* Constructor.
30
*
31
* @param array|string $id The answer id. Also, it can be multiple ids separated by semicolon.
32
* @param array $params Array that contains StackExchange API params
33
*/
34
public function __construct($id, array $params = ['site' => 'stackoverflow'])
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.