Passed
Pull Request — master (#909)
by Songda
04:52 queued 02:52
created
src/Service/ContainerServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         }
40 40
 
41 41
         foreach ($this->detectApplication as $framework => $application) {
42
-            $method = $framework.'Application';
42
+            $method = $framework . 'Application';
43 43
 
44 44
             if (class_exists($application) && method_exists($this, $method) && $this->{$method}()) {
45 45
                 return;
Please login to merge, or discard this patch.
src/Plugin/Unipay/HtmlResponsePlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,9 +33,9 @@
 block discarded – undo
33 33
 
34 34
     protected function buildHtml(string $endpoint, Collection $payload): Response
35 35
     {
36
-        $sHtml = "<form id='pay_form' name='pay_form' action='".$endpoint."' method='POST'>";
36
+        $sHtml = "<form id='pay_form' name='pay_form' action='" . $endpoint . "' method='POST'>";
37 37
         foreach ($payload->all() as $key => $val) {
38
-            $sHtml .= "<input type='hidden' name='".$key."' value='".$val."'/>";
38
+            $sHtml .= "<input type='hidden' name='" . $key . "' value='" . $val . "'/>";
39 39
         }
40 40
         $sHtml .= "<input type='submit' value='ok' style='display:none;'></form>";
41 41
         $sHtml .= "<script>document.forms['pay_form'].submit();</script>";
Please login to merge, or discard this patch.
src/Plugin/Unipay/GeneralPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 
64 64
         $config = get_unipay_config($rocket->getParams());
65 65
 
66
-        return Unipay::URL[$config['mode'] ?? Pay::MODE_NORMAL].$url;
66
+        return Unipay::URL[$config['mode'] ?? Pay::MODE_NORMAL] . $url;
67 67
     }
68 68
 
69 69
     protected function getHeaders(): array
Please login to merge, or discard this patch.
src/Traits/GetUnipayCerts.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 
32 32
         $certs['cert_id'] = $ssl['serialNumber'] ?? '';
33 33
 
34
-        Pay::get(ConfigInterface::class)->set('unipay.'.$tenant.'.certs', $certs);
34
+        Pay::get(ConfigInterface::class)->set('unipay.' . $tenant . '.certs', $certs);
35 35
 
36 36
         return $certs['cert_id'];
37 37
     }
Please login to merge, or discard this patch.
src/Packer/XmlPacker.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@
 block discarded – undo
13 13
         $xml = '<xml>';
14 14
 
15 15
         foreach ($payload as $key => $val) {
16
-            $xml .= is_numeric($val) ? '<'.$key.'>'.$val.'</'.$key.'>' :
17
-                                       '<'.$key.'><![CDATA['.$val.']]></'.$key.'>';
16
+            $xml .= is_numeric($val) ? '<' . $key . '>' . $val . '</' . $key . '>' : '<' . $key . '><![CDATA[' . $val . ']]></' . $key . '>';
18 17
         }
19 18
 
20 19
         $xml .= '</xml>';
Please login to merge, or discard this patch.
src/Service/LoggerServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 
62 62
     protected function getDefaultHandler(): AbstractProcessingHandler
63 63
     {
64
-        $file = $this->config['file'] ?? (sys_get_temp_dir().'/logs/'.$this->config['identify'].'.log');
64
+        $file = $this->config['file'] ?? (sys_get_temp_dir() . '/logs/' . $this->config['identify'] . '.log');
65 65
 
66 66
         return match ($this->config['type']) {
67 67
             'single' => new StreamHandler($file, $this->config['level']),
Please login to merge, or discard this patch.
src/Event/CallbackReceived.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@
 block discarded – undo
13 13
 
14 14
     public ?array $params = null;
15 15
 
16
-    public null|array|ServerRequestInterface $contents;
16
+    public null | array | ServerRequestInterface $contents;
17 17
 
18
-    public function __construct(string $provider, null|array|ServerRequestInterface $contents, ?array $params = null, ?Rocket $rocket = null)
18
+    public function __construct(string $provider, null | array | ServerRequestInterface $contents, ?array $params = null, ?Rocket $rocket = null)
19 19
     {
20 20
         $this->provider = $provider;
21 21
         $this->contents = $contents;
Please login to merge, or discard this patch.
src/Plugin/Alipay/ResponseHtmlPlugin.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@  discard block
 block discarded – undo
23 23
         $radar = $rocket->getRadar();
24 24
 
25 25
         $response = 'GET' === $radar->getMethod() ?
26
-            $this->buildRedirect($radar->getUri()->__toString(), $rocket->getPayload()) :
27
-            $this->buildHtml($radar->getUri()->__toString(), $rocket->getPayload());
26
+            $this->buildRedirect($radar->getUri()->__toString(), $rocket->getPayload()) : $this->buildHtml($radar->getUri()->__toString(), $rocket->getPayload());
28 27
 
29 28
         $rocket->setDestination($response);
30 29
 
@@ -35,7 +34,7 @@  discard block
 block discarded – undo
35 34
 
36 35
     protected function buildRedirect(string $endpoint, Collection $payload): Response
37 36
     {
38
-        $url = $endpoint.(!str_contains($endpoint, '?') ? '?' : '&').$payload->query();
37
+        $url = $endpoint . (!str_contains($endpoint, '?') ? '?' : '&') . $payload->query();
39 38
 
40 39
         $content = sprintf(
41 40
             '<!DOCTYPE html>
@@ -58,10 +57,10 @@  discard block
 block discarded – undo
58 57
 
59 58
     protected function buildHtml(string $endpoint, Collection $payload): Response
60 59
     {
61
-        $sHtml = "<form id='alipay_submit' name='alipay_submit' action='".$endpoint."' method='POST'>";
60
+        $sHtml = "<form id='alipay_submit' name='alipay_submit' action='" . $endpoint . "' method='POST'>";
62 61
         foreach ($payload->all() as $key => $val) {
63 62
             $val = str_replace("'", '&apos;', $val);
64
-            $sHtml .= "<input type='hidden' name='".$key."' value='".$val."'/>";
63
+            $sHtml .= "<input type='hidden' name='" . $key . "' value='" . $val . "'/>";
65 64
         }
66 65
         $sHtml .= "<input type='submit' value='ok' style='display:none;'></form>";
67 66
         $sHtml .= "<script>document.forms['alipay_submit'].submit();</script>";
Please login to merge, or discard this patch.
src/Plugin/Alipay/ResponsePlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
         $destination = $rocket->getDestination();
25 25
         $payload = $rocket->getPayload();
26
-        $resultKey = str_replace('.', '_', $payload->get('method')).'_response';
26
+        $resultKey = str_replace('.', '_', $payload->get('method')) . '_response';
27 27
 
28 28
         if (should_do_http_request($rocket->getDirection()) && $destination instanceof Collection) {
29 29
             $rocket->setDestination(new Collection(array_merge(
Please login to merge, or discard this patch.