1 | <?php |
||
16 | class VoteChecker { |
||
17 | |||
18 | const HOST_API = 'https://topmcfrance.fr/api.php'; |
||
19 | |||
20 | /** |
||
21 | * Server Id |
||
22 | * @var integer |
||
23 | */ |
||
24 | protected $serverId; |
||
25 | |||
26 | 3 | public function __construct($serverId) { |
|
29 | |||
30 | /** |
||
31 | * Check if code is valid on TopMcFrance |
||
32 | * @param string $code |
||
33 | * @return boolean |
||
34 | * @throws type |
||
35 | */ |
||
36 | 3 | public function checkCode($code) { |
|
53 | |||
54 | /** |
||
55 | * Retrieve the URI access for checking code |
||
56 | * @param string $code |
||
57 | * @return string |
||
58 | */ |
||
59 | 3 | protected function buildURI($code) { |
|
62 | |||
63 | /** |
||
64 | * Return the response for TopMcFrance |
||
65 | * @param string $code |
||
66 | * @return string |
||
67 | */ |
||
68 | 3 | protected function getResponse($code) { |
|
77 | |||
78 | } |
||
79 |
As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.