Passed
Push — master ( 05e998...727464 )
by Dmitry
01:43
created
src/ErrorResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         {
43 43
             throw new FormatException('invalid json response!');
44 44
         }
45
-        $this->error_code = (isset($this->json['error']['code']))?$this->json['error']['code']:'undefined';
45
+        $this->error_code = (isset($this->json['error']['code'])) ? $this->json['error']['code'] : 'undefined';
46 46
     }
47 47
 
48 48
     /**
Please login to merge, or discard this patch.
src/Orders/Create/Request.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      *      @param string $value
38 38
      *      @return string
39 39
      */
40
-    public function sessionId($value=null)
40
+    public function sessionId($value = null)
41 41
     {
42 42
         if ($value !== null)
43 43
         {
Please login to merge, or discard this patch.
src/Orders/Cancel/Request.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      *      @param string $value
43 43
      *      @return string
44 44
      */
45
-    public function sessionId($value=null)
45
+    public function sessionId($value = null)
46 46
     {
47 47
         if ($value !== null)
48 48
         {
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      *      @param string $value
59 59
      *      @return string
60 60
      */
61
-    public function id($value=null)
61
+    public function id($value = null)
62 62
     {
63 63
         if ($value !== null)
64 64
         {
Please login to merge, or discard this patch.
src/Orders/Show/Request.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      *      @param string $value
38 38
      *      @return string
39 39
      */
40
-    public function id($value=null)
40
+    public function id($value = null)
41 41
     {
42 42
         if ($value !== null)
43 43
         {
Please login to merge, or discard this patch.
src/Exception/General.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@
 block discarded – undo
11 11
      *      @param string $message
12 12
      *      @param Throwable $previous
13 13
      */
14
-    public function __construct($message, \Exception $previous=null, $tracelog=false)
14
+    public function __construct($message, \Exception $previous = null, $tracelog = false)
15 15
     {
16
-        Log::instance()->error($message.(($tracelog)?PHP_EOL.$this->getTraceAsString():null));
16
+        Log::instance()->error($message.(($tracelog) ?PHP_EOL.$this->getTraceAsString() : null));
17 17
         $code = 0;
18 18
         parent::__construct($message, $code, $previous);
19 19
     }
Please login to merge, or discard this patch.
src/Sessions/Create/Request.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      *      @param string $value
43 43
      *      @return string
44 44
      */
45
-    public function clientId($value=null)
45
+    public function clientId($value = null)
46 46
     {
47 47
         if ($value !== null)
48 48
         {
Please login to merge, or discard this patch.
src/Callback.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
      */
81 81
     protected function get_http_raw_post_data()
82 82
     {
83
-        Log::instance()->add('callback request from ' . $_SERVER['REMOTE_ADDR']);
83
+        Log::instance()->add('callback request from '.$_SERVER['REMOTE_ADDR']);
84 84
 
85 85
         $raw_request = file_get_contents('php://input');
86 86
 
Please login to merge, or discard this patch.
src/Reports/Client/Request.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      *      @param string $value
38 38
      *      @return string
39 39
      */
40
-    public function sessionId($value=null)
40
+    public function sessionId($value = null)
41 41
     {
42 42
         if ($value !== null)
43 43
         {
Please login to merge, or discard this patch.
src/Request.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     /**
17 17
      *      @var Array
18 18
      */
19
-    protected $jwt=array(
19
+    protected $jwt = array(
20 20
         'using'         => false,
21 21
         'UAPAY_pubkey'  => '',
22 22
         'our_privkey'   => '',
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public function __construct($options)
36 36
     {
37 37
         // api_url
38
-        if ( ! isset($options['api_uri']))
38
+        if (!isset($options['api_uri']))
39 39
         {
40 40
             throw new Exception\Data('parameter api_uri is not specified');
41 41
         }
@@ -43,21 +43,21 @@  discard block
 block discarded – undo
43 43
         if (isset($options['jwt']))
44 44
         {
45 45
             // using
46
-            if ( ! isset($options['jwt']['using']))
46
+            if (!isset($options['jwt']['using']))
47 47
             {
48 48
                 throw new Exception\Data('parameter jwt/using is not specified');
49 49
             }
50
-            if ( ! is_bool($options['jwt']['using']))
50
+            if (!is_bool($options['jwt']['using']))
51 51
             {
52 52
                 throw new Exception\Data('parameter jwt/using is incorrect');
53 53
             }
54 54
             // using
55
-            if ( ! isset($options['jwt']['UAPAY_pubkey']))
55
+            if (!isset($options['jwt']['UAPAY_pubkey']))
56 56
             {
57 57
                 throw new Exception\Data('parameter jwt/UAPAY_pubkey is not specified');
58 58
             }
59 59
             // using
60
-            if ( ! isset($options['jwt']['our_privkey']))
60
+            if (!isset($options['jwt']['our_privkey']))
61 61
             {
62 62
                 throw new Exception\Data('parameter jwt/our_privkey is not specified');
63 63
             }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      *      @param array $value
79 79
      *      @return array
80 80
      */
81
-    public function data($value=null)
81
+    public function data($value = null)
82 82
     {
83 83
         if ($value !== null)
84 84
         {
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
      *      @param mixed $value
95 95
      *      @return string
96 96
      */
97
-    protected function as_string($value=null)
97
+    protected function as_string($value = null)
98 98
     {
99
-        return (is_scalar($value))?((is_bool($value))?(($value)?'true':'false'):"$value"):null;
99
+        return (is_scalar($value)) ? ((is_bool($value)) ? (($value) ? 'true' : 'false') : "$value") : null;
100 100
     }
101 101
 
102 102
     /**
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
      *      @param mixed $value
106 106
      *      @return integer
107 107
      */
108
-    protected function as_int($value=null)
108
+    protected function as_int($value = null)
109 109
     {
110
-        return (is_int($value))?$value:null;
110
+        return (is_int($value)) ? $value : null;
111 111
     }
112 112
 
113 113
     /**
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
      *      @param mixed $value
117 117
      *      @return array
118 118
      */
119
-    protected function as_array($value=null)
119
+    protected function as_array($value = null)
120 120
     {
121
-        return (is_array($value))?$value:null;
121
+        return (is_array($value)) ? $value : null;
122 122
     }
123 123
 
124 124
     /**
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             $payload['iat'] = $this->get_param_iat();
162 162
 
163 163
             // check private key file
164
-            if ( ! file_exists($this->jwt['our_privkey']))
164
+            if (!file_exists($this->jwt['our_privkey']))
165 165
             {
166 166
                 throw new Exception\Runtime('The file with the private key was not find!');
167 167
             }
Please login to merge, or discard this patch.