Completed
Push — master ( ab345e...8b711d )
by CodexShaper
13:15
created
database/migrations/2019_11_24_123318_create_dbm_user_permissions_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('dbm_user_permissions', function (Blueprint $table) {
16
+        Schema::create('dbm_user_permissions', function(Blueprint $table) {
17 17
             $table->bigIncrements('id');
18 18
             $table->bigInteger('user_id');
19 19
             $table->bigInteger('dbm_permission_id');
Please login to merge, or discard this patch.
database/migrations/2019_08_22_221932_create_menus_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('menus', function (Blueprint $table) {
16
+        Schema::create('menus', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->string('name');
19 19
             $table->string('slug');
Please login to merge, or discard this patch.
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/InstallDatabaseManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
         // Seeding Dummy Data
104 104
         $class = 'DatabaseManagerSeeder';
105 105
         $file = $this->seedersPath.$class.'.php';
106
-        if (file_exists($file) && ! class_exists($class)) {
106
+        if (file_exists($file) && !class_exists($class)) {
107 107
             require_once $file;
108 108
         }
109 109
         with(new $class())->run();
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.
routes/api.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
     'prefix'     => 'database',
5 5
     'middleware' => 'auth:api',
6 6
     'namespace'  => config('dbm.controller_namespace'),
7
-], function () {
7
+], function() {
8 8
 
9 9
     // Helpers Route
10 10
     Route::get('assets', 'ManagerController@assets')->name('dbm.asset');
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     Route::put('/relationship', 'RelationController@update');
45 45
     Route::delete('/relationship', 'RelationController@delete');
46 46
     // Table
47
-    Route::group(['prefix' => 'table'], function () {
47
+    Route::group(['prefix' => 'table'], function() {
48 48
         Route::get('/details/{table}', 'RecordController@getTableDetails');
49 49
         Route::get('/columns/{table}', 'TableController@getTableColumns');
50 50
     });
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 Route::group([
58 58
     'prefix'    => 'database',
59 59
     'namespace' => config('dbm.controller_namespace'),
60
-], function () {
60
+], function() {
61 61
     // User
62 62
     Route::post('/login', 'UserController@login');
63 63
 
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.