Completed
Push — master ( d4631d...f6d8b1 )
by Dmitry
05:56
created
src/GenericClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
examples/simple.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,6 +2,6 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/ConfigurableTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
examples/pingback.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
test/ConfigurableTraitTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
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()
Please login to merge, or discard this patch.
test/GenericClientTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Logger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,6 +14,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
examples/generic_client.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,6 +13,6 @@
 block discarded – undo
13 13
     protected $serverBaseUri = 'http://anti-captcha.com';
14 14
 }
15 15
 
16
-$captchaText = (new Anticaptcha(getenv('__ANTICAPTCHA_KEY__')))->recognizeFile(__DIR__ . '/data/captcha.png');
16
+$captchaText = (new Anticaptcha(getenv('__ANTICAPTCHA_KEY__')))->recognizeFile(__DIR__.'/data/captcha.png');
17 17
 
18 18
 var_dump($captchaText);
Please login to merge, or discard this patch.
src/Client.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
     /**
158 158
      * Reports rucaptcha for good recognition.
159 159
      *
160
-     * @param $captchaId
160
+     * @param string $captchaId
161 161
      * @return bool
162 162
      * @throws ErrorResponseException
163 163
      * @throws GuzzleException
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function getCaptchaResultBulk(array $captchaIds)
65 65
     {
66
-        $response = $this->getHttpClient()->request('GET', '/res.php?' . http_build_query([
66
+        $response = $this->getHttpClient()->request('GET', '/res.php?'.http_build_query([
67 67
                 'key' => $this->apiKey,
68 68
                 'action' => 'get',
69 69
                 'ids' => join(',', $captchaIds)
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
                 continue;
430 430
             }
431 431
 
432
-            $this->getLogger()->info("Elapsed " . (time()-$startTime) . " second(s).");
432
+            $this->getLogger()->info("Elapsed ".(time() - $startTime)." second(s).");
433 433
 
434 434
             return $result;
435 435
         }
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
                 continue;
514 514
             }
515 515
 
516
-            $this->getLogger()->info("Elapsed " . (time()-$startTime) . " second(s).");
516
+            $this->getLogger()->info("Elapsed ".(time() - $startTime)." second(s).");
517 517
 
518 518
             return $result;
519 519
         }
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
                 continue;
616 616
             }
617 617
 
618
-            $this->getLogger()->info("Elapsed " . (time()-$startTime) . " second(s).");
618
+            $this->getLogger()->info("Elapsed ".(time() - $startTime)." second(s).");
619 619
 
620 620
             return $result;
621 621
         }
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
 
643 643
         if (JSON_ERROR_NONE !== json_last_error()) {
644 644
             throw new InvalidArgumentException(
645
-                'json_decode error: ' . json_last_error_msg()
645
+                'json_decode error: '.json_last_error_msg()
646 646
             );
647 647
         }
648 648
 
Please login to merge, or discard this patch.