1 | <?php declare(strict_types=1); |
||
10 | class Search extends BaseRequest |
||
11 | { |
||
12 | const METHOD = 'GET'; |
||
|
|||
13 | const ENDPOINT = '/search/tweets.json'; |
||
14 | |||
15 | private $resultTypes = ['mixed', 'recent', 'popular']; |
||
16 | |||
17 | public function __construct(string $searchString) |
||
23 | |||
24 | //use string instead of float |
||
25 | public function setGeocode(string $latitude, string $longitude, string $radius): Search |
||
31 | |||
32 | public function setLanguage(string $language = 'en'): Search |
||
38 | |||
39 | public function setlocale(): Search |
||
45 | |||
46 | public function setResultType(string $resultType): Search |
||
54 | |||
55 | public function amount(int $amount): Search |
||
61 | |||
62 | public function until(\DateTime $until): Search |
||
68 | |||
69 | public function minimumId(int $id): Search |
||
75 | |||
76 | public function maximumId(int $id): Search |
||
82 | |||
83 | public function excludeEntities(): Search |
||
89 | } |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.