Skip to content

Commit

Permalink
fix auto-formatting issues in php
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelAlphonso committed May 31, 2017
1 parent 8f1d385 commit dca9327
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/Charcoal/Admin/ServiceProvider/AdminServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// From Pimple
use Charcoal\Admin\Service\SelectizeRenderer;
use Charcoal\Factory\FactoryInterface;
use Pimple\Container;
use Pimple\ServiceProviderInterface;

Expand Down Expand Up @@ -193,10 +194,10 @@ protected function registerUtilities(Container $container)
$container['property/input/factory'] = function (Container $container) {
return new Factory([
'base_class' => PropertyInputInterface::class,
'arguments' => [ [
'arguments' => [[
'container' => $container,
'logger' => $container['logger']
] ],
]],
'resolver_options' => [
'suffix' => 'Input'
]
Expand All @@ -210,10 +211,10 @@ protected function registerUtilities(Container $container)
$container['property/display/factory'] = function (Container $container) {
return new Factory([
'base_class' => PropertyDisplayInterface::class,
'arguments' => [ [
'arguments' => [[
'container' => $container,
'logger' => $container['logger']
] ],
]],
'resolver_options' => [
'suffix' => 'Display'
]
Expand All @@ -228,12 +229,12 @@ protected function registerUtilities(Container $container)
return new Factory([
'base_class' => SidemenuGroupInterface::class,
'default_class' => GenericSidemenuGroup::class,
'arguments' => [ [
'arguments' => [[
'container' => $container,
'logger' => $container['logger'],
'view' => $container['view'],
'layout_builder' => $container['layout/builder']
] ],
]],
'resolver_options' => [
'suffix' => 'SidemenuGroup'
]
Expand All @@ -254,9 +255,9 @@ protected function registerUtilities(Container $container)
$container->extend('view/mustache/helpers', function (array $helpers, Container $container) {
$adminUrl = clone $container['base-url'];
if ($container['admin/config']['base_path']) {
$basePath = rtrim($adminUrl->getBasePath(), '/');
$basePath = rtrim($adminUrl->getBasePath(), '/');
$adminPath = ltrim($container['admin/config']['base_path'], '/');
$adminUrl = $adminUrl->withBasePath($basePath.'/'.$adminPath);
$adminUrl = $adminUrl->withBasePath($basePath.'/'.$adminPath);
}

$urls = [
Expand Down Expand Up @@ -284,14 +285,14 @@ protected function registerUtilities(Container $container)
} else {
$parts = parse_url($uri);
if (!isset($parts['scheme'])) {
if (!in_array($uri[0], [ '/', '#', '?' ])) {
$path = isset($parts['path']) ? ltrim($parts['path'], '/') : '';
if (!in_array($uri[0], ['/', '#', '?'])) {
$path = isset($parts['path']) ? ltrim($parts['path'], '/') : '';
$query = isset($parts['query']) ? $parts['query'] : '';
$hash = isset($parts['fragment']) ? $parts['fragment'] : '';
$hash = isset($parts['fragment']) ? $parts['fragment'] : '';

return $adminUrl->withPath($path)
->withQuery($query)
->withFragment($hash);
->withQuery($query)
->withFragment($hash);
}
}
}
Expand Down

0 comments on commit dca9327

Please sign in to comment.