@@ -24,7 +24,6 @@ |
||
| 24 | 24 | use League\CLImate\Util\UtilFactory; |
| 25 | 25 | |
| 26 | 26 | // From 'charcoal-core' |
| 27 | -use Charcoal\Source\DatabaseSource; |
|
| 28 | 27 | use Charcoal\Model\ServiceProvider\ModelServiceProvider; |
| 29 | 28 | |
| 30 | 29 | // From 'charcoal-user' |
@@ -82,11 +82,11 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | public function registerBaseUrl(Container $container) |
| 84 | 84 | { |
| 85 | - $container['base-url'] = function () { |
|
| 85 | + $container['base-url'] = function() { |
|
| 86 | 86 | return Uri::createFromString(''); |
| 87 | 87 | }; |
| 88 | 88 | |
| 89 | - $container['admin/base-url'] = function () { |
|
| 89 | + $container['admin/base-url'] = function() { |
|
| 90 | 90 | return Uri::createFromString('admin'); |
| 91 | 91 | }; |
| 92 | 92 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | public function registerConfig(Container $container) |
| 101 | 101 | { |
| 102 | - $container['config'] = function () { |
|
| 102 | + $container['config'] = function() { |
|
| 103 | 103 | return new AppConfig([ |
| 104 | 104 | 'base_path' => realpath(__DIR__.'/../../..'), |
| 105 | 105 | 'apis' => [ |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | { |
| 150 | 150 | $this->registerConfig($container); |
| 151 | 151 | |
| 152 | - $container['admin/config'] = function () { |
|
| 152 | + $container['admin/config'] = function() { |
|
| 153 | 153 | return new AdminConfig(); |
| 154 | 154 | }; |
| 155 | 155 | } |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | */ |
| 161 | 161 | public function registerClimate(Container $container) |
| 162 | 162 | { |
| 163 | - $container['climate/system'] = function () { |
|
| 163 | + $container['climate/system'] = function() { |
|
| 164 | 164 | $system = Mockery::mock(Linux::class); |
| 165 | 165 | $system->shouldReceive('hasAnsiSupport')->andReturn(true); |
| 166 | 166 | $system->shouldReceive('width')->andReturn(80); |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | return $system; |
| 169 | 169 | }; |
| 170 | 170 | |
| 171 | - $container['climate/output'] = function () { |
|
| 171 | + $container['climate/output'] = function() { |
|
| 172 | 172 | $output = Mockery::mock(Output::class); |
| 173 | 173 | $output->shouldReceive('persist')->andReturn($output); |
| 174 | 174 | $output->shouldReceive('sameLine')->andReturn($output); |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | return $output; |
| 178 | 178 | }; |
| 179 | 179 | |
| 180 | - $container['climate/reader'] = function () { |
|
| 180 | + $container['climate/reader'] = function() { |
|
| 181 | 181 | $reader = Mockery::mock(Stdin::class); |
| 182 | 182 | $reader->shouldReceive('line')->andReturn('line'); |
| 183 | 183 | $reader->shouldReceive('char')->andReturn('char'); |
@@ -185,11 +185,11 @@ discard block |
||
| 185 | 185 | return $reader; |
| 186 | 186 | }; |
| 187 | 187 | |
| 188 | - $container['climate/util'] = function (Container $container) { |
|
| 188 | + $container['climate/util'] = function(Container $container) { |
|
| 189 | 189 | return new UtilFactory($container['climate/system']); |
| 190 | 190 | }; |
| 191 | 191 | |
| 192 | - $container['climate'] = function (Container $container) { |
|
| 192 | + $container['climate'] = function(Container $container) { |
|
| 193 | 193 | $climate = new CLImate(); |
| 194 | 194 | |
| 195 | 195 | $climate->setOutput($container['climate/output']); |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | */ |
| 207 | 207 | public function registerDatabase(Container $container) |
| 208 | 208 | { |
| 209 | - $container['database'] = function () { |
|
| 209 | + $container['database'] = function() { |
|
| 210 | 210 | $pdo = new PDO('sqlite::memory:'); |
| 211 | 211 | $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
| 212 | 212 | return $pdo; |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | */ |
| 295 | 295 | public function registerLogger(Container $container) |
| 296 | 296 | { |
| 297 | - $container['logger'] = function () { |
|
| 297 | + $container['logger'] = function() { |
|
| 298 | 298 | return new NullLogger(); |
| 299 | 299 | }; |
| 300 | 300 | } |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | */ |
| 306 | 306 | public function registerCache(Container $container) |
| 307 | 307 | { |
| 308 | - $container['cache'] = function () { |
|
| 308 | + $container['cache'] = function() { |
|
| 309 | 309 | return new Pool(); |
| 310 | 310 | }; |
| 311 | 311 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | public function description() |
| 134 | 134 | { |
| 135 | - return $this->renderTemplate((string)parent::description()); |
|
| 135 | + return $this->renderTemplate((string) parent::description()); |
|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | /** |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | */ |
| 141 | 141 | public function notes() |
| 142 | 142 | { |
| 143 | - return $this->renderTemplate((string)parent::notes()); |
|
| 143 | + return $this->renderTemplate((string) parent::notes()); |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | /** |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | $rows = array_chunk($this->attachments()->values(), $this->numColumns); |
| 33 | 33 | |
| 34 | 34 | /** Map row content with useful front-end properties. */ |
| 35 | - array_walk($rows, function (&$attachment, $index) { |
|
| 35 | + array_walk($rows, function(&$attachment, $index) { |
|
| 36 | 36 | $attachment = [ |
| 37 | 37 | 'columns' => $attachment, |
| 38 | 38 | 'isFirst' => ($index === 0), |
@@ -50,6 +50,6 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | public function columnWidth() |
| 52 | 52 | { |
| 53 | - return (string)ceil(12/$this->numColumns); |
|
| 53 | + return (string) ceil(12 / $this->numColumns); |
|
| 54 | 54 | } |
| 55 | 55 | } |