Passed
Push — master ( 5bfe47...314d48 )
by Dmitry
01:58
created
src/Key.php 2 patches
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -4,60 +4,60 @@
 block discarded – undo
4 4
 
5 5
 class Key
6 6
 {
7
-    public function __construct() {}
8
-
9
-    /**
10
-     *      Get content of key file
11
-     *      @param string $fname
12
-     *      @param string $type
13
-     *      @return string
14
-     *      @throws Exception\Runtime
15
-     */
16
-    public function get($fname, $type)
17
-    {
7
+        public function __construct() {}
8
+
9
+        /**
10
+         *      Get content of key file
11
+         *      @param string $fname
12
+         *      @param string $type
13
+         *      @return string
14
+         *      @throws Exception\Runtime
15
+         */
16
+        public function get($fname, $type)
17
+        {
18 18
         try
19 19
         {
20
-            $this->check_exists($fname);
20
+                $this->check_exists($fname);
21 21
 
22
-            $key = $this->load($fname);
22
+                $key = $this->load($fname);
23 23
         }
24 24
         catch (\Exception $e)
25 25
         {
26
-            throw new Exception\Runtime('The file with the '.$type.' key was '.$e->getMessage().'!', -98);
26
+                throw new Exception\Runtime('The file with the '.$type.' key was '.$e->getMessage().'!', -98);
27 27
         }
28 28
 
29 29
         return $key;
30
-    }
31
-
32
-    /**
33
-     *      Check if exist key file
34
-     *
35
-     *      @param string $fname
36
-     *      @throws Exception\Runtime
37
-     */
38
-    protected function check_exists($fname)
39
-    {
30
+        }
31
+
32
+        /**
33
+         *      Check if exist key file
34
+         *
35
+         *      @param string $fname
36
+         *      @throws Exception\Runtime
37
+         */
38
+        protected function check_exists($fname)
39
+        {
40 40
         if ( ! file_exists($fname))
41 41
         {
42
-            throw new Exception\Runtime('not exists');
42
+                throw new Exception\Runtime('not exists');
43 43
         }
44
-    }
45
-
46
-    /**
47
-     *      Load key file
48
-     *
49
-     *      @param string $fname
50
-     *      @return string
51
-     *      @throws Exception\Runtime
52
-     */
53
-    protected function load($fname)
54
-    {
44
+        }
45
+
46
+        /**
47
+         *      Load key file
48
+         *
49
+         *      @param string $fname
50
+         *      @return string
51
+         *      @throws Exception\Runtime
52
+         */
53
+        protected function load($fname)
54
+        {
55 55
         $key = @file_get_contents($fname);
56 56
         if ($key === FALSE)
57 57
         {
58
-            throw new Exception\Runtime('not read');
58
+                throw new Exception\Runtime('not read');
59 59
         }
60 60
 
61 61
         return $key;
62
-    }
62
+        }
63 63
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@
 block discarded – undo
20 20
             $this->check_exists($fname);
21 21
 
22 22
             $key = $this->load($fname);
23
-        }
24
-        catch (\Exception $e)
23
+        } catch (\Exception $e)
25 24
         {
26 25
             throw new Exception\Runtime('The file with the '.$type.' key was '.$e->getMessage().'!', -98);
27 26
         }
Please login to merge, or discard this patch.
src/Provider31/Response.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -142,11 +142,11 @@
 block discarded – undo
142 142
                 }
143 143
                 try
144 144
                 {
145
-                    $pkeyid = (new Key())->get($options['ProviderPKey'], 'private');
145
+                        $pkeyid = (new Key())->get($options['ProviderPKey'], 'private');
146 146
                 }
147 147
                 catch (\Exception $e)
148 148
                 {
149
-                    return null;
149
+                        return null;
150 150
                 }
151 151
 
152 152
                 $pr_key = openssl_pkey_get_private($pkeyid);
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -114,7 +114,9 @@  discard block
 block discarded – undo
114 114
          */
115 115
         protected function sign($options)
116 116
         {
117
-                if (isset($this->Sign)) return;
117
+                if (isset($this->Sign)) {
118
+                        return;
119
+                }
118 120
 
119 121
                 if (isset($options['UseSign']) && ($options['UseSign'] === true))
120 122
                 {
@@ -143,8 +145,7 @@  discard block
 block discarded – undo
143 145
                 try
144 146
                 {
145 147
                     $pkeyid = (new Key())->get($options['ProviderPKey'], 'private');
146
-                }
147
-                catch (\Exception $e)
148
+                } catch (\Exception $e)
148 149
                 {
149 150
                     return null;
150 151
                 }
Please login to merge, or discard this patch.