Completed
Push — master ( 553b6e...36d08f )
by CodexShaper
49:40 queued 44:32
created
src/Commands/DatabaseBackup.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -78,13 +78,13 @@  discard block
 block discarded – undo
78 78
         switch ($data['driver']) {
79 79
             case 'mysql':
80 80
             case 'pgsql':
81
-                if (! empty($data['table'])) {
81
+                if (!empty($data['table'])) {
82 82
                     $dumper->setTables($data['table']);
83 83
                 }
84 84
                 break;
85 85
             case 'mongodb':
86 86
                 $dsn = config('dbm.backup.mongodb.dsn', '');
87
-                if (! empty($dsn) && method_exists($dumper, 'setUri')) {
87
+                if (!empty($dsn) && method_exists($dumper, 'setUri')) {
88 88
                     $dumper->setUri($dsn);
89 89
                 }
90 90
                 break;
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             $directoryPath = storage_path('app').$directory.DIRECTORY_SEPARATOR.$driver;
127 127
             $filePath = $directoryPath.DIRECTORY_SEPARATOR.$this->getFileName($table, $database);
128 128
   
129
-            if (! File::isDirectory($directoryPath)) {
129
+            if (!File::isDirectory($directoryPath)) {
130 130
                 File::makeDirectory($directoryPath, 0777, true, true);
131 131
             }
132 132
 
Please login to merge, or discard this patch.
src/Commands/DatabaseRestore.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
             switch ($driver) {
91 91
                 case 'mongodb':
92 92
                     $dsn = config('dbm.backup.mongodb.dsn', '');
93
-                    if (! empty($dsn)) {
93
+                    if (!empty($dsn)) {
94 94
                         $dumper->setUri($dsn);
95 95
                     }
96 96
                     break;
Please login to merge, or discard this patch.
src/Helpers/helpers.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,34 +1,34 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (! function_exists('dbm_asset')) {
3
+if (!function_exists('dbm_asset')) {
4 4
     function dbm_asset($path, $secure = null)
5 5
     {
6 6
         return route('dbm.asset').'?path='.urlencode($path);
7 7
     }
8 8
 }
9 9
 
10
-if (! function_exists('dbm_driver')) {
10
+if (!function_exists('dbm_driver')) {
11 11
     function dbm_driver()
12 12
     {
13 13
         return (config('database.default') != '') ? config('database.default') : 'mysql';
14 14
     }
15 15
 }
16 16
 
17
-if (! function_exists('dbm_prefix')) {
17
+if (!function_exists('dbm_prefix')) {
18 18
     function dbm_prefix()
19 19
     {
20 20
         return (config('dbm.prefix') != '') ? config('dbm.prefix') : '';
21 21
     }
22 22
 }
23 23
 
24
-if (! function_exists('is_json')) {
24
+if (!function_exists('is_json')) {
25 25
     function is_json($string)
26 26
     {
27 27
         return is_string($string) && is_array(json_decode($string, true)) && (json_last_error() == JSON_ERROR_NONE) ? true : false;
28 28
     }
29 29
 }
30 30
 
31
-if (! function_exists('save_json')) {
31
+if (!function_exists('save_json')) {
32 32
     function save_json(array $arr)
33 33
     {
34 34
         $jsonArr = [];
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     }
42 42
 }
43 43
 
44
-if (! function_exists('retreive_json')) {
44
+if (!function_exists('retreive_json')) {
45 45
     function retreive_json(string $str)
46 46
     {
47 47
         $jsonData = json_decode($str, true);
Please login to merge, or discard this patch.
src/ManagerServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     {
42 42
         $database = $this->app->config['database'];
43 43
         // Bind Dumper to backup and and restore
44
-        $this->app->bind(Dumper::class, function ($app) use ($database) {
44
+        $this->app->bind(Dumper::class, function($app) use ($database) {
45 45
             $connection = $database['default'];
46 46
             $options = [
47 47
                 'host' => $database['connections'][$connection]['host'] ?? '',
Please login to merge, or discard this patch.
src/Traits/MongoConnection.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function __construct()
21 21
     {
22
-        if (! self::$connection = DB::connection()->getMongoClient()) {
22
+        if (!self::$connection = DB::connection()->getMongoClient()) {
23 23
             $host = config('database.connections.mongodb.host');
24 24
             $port = config('database.connections.mongodb.port');
25 25
             $options = config('database.connections.mongodb.options');
26 26
             $auth_db = config('database.connections.mongodb.options.database') ? config('database.connections.mongodb.options.database') : null;
27 27
             $dsn = config('database.connections.mongodb.dsn');
28 28
 
29
-            if (! $dsn) {
29
+            if (!$dsn) {
30 30
                 $dsn = 'mongodb://'.$host.':'.$port.($auth_db ? '/'.$auth_db : '');
31 31
             }
32 32
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      */
44 44
     public function getMongoClient()
45 45
     {
46
-        if (! self::$connection) {
46
+        if (!self::$connection) {
47 47
             new self();
48 48
         }
49 49
 
Please login to merge, or discard this patch.
src/Traits/RecordTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
         if (count($values) > 1) {
52 52
             $value = $values;
53
-            if (! Driver::isMongoDB()) {
53
+            if (!Driver::isMongoDB()) {
54 54
                 $value = json_encode($values);
55 55
             }
56 56
         } elseif (count($values) == 1) {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         if (Driver::isMongoDB()) {
77 77
             $fieldType = $this->getFieldType($tableName, $column);
78 78
 
79
-            if (! in_array($fieldType, Type::getTypes())) {
79
+            if (!in_array($fieldType, Type::getTypes())) {
80 80
                 $this->generateError([$fieldType.' type not supported.']);
81 81
             }
82 82
 
Please login to merge, or discard this patch.
src/Manager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                     break;
68 68
             }
69 69
 
70
-            if (! $mimeType) {
70
+            if (!$mimeType) {
71 71
                 $mimeType = 'text/plain';
72 72
             }
73 73
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
             $path = app_path().DIRECTORY_SEPARATOR.$directory;
131 131
 
132
-            if (! File::isDirectory($path)) {
132
+            if (!File::isDirectory($path)) {
133 133
                 File::makeDirectory($path, 0777, true, true);
134 134
             }
135 135
 
Please login to merge, or discard this patch.
src/Http/Controllers/UserController.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
                     'password' => $request->data['password'],
38 38
                 ];
39 39
 
40
-                if (! Auth::attempt($credentials)) {
40
+                if (!Auth::attempt($credentials)) {
41 41
                     return $this->generateError(["Email and password combination doesn't match"]);
42 42
                 }
43 43
 
Please login to merge, or discard this patch.
src/Http/Controllers/DatabaseController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
         if ($collection) {
103 103
             $id = $collection->_id;
104
-            $fieldNames = (! empty($collection->fields)) ? $collection->fields->pluck('old_name')->toArray() : [];
104
+            $fieldNames = (!empty($collection->fields)) ? $collection->fields->pluck('old_name')->toArray() : [];
105 105
 
106 106
             foreach ($columns as $column) {
107 107
                 if (in_array($column['oldName'], $fieldNames)) {
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 
254 254
             $table = $request->table;
255 255
 
256
-            if (! is_array($table)) {
256
+            if (!is_array($table)) {
257 257
                 $table = json_decode($table, true);
258 258
             }
259 259
 
Please login to merge, or discard this patch.