@@ -140,7 +140,7 @@ |
||
140 | 140 | continue; |
141 | 141 | } |
142 | 142 | |
143 | - $this->getLogger()->info("Elapsed " . (time()-$startTime) . " second(s)."); |
|
143 | + $this->getLogger()->info("Elapsed ".(time() - $startTime)." second(s)."); |
|
144 | 144 | |
145 | 145 | return $result; |
146 | 146 | } |
@@ -14,6 +14,6 @@ |
||
14 | 14 | } |
15 | 15 | |
16 | 16 | |
17 | -$captchaText = (new Anticaptcha(getenv('__ANTICAPTCHA_KEY__')))->recognizeFile(__DIR__ . '/data/captcha.png'); |
|
17 | +$captchaText = (new Anticaptcha(getenv('__ANTICAPTCHA_KEY__')))->recognizeFile(__DIR__.'/data/captcha.png'); |
|
18 | 18 | |
19 | 19 | var_dump($captchaText); |
@@ -2,6 +2,6 @@ |
||
2 | 2 | |
3 | 3 | require '../vendor/autoload.php'; |
4 | 4 | |
5 | -$captchaText = (new Rucaptcha\Client(getenv('__RUCAPTCHA_KEY__')))->recognizeFile(__DIR__ . '/data/captcha.png'); |
|
5 | +$captchaText = (new Rucaptcha\Client(getenv('__RUCAPTCHA_KEY__')))->recognizeFile(__DIR__.'/data/captcha.png'); |
|
6 | 6 | |
7 | 7 | var_dump($captchaText); |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | public function setOptions(array $options, $ignoreMissingOptions = false) |
13 | 13 | { |
14 | 14 | foreach ($options as $option => $value) { |
15 | - $setter = 'set' . ucfirst($option); |
|
15 | + $setter = 'set'.ucfirst($option); |
|
16 | 16 | |
17 | 17 | if (method_exists($this, $setter)) { |
18 | 18 | $this->$setter($value); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | if (!$ignoreMissingOptions) { |
28 | - throw new InvalidArgumentException("Property `{$option}` not found in class `" . __CLASS__ . "`."); |
|
28 | + throw new InvalidArgumentException("Property `{$option}` not found in class `".__CLASS__."`."); |
|
29 | 29 | } |
30 | 30 | } |
31 | 31 | } |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | $client = new Rucaptcha\Client(getenv('__RUCAPTCHA_KEY__')); |
6 | 6 | |
7 | -$pingbackUrl = 'http://' . getenv('__HOST__') .'/captcha/pingback.php'; |
|
7 | +$pingbackUrl = 'http://'.getenv('__HOST__').'/captcha/pingback.php'; |
|
8 | 8 | |
9 | 9 | // Add pingback url to allowed list |
10 | 10 | $client->addPingback($pingbackUrl); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | { |
31 | 31 | $mock = $this->buildConfigurableClass(); |
32 | 32 | $mock->setOptions(['withSetterProperty' => 2]); |
33 | - $this->assertEquals($mock->withSetterProperty, 3); // Setter logic: 2 + 1 |
|
33 | + $this->assertEquals($mock->withSetterProperty, 3); // Setter logic: 2 + 1 |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | public function testInitPublicProperty() |
@@ -60,7 +60,7 @@ |
||
60 | 60 | |
61 | 61 | $serverResponse = $client->getCaptchaResult(''); |
62 | 62 | |
63 | - if($response==='CAPCHA_NOT_READY') { |
|
63 | + if ($response === 'CAPCHA_NOT_READY') { |
|
64 | 64 | $this->assertFalse($serverResponse); |
65 | 65 | } else { |
66 | 66 | $this->assertEquals('1234567890', $serverResponse); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function getCaptchaResultBulk(array $captchaIds) |
57 | 57 | { |
58 | - $response = $this->getHttpClient()->request('GET', '/res.php?' . http_build_query([ |
|
58 | + $response = $this->getHttpClient()->request('GET', '/res.php?'.http_build_query([ |
|
59 | 59 | 'key' => $this->apiKey, |
60 | 60 | 'action' => 'get', |
61 | 61 | 'ids' => join(',', $captchaIds) |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | continue; |
326 | 326 | } |
327 | 327 | |
328 | - $this->getLogger()->info("Elapsed " . (time()-$startTime) . " second(s)."); |
|
328 | + $this->getLogger()->info("Elapsed ".(time() - $startTime)." second(s)."); |
|
329 | 329 | |
330 | 330 | return $result; |
331 | 331 | } |
@@ -14,6 +14,6 @@ |
||
14 | 14 | */ |
15 | 15 | public function log($level, $message, array $context = []) |
16 | 16 | { |
17 | - echo date("d/m/y H:i:s", time()) . ' [' . $level . '] ' . $message . PHP_EOL; |
|
17 | + echo date("d/m/y H:i:s", time()).' ['.$level.'] '.$message.PHP_EOL; |
|
18 | 18 | } |
19 | 19 | } |