@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | $this->table = $this->config['table']; |
28 | 28 | |
29 | - if(!isset($this->config['adapter'])) |
|
29 | + if (!isset($this->config['adapter'])) |
|
30 | 30 | $this->config['adapter'] = 'Default'; |
31 | 31 | |
32 | 32 | $adapterPool = new AdapterPool(); |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | { |
40 | 40 | $platform = $this->adapter->getPlatform()->getName(); |
41 | 41 | |
42 | - if(isset($this->config['schema']) && $platform == 'MySQL'){ |
|
43 | - $sql = 'USE ' . $this->config['schema'] . ';'; |
|
42 | + if (isset($this->config['schema']) && $platform == 'MySQL') { |
|
43 | + $sql = 'USE '.$this->config['schema'].';'; |
|
44 | 44 | $this->adapter->getDriver()->getConnection()->execute($sql); |
45 | 45 | } |
46 | 46 | } |
@@ -21,13 +21,15 @@ |
||
21 | 21 | { |
22 | 22 | $this->config = Reader::getConfig($object); |
23 | 23 | |
24 | - if (!array_key_exists('table', $this->config)) |
|
25 | - throw new NoTableFoundException(); |
|
24 | + if (!array_key_exists('table', $this->config)) { |
|
25 | + throw new NoTableFoundException(); |
|
26 | + } |
|
26 | 27 | |
27 | 28 | $this->table = $this->config['table']; |
28 | 29 | |
29 | - if(!isset($this->config['adapter'])) |
|
30 | - $this->config['adapter'] = 'Default'; |
|
30 | + if(!isset($this->config['adapter'])) { |
|
31 | + $this->config['adapter'] = 'Default'; |
|
32 | + } |
|
31 | 33 | |
32 | 34 | $adapterPool = new AdapterPool(); |
33 | 35 | $this->adapter = $adapterPool->get($this->config['adapter']); |