@@ -69,7 +69,7 @@ |
||
| 69 | 69 | $pivot = $this->modelFactory()->create(Join::class); |
| 70 | 70 | |
| 71 | 71 | if (is_string($data) && strpos($data, '_') > 1) { |
| 72 | - $data = array_combine([ 'obj_type', 'obj_id' ], explode('_', $data, 1)); |
|
| 72 | + $data = array_combine(['obj_type', 'obj_id'], explode('_', $data, 1)); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | if (is_scalar($data)) { |
@@ -402,7 +402,7 @@ |
||
| 402 | 402 | ); |
| 403 | 403 | } |
| 404 | 404 | |
| 405 | - $this->position = (int)$position; |
|
| 405 | + $this->position = (int) $position; |
|
| 406 | 406 | |
| 407 | 407 | return $this; |
| 408 | 408 | } |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | ]); |
| 257 | 257 | $rows = $source->dbQuery( |
| 258 | 258 | strtr($sql, $binds), |
| 259 | - [ 'objType' => $row['object_type'] ] |
|
| 259 | + ['objType' => $row['object_type']] |
|
| 260 | 260 | ); |
| 261 | 261 | |
| 262 | 262 | /** @todo Show found rows, confirm deletion of dead relationships */ |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | $sql = 'SELECT p.* FROM `%pivotTable` AS p WHERE p.`%sourceType` = :objType;'; |
| 277 | 277 | $rows = $source->dbQuery( |
| 278 | 278 | strtr($sql, $defaultBinds), |
| 279 | - [ 'objType' => $model ] |
|
| 279 | + ['objType' => $model] |
|
| 280 | 280 | ); |
| 281 | 281 | |
| 282 | 282 | /** @todo Explain missing model, confirm deletion of dead relationships */ |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | ]; |
| 395 | 395 | |
| 396 | 396 | if ($ask && $verb) { |
| 397 | - $dead = array_merge([ 'Deleted' => null, 'Failed' => null ], $dead); |
|
| 397 | + $dead = array_merge(['Deleted' => null, 'Failed' => null], $dead); |
|
| 398 | 398 | } |
| 399 | 399 | } |
| 400 | 400 | |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | $cli = $this->climate(); |
| 618 | 618 | |
| 619 | 619 | if (is_string($this->action)) { |
| 620 | - $opts = [ 'y', 'n', 'r', 'q', '?' ]; |
|
| 620 | + $opts = ['y', 'n', 'r', 'q', '?']; |
|
| 621 | 621 | $help = [ |
| 622 | 622 | '[y]es — delete the attachment', |
| 623 | 623 | '[n]o — don’t delete the attachment', |
@@ -625,7 +625,7 @@ discard block |
||
| 625 | 625 | '[q]uit — exit immediately (does not undo previous actions)', |
| 626 | 626 | ]; |
| 627 | 627 | } else { |
| 628 | - $opts = [ 'y', 'a', 'n', 's', 'q', '?' ]; |
|
| 628 | + $opts = ['y', 'a', 'n', 's', 'q', '?']; |
|
| 629 | 629 | $help = [ |
| 630 | 630 | '[y]es — delete this attachment', |
| 631 | 631 | '[a]ll — delete all attachments', |
@@ -686,7 +686,7 @@ discard block |
||
| 686 | 686 | { |
| 687 | 687 | $cli = $this->climate(); |
| 688 | 688 | |
| 689 | - $opts = [ 'y', 'n', 'v', '?' ]; |
|
| 689 | + $opts = ['y', 'n', 'v', '?']; |
|
| 690 | 690 | $help = [ |
| 691 | 691 | '[y]es — continue to deletion phase', |
| 692 | 692 | '[n]o — cancel deletion phase', |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | |
| 90 | 90 | $count = count($attachments); |
| 91 | 91 | $i = 0; |
| 92 | - for (; $i<$count; $i++) { |
|
| 92 | + for (; $i < $count; $i++) { |
|
| 93 | 93 | $attachmentId = $attachments[$i]['attachment_id']; |
| 94 | 94 | $position = $attachments[$i]['position']; |
| 95 | 95 | |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | { |
| 181 | 181 | parent::__construct($data); |
| 182 | 182 | |
| 183 | - if (is_callable([ $this, 'defaultData' ])) { |
|
| 183 | + if (is_callable([$this, 'defaultData'])) { |
|
| 184 | 184 | $defaultData = $this->defaultData(); |
| 185 | 185 | if ($defaultData) { |
| 186 | 186 | $this->setData($defaultData); |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | */ |
| 357 | 357 | public function heading() |
| 358 | 358 | { |
| 359 | - $heading = $this->render((string)$this->heading); |
|
| 359 | + $heading = $this->render((string) $this->heading); |
|
| 360 | 360 | |
| 361 | 361 | if (!$heading) { |
| 362 | 362 | $heading = $this->translator()->translation('{{ objType }} #{{ id }}', [ |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | public function preview() |
| 400 | 400 | { |
| 401 | 401 | if ($this->preview) { |
| 402 | - return $this->render((string)$this->preview); |
|
| 402 | + return $this->render((string) $this->preview); |
|
| 403 | 403 | } |
| 404 | 404 | |
| 405 | 405 | return ''; |
@@ -927,19 +927,19 @@ discard block |
||
| 927 | 927 | static $search; |
| 928 | 928 | |
| 929 | 929 | if ($search === null) { |
| 930 | - $attr = [ 'href', 'link', 'url', 'src' ]; |
|
| 931 | - $scheme = [ '../', './', '/', 'data', 'mailto', 'http' ]; |
|
| 930 | + $attr = ['href', 'link', 'url', 'src']; |
|
| 931 | + $scheme = ['../', './', '/', 'data', 'mailto', 'http']; |
|
| 932 | 932 | |
| 933 | 933 | $search = sprintf( |
| 934 | 934 | '(?<=%1$s=")(?!%2$s)(\S+)(?=")', |
| 935 | - implode('="|', array_map('preg_quote', $attr, [ '~' ])), |
|
| 936 | - implode('|', array_map('preg_quote', $scheme, [ '~' ])) |
|
| 935 | + implode('="|', array_map('preg_quote', $attr, ['~'])), |
|
| 936 | + implode('|', array_map('preg_quote', $scheme, ['~'])) |
|
| 937 | 937 | ); |
| 938 | 938 | } |
| 939 | 939 | |
| 940 | 940 | $text = preg_replace_callback( |
| 941 | 941 | '~'.$search.'~i', |
| 942 | - function ($matches) { |
|
| 942 | + function($matches) { |
|
| 943 | 943 | return $this->createAbsoluteUrl($matches[1]); |
| 944 | 944 | }, |
| 945 | 945 | $text |
@@ -958,7 +958,7 @@ discard block |
||
| 958 | 958 | protected function isRelativeUri($uri) |
| 959 | 959 | { |
| 960 | 960 | if ($uri && !parse_url($uri, PHP_URL_SCHEME)) { |
| 961 | - if (!in_array($uri[0], [ '/', '#', '?' ])) { |
|
| 961 | + if (!in_array($uri[0], ['/', '#', '?'])) { |
|
| 962 | 962 | return true; |
| 963 | 963 | } |
| 964 | 964 | } |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | ]); |
| 208 | 208 | |
| 209 | 209 | foreach ($attachments as $attachment) { |
| 210 | - $GLOBALS['widget_template'] = (string)$attachment->rawPreview(); |
|
| 210 | + $GLOBALS['widget_template'] = (string) $attachment->rawPreview(); |
|
| 211 | 211 | |
| 212 | 212 | if (isset($attachableObjects[$attachment->objType()])) { |
| 213 | 213 | $attachment->attachmentType = $attachableObjects[$attachment->objType()]; |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | ); |
| 474 | 474 | } |
| 475 | 475 | |
| 476 | - $num = (int)$num; |
|
| 476 | + $num = (int) $num; |
|
| 477 | 477 | |
| 478 | 478 | if ($num < 0) { |
| 479 | 479 | throw new InvalidArgumentException( |
@@ -501,7 +501,7 @@ discard block |
||
| 501 | 501 | ); |
| 502 | 502 | } |
| 503 | 503 | |
| 504 | - $page = (int)$page; |
|
| 504 | + $page = (int) $page; |
|
| 505 | 505 | |
| 506 | 506 | if ($page < 0) { |
| 507 | 507 | throw new InvalidArgumentException( |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $this->logger->warning( |
| 81 | 81 | 'AttachmentAwareTrait::attachments() parameters are deprecated. '. |
| 82 | 82 | 'An array of parameters should be used.', |
| 83 | - [ 'package' => 'locomotivemtl/charcoal-attachment' ] |
|
| 83 | + ['package' => 'locomotivemtl/charcoal-attachment'] |
|
| 84 | 84 | ); |
| 85 | 85 | } |
| 86 | 86 | $options = [ |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | $loader->setDynamicTypeField('type'); |
| 182 | 182 | |
| 183 | 183 | if ($widget instanceof AttachmentWidget) { |
| 184 | - $callable = function (&$att) use ($widget, $before) { |
|
| 184 | + $callable = function(&$att) use ($widget, $before) { |
|
| 185 | 185 | if ($this instanceof AttachableInterface) { |
| 186 | 186 | $att->setContainerObj($this); |
| 187 | 187 | } |
@@ -208,11 +208,11 @@ discard block |
||
| 208 | 208 | $att->isPresentable(true); |
| 209 | 209 | |
| 210 | 210 | if ($before !== null) { |
| 211 | - call_user_func_array($before, [ &$att ]); |
|
| 211 | + call_user_func_array($before, [&$att]); |
|
| 212 | 212 | } |
| 213 | 213 | }; |
| 214 | 214 | } else { |
| 215 | - $callable = function (&$att) use ($before) { |
|
| 215 | + $callable = function(&$att) use ($before) { |
|
| 216 | 216 | if ($this instanceof AttachableInterface) { |
| 217 | 217 | $att->setContainerObj($this); |
| 218 | 218 | } |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | $att->isPresentable(true); |
| 221 | 221 | |
| 222 | 222 | if ($before !== null) { |
| 223 | - call_user_func_array($before, [ &$att ]); |
|
| 223 | + call_user_func_array($before, [&$att]); |
|
| 224 | 224 | } |
| 225 | 225 | }; |
| 226 | 226 | } |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | $this->logger->warning( |
| 295 | 295 | 'AttachmentAwareTrait::removeJoins() is deprecated. '. |
| 296 | 296 | 'Use AttachmentAwareTrait::removeAttachmentJoins() instead.', |
| 297 | - [ 'package' => 'locomotivemtl/charcoal-attachment' ] |
|
| 297 | + ['package' => 'locomotivemtl/charcoal-attachment'] |
|
| 298 | 298 | ); |
| 299 | 299 | |
| 300 | 300 | return $this->removeAttachmentJoins(); |
@@ -422,7 +422,7 @@ discard block |
||
| 422 | 422 | $defaults = $this->getDefaultAttachmentOptions(); |
| 423 | 423 | |
| 424 | 424 | $options = array_intersect_key($options, $defaults); |
| 425 | - $options = array_filter($options, [ $this, 'filterAttachmentOption' ], ARRAY_FILTER_USE_BOTH); |
|
| 425 | + $options = array_filter($options, [$this, 'filterAttachmentOption'], ARRAY_FILTER_USE_BOTH); |
|
| 426 | 426 | $options = array_replace($defaults, $options); |
| 427 | 427 | |
| 428 | 428 | return $options; |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | callable $after = null |
| 67 | 67 | ) { |
| 68 | 68 | $attachables = $this->attachableObjects(); |
| 69 | - $attachments = call_user_func_array([ $this, 'getAttachments' ], func_get_args()); |
|
| 69 | + $attachments = call_user_func_array([$this, 'getAttachments'], func_get_args()); |
|
| 70 | 70 | |
| 71 | 71 | foreach ($attachments as $attachment) { |
| 72 | 72 | if (isset($attachables[$attachment->objType()])) { |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | public function registerBaseUrl(Container $container) |
| 110 | 110 | { |
| 111 | - $container['base-url'] = function (Container $container) { |
|
| 111 | + $container['base-url'] = function(Container $container) { |
|
| 112 | 112 | return ''; |
| 113 | 113 | }; |
| 114 | 114 | } |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | */ |
| 122 | 122 | public function registerConfig(Container $container) |
| 123 | 123 | { |
| 124 | - $container['config'] = function (Container $container) { |
|
| 124 | + $container['config'] = function(Container $container) { |
|
| 125 | 125 | return new AppConfig([ |
| 126 | 126 | 'base_path' => realpath(__DIR__.'/../../..'), |
| 127 | 127 | 'apis' => [ |
@@ -146,14 +146,14 @@ discard block |
||
| 146 | 146 | { |
| 147 | 147 | $this->registerConfig($container); |
| 148 | 148 | |
| 149 | - $container['admin/config'] = function (Container $container) { |
|
| 149 | + $container['admin/config'] = function(Container $container) { |
|
| 150 | 150 | return new AdminConfig(); |
| 151 | 151 | }; |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | public function registerLayoutFactory(Container $container) |
| 155 | 155 | { |
| 156 | - $container['layout/factory'] = function (Container $container) { |
|
| 156 | + $container['layout/factory'] = function(Container $container) { |
|
| 157 | 157 | |
| 158 | 158 | $layoutFactory = new LayoutFactory(); |
| 159 | 159 | return $layoutFactory; |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | { |
| 165 | 165 | $this->registerLayoutFactory($container); |
| 166 | 166 | |
| 167 | - $container['layout/builder'] = function (Container $container) { |
|
| 167 | + $container['layout/builder'] = function(Container $container) { |
|
| 168 | 168 | $layoutFactory = $container['layout/factory']; |
| 169 | 169 | $layoutBuilder = new LayoutBuilder($layoutFactory, $container); |
| 170 | 170 | return $layoutBuilder; |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $this->registerWidgetBuilder($container); |
| 178 | 178 | $this->registerLayoutBuilder($container); |
| 179 | 179 | |
| 180 | - $container['dashboard/factory'] = function (Container $container) { |
|
| 180 | + $container['dashboard/factory'] = function(Container $container) { |
|
| 181 | 181 | return new Factory([ |
| 182 | 182 | 'arguments' => [[ |
| 183 | 183 | 'container' => $container, |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | { |
| 197 | 197 | $this->registerDashboardFactory($container); |
| 198 | 198 | |
| 199 | - $container['dashboard/builder'] = function (Container $container) { |
|
| 199 | + $container['dashboard/builder'] = function(Container $container) { |
|
| 200 | 200 | $dashboardFactory = $container['dashboard/factory']; |
| 201 | 201 | $dashboardBuilder = new DashboardBuilder($dashboardFactory, $container); |
| 202 | 202 | return $dashboardBuilder; |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | { |
| 208 | 208 | $this->registerLogger($container); |
| 209 | 209 | |
| 210 | - $container['widget/factory'] = function (Container $container) { |
|
| 210 | + $container['widget/factory'] = function(Container $container) { |
|
| 211 | 211 | return new Factory([ |
| 212 | 212 | 'resolver_options' => [ |
| 213 | 213 | 'suffix' => 'Widget' |
@@ -224,13 +224,13 @@ discard block |
||
| 224 | 224 | { |
| 225 | 225 | $this->registerWidgetFactory($container); |
| 226 | 226 | |
| 227 | - $container['widget/builder'] = function (Container $container) { |
|
| 227 | + $container['widget/builder'] = function(Container $container) { |
|
| 228 | 228 | return new WidgetBuilder($container['widget/factory'], $container); |
| 229 | 229 | }; |
| 230 | 230 | } |
| 231 | 231 | public function registerClimate(Container $container) |
| 232 | 232 | { |
| 233 | - $container['climate/system'] = function (Container $container) { |
|
| 233 | + $container['climate/system'] = function(Container $container) { |
|
| 234 | 234 | $system = Mockery::mock(Linux::class); |
| 235 | 235 | $system->shouldReceive('hasAnsiSupport')->andReturn(true); |
| 236 | 236 | $system->shouldReceive('width')->andReturn(80); |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | return $system; |
| 239 | 239 | }; |
| 240 | 240 | |
| 241 | - $container['climate/output'] = function (Container $container) { |
|
| 241 | + $container['climate/output'] = function(Container $container) { |
|
| 242 | 242 | $output = Mockery::mock(Output::class); |
| 243 | 243 | $output->shouldReceive('persist')->andReturn($output); |
| 244 | 244 | $output->shouldReceive('sameLine')->andReturn($output); |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | return $output; |
| 248 | 248 | }; |
| 249 | 249 | |
| 250 | - $container['climate/reader'] = function (Container $container) { |
|
| 250 | + $container['climate/reader'] = function(Container $container) { |
|
| 251 | 251 | $reader = Mockery::mock(Stdin::class); |
| 252 | 252 | $reader->shouldReceive('line')->andReturn('line'); |
| 253 | 253 | $reader->shouldReceive('char')->andReturn('char'); |
@@ -255,11 +255,11 @@ discard block |
||
| 255 | 255 | return $reader; |
| 256 | 256 | }; |
| 257 | 257 | |
| 258 | - $container['climate/util'] = function (Container $container) { |
|
| 258 | + $container['climate/util'] = function(Container $container) { |
|
| 259 | 259 | return new UtilFactory($container['climate/system']); |
| 260 | 260 | }; |
| 261 | 261 | |
| 262 | - $container['climate'] = function (Container $container) { |
|
| 262 | + $container['climate'] = function(Container $container) { |
|
| 263 | 263 | $climate = new CLImate(); |
| 264 | 264 | |
| 265 | 265 | $climate->setOutput($container['climate/output']); |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | */ |
| 279 | 279 | public function registerView(Container $container) |
| 280 | 280 | { |
| 281 | - $container['view/loader'] = function (Container $container) { |
|
| 281 | + $container['view/loader'] = function(Container $container) { |
|
| 282 | 282 | return new MustacheLoader([ |
| 283 | 283 | 'logger' => $container['logger'], |
| 284 | 284 | 'base_path' => $container['config']['base_path'], |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | ]); |
| 289 | 289 | }; |
| 290 | 290 | |
| 291 | - $container['view/engine'] = function (Container $container) { |
|
| 291 | + $container['view/engine'] = function(Container $container) { |
|
| 292 | 292 | return new MustacheEngine([ |
| 293 | 293 | 'logger' => $container['logger'], |
| 294 | 294 | 'cache' => MustacheEngine::DEFAULT_CACHE_PATH, |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | ]); |
| 297 | 297 | }; |
| 298 | 298 | |
| 299 | - $container['view'] = function (Container $container) { |
|
| 299 | + $container['view'] = function(Container $container) { |
|
| 300 | 300 | return new GenericView([ |
| 301 | 301 | 'logger' => $container['logger'], |
| 302 | 302 | 'engine' => $container['view/engine'] |
@@ -312,15 +312,15 @@ discard block |
||
| 312 | 312 | */ |
| 313 | 313 | public function registerTranslator(Container $container) |
| 314 | 314 | { |
| 315 | - $container['locales/manager'] = function (Container $container) { |
|
| 315 | + $container['locales/manager'] = function(Container $container) { |
|
| 316 | 316 | return new LocalesManager([ |
| 317 | 317 | 'locales' => [ |
| 318 | - 'en' => [ 'locale' => 'en-US' ] |
|
| 318 | + 'en' => ['locale' => 'en-US'] |
|
| 319 | 319 | ] |
| 320 | 320 | ]); |
| 321 | 321 | }; |
| 322 | 322 | |
| 323 | - $container['translator'] = function (Container $container) { |
|
| 323 | + $container['translator'] = function(Container $container) { |
|
| 324 | 324 | return new Translator([ |
| 325 | 325 | 'manager' => $container['locales/manager'] |
| 326 | 326 | ]); |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | */ |
| 336 | 336 | public function registerLogger(Container $container) |
| 337 | 337 | { |
| 338 | - $container['logger'] = function (Container $container) { |
|
| 338 | + $container['logger'] = function(Container $container) { |
|
| 339 | 339 | return new NullLogger(); |
| 340 | 340 | }; |
| 341 | 341 | } |
@@ -348,14 +348,14 @@ discard block |
||
| 348 | 348 | */ |
| 349 | 349 | public function registerCache(Container $container) |
| 350 | 350 | { |
| 351 | - $container['cache'] = function ($container) { |
|
| 351 | + $container['cache'] = function($container) { |
|
| 352 | 352 | return new Pool(new Ephemeral()); |
| 353 | 353 | }; |
| 354 | 354 | } |
| 355 | 355 | |
| 356 | 356 | public function registerDatabase(Container $container) |
| 357 | 357 | { |
| 358 | - $container['database'] = function (Container $container) { |
|
| 358 | + $container['database'] = function(Container $container) { |
|
| 359 | 359 | $pdo = new PDO('sqlite::memory:'); |
| 360 | 360 | $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
| 361 | 361 | return $pdo; |
@@ -367,7 +367,7 @@ discard block |
||
| 367 | 367 | $this->registerLogger($container); |
| 368 | 368 | $this->registerCache($container); |
| 369 | 369 | |
| 370 | - $container['metadata/loader'] = function (Container $container) { |
|
| 370 | + $container['metadata/loader'] = function(Container $container) { |
|
| 371 | 371 | return new MetadataLoader([ |
| 372 | 372 | 'logger' => $container['logger'], |
| 373 | 373 | 'cache' => $container['cache'], |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | $this->registerLogger($container); |
| 387 | 387 | $this->registerDatabase($container); |
| 388 | 388 | |
| 389 | - $container['source/factory'] = function (Container $container) { |
|
| 389 | + $container['source/factory'] = function(Container $container) { |
|
| 390 | 390 | return new Factory([ |
| 391 | 391 | 'map' => [ |
| 392 | 392 | 'database' => DatabaseSource::class |
@@ -405,7 +405,7 @@ discard block |
||
| 405 | 405 | $this->registerDatabase($container); |
| 406 | 406 | $this->registerLogger($container); |
| 407 | 407 | |
| 408 | - $container['property/factory'] = function (Container $container) { |
|
| 408 | + $container['property/factory'] = function(Container $container) { |
|
| 409 | 409 | return new Factory([ |
| 410 | 410 | 'resolver_options' => [ |
| 411 | 411 | 'prefix' => '\\Charcoal\\Property\\', |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | $this->registerDatabase($container); |
| 427 | 427 | $this->registerLogger($container); |
| 428 | 428 | |
| 429 | - $container['property/display/factory'] = function (Container $container) { |
|
| 429 | + $container['property/display/factory'] = function(Container $container) { |
|
| 430 | 430 | return new Factory([ |
| 431 | 431 | 'resolver_options' => [ |
| 432 | 432 | 'suffix' => 'Display' |
@@ -448,7 +448,7 @@ discard block |
||
| 448 | 448 | $this->registerPropertyFactory($container); |
| 449 | 449 | $this->registerSourceFactory($container); |
| 450 | 450 | |
| 451 | - $container['model/factory'] = function (Container $container) { |
|
| 451 | + $container['model/factory'] = function(Container $container) { |
|
| 452 | 452 | return new Factory([ |
| 453 | 453 | 'arguments' => [[ |
| 454 | 454 | 'container' => $container, |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | |
| 464 | 464 | public function registerAcl(Container $container) |
| 465 | 465 | { |
| 466 | - $container['admin/acl'] = function (Container $container) { |
|
| 466 | + $container['admin/acl'] = function(Container $container) { |
|
| 467 | 467 | return new Acl(); |
| 468 | 468 | }; |
| 469 | 469 | } |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | $this->registerLogger($container); |
| 474 | 474 | $this->registerModelFactory($container); |
| 475 | 475 | |
| 476 | - $container['admin/authenticator'] = function (Container $container) { |
|
| 476 | + $container['admin/authenticator'] = function(Container $container) { |
|
| 477 | 477 | return new Authenticator([ |
| 478 | 478 | 'logger' => $container['logger'], |
| 479 | 479 | 'user_type' => 'charcoal/admin/user', |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | $this->registerLogger($container); |
| 490 | 490 | $this->registerAcl($container); |
| 491 | 491 | |
| 492 | - $container['admin/authorizer'] = function (Container $container) { |
|
| 492 | + $container['admin/authorizer'] = function(Container $container) { |
|
| 493 | 493 | return new Authorizer([ |
| 494 | 494 | 'logger' => $container['logger'], |
| 495 | 495 | 'acl' => $container['admin/acl'], |
@@ -503,7 +503,7 @@ discard block |
||
| 503 | 503 | $this->registerLogger($container); |
| 504 | 504 | $this->registerModelFactory($container); |
| 505 | 505 | |
| 506 | - $container['model/collection/loader'] = function (Container $container) { |
|
| 506 | + $container['model/collection/loader'] = function(Container $container) { |
|
| 507 | 507 | return new \Charcoal\Loader\CollectionLoader([ |
| 508 | 508 | 'logger' => $container['logger'], |
| 509 | 509 | 'factory' => $container['model/factory'] |
@@ -513,7 +513,7 @@ discard block |
||
| 513 | 513 | |
| 514 | 514 | public function registerEmailFactory(Container $container) |
| 515 | 515 | { |
| 516 | - $container['email/factory'] = function (Container $container) { |
|
| 516 | + $container['email/factory'] = function(Container $container) { |
|
| 517 | 517 | return new Factory([ |
| 518 | 518 | 'map' => [ |
| 519 | 519 | 'email' => Email::class |
@@ -524,7 +524,7 @@ discard block |
||
| 524 | 524 | |
| 525 | 525 | public function registerElfinderConfig(Container $container) |
| 526 | 526 | { |
| 527 | - $container['elfinder/config'] = function (Container $container) { |
|
| 527 | + $container['elfinder/config'] = function(Container $container) { |
|
| 528 | 528 | return []; |
| 529 | 529 | }; |
| 530 | 530 | } |