@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | foreach ($seeds as $class) { |
| 21 | 21 | $file = $this->seedersPath.$class.'.php'; |
| 22 | - if (file_exists($file) && ! class_exists($class)) { |
|
| 22 | + if (file_exists($file) && !class_exists($class)) { |
|
| 23 | 23 | require_once $file; |
| 24 | 24 | } |
| 25 | 25 | with(new $class())->run(); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('menu_items', function (Blueprint $table) { |
|
| 16 | + Schema::create('menu_items', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->integer('menu_id'); |
| 19 | 19 | $table->string('title'); |
@@ -13,7 +13,7 @@ |
||
| 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'); |
@@ -13,7 +13,7 @@ |
||
| 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'); |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | $indexType = $indexDetails['type']; |
| 83 | 83 | $options = $indexDetails['options']; |
| 84 | 84 | |
| 85 | - $options['name'] = strtolower($collection->getCollectionName() . '_' . $column . '_' . $type); |
|
| 85 | + $options['name'] = strtolower($collection->getCollectionName().'_'.$column.'_'.$type); |
|
| 86 | 86 | |
| 87 | 87 | $options['ns'] = $collection->getNamespace(); |
| 88 | 88 | |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | $columnNames[] = $columnName; |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | - if ($id != '' && ! in_array($newField, $columnNames)) { |
|
| 237 | + if ($id != '' && !in_array($newField, $columnNames)) { |
|
| 238 | 238 | $update['$set'] = [$newField => '']; |
| 239 | 239 | $collection->updateOne( |
| 240 | 240 | ['_id' => new \MongoDB\BSON\ObjectID($id)], |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | $unsets = []; |
| 264 | 264 | |
| 265 | 265 | foreach ($columns as $column) { |
| 266 | - if (! in_array($column, $newFields)) { |
|
| 266 | + if (!in_array($column, $newFields)) { |
|
| 267 | 267 | $unsets[$column] = ''; |
| 268 | 268 | } |
| 269 | 269 | |
@@ -54,13 +54,13 @@ |
||
| 54 | 54 | */ |
| 55 | 55 | protected static function getCustomTypes($platformName) |
| 56 | 56 | { |
| 57 | - $customPlatformDir = __DIR__ . DIRECTORY_SEPARATOR . $platformName . DIRECTORY_SEPARATOR; |
|
| 57 | + $customPlatformDir = __DIR__.DIRECTORY_SEPARATOR.$platformName.DIRECTORY_SEPARATOR; |
|
| 58 | 58 | |
| 59 | 59 | $customTypes = []; |
| 60 | 60 | |
| 61 | - foreach (glob($customPlatformDir . '*.php') as $file) { |
|
| 61 | + foreach (glob($customPlatformDir.'*.php') as $file) { |
|
| 62 | 62 | $className = basename($file, ".php"); |
| 63 | - $customTypes[] = __NAMESPACE__ . '\\' . $platformName . '\\' . $className; |
|
| 63 | + $customTypes[] = __NAMESPACE__.'\\'.$platformName.'\\'.$className; |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | return $customTypes; |
@@ -151,11 +151,11 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | Type::registerCustomTypes(); |
| 153 | 153 | |
| 154 | - $conn = 'database.connections.' . config('database.default'); |
|
| 154 | + $conn = 'database.connections.'.config('database.default'); |
|
| 155 | 155 | |
| 156 | - $table['options']['collate'] = $table['options']['collation'] ?? config($conn . '.collation', 'utf8mb4_unicode_ci'); |
|
| 156 | + $table['options']['collate'] = $table['options']['collation'] ?? config($conn.'.collation', 'utf8mb4_unicode_ci'); |
|
| 157 | 157 | if (Driver::isMysql()) { |
| 158 | - $table['options']['charset'] = $table['options']['charset'] ?? config($conn . '.charset', 'utf8mb4'); |
|
| 158 | + $table['options']['charset'] = $table['options']['charset'] ?? config($conn.'.charset', 'utf8mb4'); |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | $tableName = $table['name']; |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | $items = static::all(); |
| 280 | 280 | $collection = $items instanceof Collection ? $items : Collection::make($items); |
| 281 | 281 | if (!empty($query)) { |
| 282 | - $collection = $collection->filter(function ($value, $key) use ($query) { |
|
| 282 | + $collection = $collection->filter(function($value, $key) use ($query) { |
|
| 283 | 283 | return false !== stristr($value, $query); |
| 284 | 284 | }); |
| 285 | 285 | } |
@@ -56,9 +56,9 @@ |
||
| 56 | 56 | */ |
| 57 | 57 | public static function createName($columns, $type, $table = null) |
| 58 | 58 | { |
| 59 | - $table = isset($table) ? trim($table) . '_' : ''; |
|
| 59 | + $table = isset($table) ? trim($table).'_' : ''; |
|
| 60 | 60 | $type = trim($type); |
| 61 | - $name = strtolower($table . implode('_', $columns) . '_' . $type); |
|
| 61 | + $name = strtolower($table.implode('_', $columns).'_'.$type); |
|
| 62 | 62 | |
| 63 | 63 | return str_replace(['-', '.'], '_', $name); |
| 64 | 64 | } |