Skip to content

Commit dd6771f

Browse files
author
Maxime Rault
committed
Fix for Lumen
1 parent ebf2348 commit dd6771f

File tree

4 files changed

+7
-14
lines changed

4 files changed

+7
-14
lines changed

src/Connectors/ODBCZOSConnector.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ protected function getDsn(array $config)
2424
'Protocol=TCPIP',
2525
'Uid=%s',
2626
'Pwd=%s',
27-
'',
28-
// Just to add a semicolon to the end of string
27+
'', // Just to add a semicolon to the end of string
2928
];
3029

3130
$dsnConfig = [

src/DB2Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ protected function getDefaultQueryGrammar()
101101
*/
102102
protected function getDefaultSchemaGrammar()
103103
{
104-
return $this->withTablePrefix(new SchemaGrammar($this->config['driver'] == "odbc"?"i":"c"));
104+
return $this->withTablePrefix(new SchemaGrammar($this->config['driver'] == 'odbc' ? 'i' : 'c'));
105105
}
106106

107107
/**
@@ -115,6 +115,6 @@ protected function getDefaultPostProcessor()
115115
return new DB2ZOSProcessor();
116116
}
117117

118-
return new DB2Processor($this->config['driver'] == "odbc"?"i":"c");
118+
return new DB2Processor($this->config['driver'] == 'odbc' ? 'i' : 'c');
119119
}
120120
}

src/DB2ServiceProvider.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use Cooperl\Database\DB2\Connectors\IBMConnector;
77
use Cooperl\Database\DB2\Connectors\ODBCZOSConnector;
88
use Illuminate\Support\ServiceProvider;
9-
use Config;
109

1110
/**
1211
* Class DB2ServiceProvider
@@ -39,18 +38,13 @@ public function boot()
3938
public function register()
4039
{
4140
// get the configs
42-
$conns = is_array(Config::get('laravel-db2::database.connections'))
43-
? Config::get('laravel-db2::database.connections')
44-
: [];
41+
$conns = is_array(config('laravel-db2::database.connections')) ? config('laravel-db2::database.connections') : [];
4542

4643
// Add my database configurations to the default set of configurations
47-
$this->app['config']['database.connections'] = array_merge(
48-
$conns,
49-
$this->app['config']['database.connections']
50-
);
44+
config(['database.connections' => array_merge($conns, config('database.connections'))]);
5145

5246
// Extend the connections with pdo_odbc and pdo_ibm drivers
53-
foreach (Config::get('database.connections') as $conn => $config) {
47+
foreach (config('database.connections') as $conn => $config) {
5448
// Only use configurations that feature a "odbc", "ibm" or "odbczos" driver
5549
if (!isset($config['driver']) || !in_array($config['driver'], ['odbc', 'ibm', 'odbczos', 'odbcexpress'])) {
5650
continue;

src/Schema/Blueprint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function label($label)
6262
*
6363
* @return \Illuminate\Support\Fluent
6464
*/
65-
protected function indexCommand($type, $columns, $index, $algorithm = NULL)
65+
protected function indexCommand($type, $columns, $index, $algorithm = null)
6666
{
6767
$columns = (array) $columns;
6868

0 commit comments

Comments
 (0)