@@ -228,7 +228,7 @@ |
||
228 | 228 | |
229 | 229 | if (!empty($query) && !empty($searchColumn)) { |
230 | 230 | $records = DBM::model($model, $tableName) |
231 | - ->where($searchColumn, 'LIKE', '%' . $query . '%') |
|
231 | + ->where($searchColumn, 'LIKE', '%'.$query.'%') |
|
232 | 232 | ->paginate($perPage); |
233 | 233 | } |
234 | 234 |
@@ -66,7 +66,7 @@ |
||
66 | 66 | $indexType = $indexDetails['type']; |
67 | 67 | $options = $indexDetails['options']; |
68 | 68 | |
69 | - $options['name'] = strtolower($collection->getCollectionName() . "_" . $column . "_" . $type); |
|
69 | + $options['name'] = strtolower($collection->getCollectionName()."_".$column."_".$type); |
|
70 | 70 | |
71 | 71 | $options['ns'] = $collection->getNamespace(); |
72 | 72 |
@@ -39,8 +39,8 @@ |
||
39 | 39 | */ |
40 | 40 | protected function findComposer() |
41 | 41 | { |
42 | - if (file_exists(getcwd() . '/composer.phar')) { |
|
43 | - return '"' . PHP_BINARY . '" ' . getcwd() . '/composer.phar'; |
|
42 | + if (file_exists(getcwd().'/composer.phar')) { |
|
43 | + return '"'.PHP_BINARY.'" '.getcwd().'/composer.phar'; |
|
44 | 44 | } |
45 | 45 | return 'composer'; |
46 | 46 | } |
@@ -21,6 +21,6 @@ |
||
21 | 21 | |
22 | 22 | $type = $fieldDeclaration['autoincrement'] ? 'smallserial' : 'smallint'; |
23 | 23 | |
24 | - return $type . $commonIntegerTypeDeclaration; |
|
24 | + return $type.$commonIntegerTypeDeclaration; |
|
25 | 25 | } |
26 | 26 | } |
@@ -24,10 +24,10 @@ |
||
24 | 24 | $pdo = DB::connection()->getPdo(); |
25 | 25 | |
26 | 26 | // trim the values |
27 | - $fieldDeclaration['allowed'] = array_map(function ($value) use ($pdo) { |
|
27 | + $fieldDeclaration['allowed'] = array_map(function($value) use ($pdo) { |
|
28 | 28 | return $pdo->quote(trim($value)); |
29 | 29 | }, $allowed); |
30 | 30 | |
31 | - return 'set(' . implode(', ', $fieldDeclaration['allowed']) . ')'; |
|
31 | + return 'set('.implode(', ', $fieldDeclaration['allowed']).')'; |
|
32 | 32 | } |
33 | 33 | } |
@@ -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; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function getNamespace($databaseName, $collectionName) |
73 | 73 | { |
74 | - return $databaseName . '.' . $collectionName; |
|
74 | + return $databaseName.'.'.$collectionName; |
|
75 | 75 | } |
76 | 76 | /** |
77 | 77 | * Get the all collections. |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $oldName = $collection['oldName']; |
153 | 153 | $collectionName = $oldName; |
154 | 154 | $connection = config('database.default'); |
155 | - $database = config('database.connections.' . $connection . ".database"); |
|
155 | + $database = config('database.connections.'.$connection.".database"); |
|
156 | 156 | $fromNs = $this->getNamespace($database, $oldName); |
157 | 157 | $toNs = $this->getNamespace($database, $newName); |
158 | 158 |
@@ -151,10 +151,10 @@ 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'] = config($conn . '.collation', 'utf8mb4_unicode_ci'); |
|
157 | - $table['options']['charset'] = config($conn . '.charset', 'utf8mb4'); |
|
156 | + $table['options']['collate'] = config($conn.'.collation', 'utf8mb4_unicode_ci'); |
|
157 | + $table['options']['charset'] = config($conn.'.charset', 'utf8mb4'); |
|
158 | 158 | |
159 | 159 | $tableName = $table['name']; |
160 | 160 | $columns = $table['columns']; |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | $items = static::all(); |
278 | 278 | $collection = $items instanceof Collection ? $items : Collection::make($items); |
279 | 279 | if (!empty($query)) { |
280 | - $collection = $collection->filter(function ($value, $key) use ($query) { |
|
280 | + $collection = $collection->filter(function($value, $key) use ($query) { |
|
281 | 281 | return false !== stristr($value, $query); |
282 | 282 | }); |
283 | 283 | } |
@@ -68,9 +68,9 @@ |
||
68 | 68 | */ |
69 | 69 | public static function createName($columns, $type, $table = null) |
70 | 70 | { |
71 | - $table = isset($table) ? trim($table) . '_' : ''; |
|
71 | + $table = isset($table) ? trim($table).'_' : ''; |
|
72 | 72 | $type = trim($type); |
73 | - $name = strtolower($table . implode('_', $columns) . '_' . $type); |
|
73 | + $name = strtolower($table.implode('_', $columns).'_'.$type); |
|
74 | 74 | |
75 | 75 | return str_replace(['-', '.'], '_', $name); |
76 | 76 | } |