Passed
Push — main ( 676412...32f684 )
by Miaad
01:28
created
database/handler.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -62,13 +62,11 @@  discard block
 block discarded – undo
62 62
                     if ($db) {
63 63
                         self::$connect = $db;
64 64
                         print_r($db);
65
-                    }
66
-                    else {
65
+                    } else {
67 66
                         print self::$username;
68 67
                         throw new \exception('a problem to connecting');
69 68
                     }
70
-                }
71
-                else {
69
+                } else {
72 70
                     throw new \exception('required parameters not found');
73 71
                 }
74 72
             }
@@ -77,13 +75,11 @@  discard block
 block discarded – undo
77 75
                     self::$type = $settings['type'];
78 76
                     self::$dbname = $settings['dbname'];
79 77
                     (new database())->json_init();
80
-                }
81
-                else {
78
+                } else {
82 79
                     throw new \exception('parameter dbanme not found');
83 80
                 }
84 81
             }
85
-        }
86
-        else {
82
+        } else {
87 83
             throw new \exception('parameter type not found');
88 84
         }
89 85
     }
@@ -96,8 +92,7 @@  discard block
 block discarded – undo
96 92
             self::$password = $array['password'];
97 93
             self::$charset = $array['charset'] ?? 'utf8';
98 94
             return true;
99
-        }
100
-        else {
95
+        } else {
101 96
             return false;
102 97
         }
103 98
     }
Please login to merge, or discard this patch.