@@ -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 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function getCaptchaResultBulk(array $captchaIds) |
| 47 | 47 | { |
| 48 | - $response = $this->getHttpClient()->request('GET', '/res.php?' . http_build_query([ |
|
| 48 | + $response = $this->getHttpClient()->request('GET', '/res.php?'.http_build_query([ |
|
| 49 | 49 | 'key' => $this->apiKey, |
| 50 | 50 | 'action' => 'get', |
| 51 | 51 | 'ids' => join(',', $captchaIds) |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | if ($response->getBody()->__toString() === self::STATUS_OK_REPORT_RECORDED) { |
| 89 | 89 | return true; |
| 90 | 90 | } |
| 91 | - throw new RuntimeException('Report sending trouble: ' . $response->getBody() . '.'); |
|
| 91 | + throw new RuntimeException('Report sending trouble: '.$response->getBody().'.'); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
@@ -104,8 +104,8 @@ discard block |
||
| 104 | 104 | foreach ($paramsList as $item) { |
| 105 | 105 | // Fast parse tags |
| 106 | 106 | $value = substr($responseText, |
| 107 | - strpos($responseText, '<' . $item . '>') + mb_strlen('<' . $item . '>'), |
|
| 108 | - strpos($responseText, '</' . $item . '>') - strpos($responseText, '<' . $item . '>') - mb_strlen('<' . $item . '>') |
|
| 107 | + strpos($responseText, '<'.$item.'>') + mb_strlen('<'.$item.'>'), |
|
| 108 | + strpos($responseText, '</'.$item.'>') - strpos($responseText, '<'.$item.'>') - mb_strlen('<'.$item.'>') |
|
| 109 | 109 | ); |
| 110 | 110 | |
| 111 | 111 | if ($value !== false) { |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | public function log($level, $message, array $context = []) |
| 22 | 22 | { |
| 23 | 23 | if ($this->verbose) { |
| 24 | - echo date("d/m/y H:i:s", time()) . ' [' . $level . '] ' . $message . PHP_EOL; |
|
| 24 | + echo date("d/m/y H:i:s", time()).' ['.$level.'] '.$message.PHP_EOL; |
|
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | \ No newline at end of file |
@@ -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); |
| 8 | 8 | \ No newline at end of file |