@@ -112,7 +112,7 @@ |
||
| 112 | 112 | $moduleCreateCommand->setTargetModuleDir($config['module_listener_options']['module_paths'][0]); |
| 113 | 113 | |
| 114 | 114 | // Enabled templating engines |
| 115 | - if(isset($config['framework']['templating']['engines'])) { |
|
| 115 | + if (isset($config['framework']['templating']['engines'])) { |
|
| 116 | 116 | $moduleCreateCommand->setEnabledTemplatingEngines($config['framework']['templating']['engines']); |
| 117 | 117 | } |
| 118 | 118 | |
@@ -124,7 +124,7 @@ |
||
| 124 | 124 | $output->write(sprintf('<info>%s</info> ', str_pad($id, $pad['id']))); |
| 125 | 125 | $output->write(sprintf('%s ', str_pad($line['type'], $pad['type']))); |
| 126 | 126 | if ('Alias' == $line['type']) { |
| 127 | - $output->write(sprintf('<comment>alias for</comment> <info>%s </info>', str_pad($line['class'], $pad['class']-10))); |
|
| 127 | + $output->write(sprintf('<comment>alias for</comment> <info>%s </info>', str_pad($line['class'], $pad['class'] - 10))); |
|
| 128 | 128 | } else { |
| 129 | 129 | $output->write(sprintf('%s ', str_pad($line['class'], $pad['class']))); |
| 130 | 130 | } |
@@ -367,7 +367,7 @@ |
||
| 367 | 367 | $formattedValue = sprintf("<em>object</em>(%s)", $this->abbrClass($item[1])); |
| 368 | 368 | } elseif ('array' === $item[0]) { |
| 369 | 369 | $formattedValue = sprintf("<em>array</em>(%s)", is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]); |
| 370 | - } elseif ('string' === $item[0]) { |
|
| 370 | + } elseif ('string' === $item[0]) { |
|
| 371 | 371 | $formattedValue = sprintf("'%s'", htmlspecialchars($item[1], ENT_QUOTES | ENT_SUBSTITUTE, $this->charset)); |
| 372 | 372 | } elseif ('null' === $item[0]) { |
| 373 | 373 | $formattedValue = '<em>null</em>'; |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | $parameters = parent::matchRequest($request); |
| 71 | 71 | $this->matchedRouteRequest = $request; |
| 72 | 72 | return $parameters; |
| 73 | - } catch(\Exception $e) { |
|
| 73 | + } catch (\Exception $e) { |
|
| 74 | 74 | throw $e; |
| 75 | 75 | } |
| 76 | 76 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | public function load($path) |
| 45 | 45 | { |
| 46 | 46 | |
| 47 | - if(!is_readable($path)) { |
|
| 47 | + if (!is_readable($path)) { |
|
| 48 | 48 | throw new \InvalidArgumentException('Invalid laravel routes path found: ' . $path); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | // The included file must return the laravel router |
| 55 | 55 | include $path; |
| 56 | 56 | |
| 57 | - if(!($router instanceof LaravelRouter)) { |
|
| 57 | + if (!($router instanceof LaravelRouter)) { |
|
| 58 | 58 | throw new \Exception('Invalid return value from ' |
| 59 | 59 | . pathinfo($path, PATHINFO_FILENAME) |
| 60 | 60 | . ' expected instance of LaravelRouter' |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH) |
| 86 | 86 | { |
| 87 | 87 | $ret = $this->router->generate($name, $parameters); |
| 88 | - if($ret === false) { |
|
| 88 | + if ($ret === false) { |
|
| 89 | 89 | throw new RouteNotFoundException('Unable to generate route for: ' . $name); |
| 90 | 90 | } |
| 91 | 91 | return $ret; |
@@ -127,16 +127,16 @@ discard block |
||
| 127 | 127 | $routeParams = $matchedRoute->params; |
| 128 | 128 | |
| 129 | 129 | // The 'action' key always exists and defaults to the Route Name, so we check accordingly |
| 130 | - if(!isset($routeParams['controller']) && $routeParams['action'] === $matchedRoute->name) { |
|
| 130 | + if (!isset($routeParams['controller']) && $routeParams['action'] === $matchedRoute->name) { |
|
| 131 | 131 | throw new \Exception('Matched the route: ' . $matchedRoute->name . ' but unable to locate |
| 132 | 132 | any controller/action params to dispatch'); |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | // We need _controller, to that symfony ControllerResolver can pick this up |
| 136 | - if(!isset($routeParams['_controller'])) { |
|
| 137 | - if(isset($routeParams['controller'])) { |
|
| 136 | + if (!isset($routeParams['_controller'])) { |
|
| 137 | + if (isset($routeParams['controller'])) { |
|
| 138 | 138 | $routeParams['_controller'] = $routeParams['controller']; |
| 139 | - } elseif(isset($routeParams['action'])) { |
|
| 139 | + } elseif (isset($routeParams['action'])) { |
|
| 140 | 140 | $routeParams['_controller'] = $routeParams['action']; |
| 141 | 141 | } else { |
| 142 | 142 | throw new \Exception('Unable to determine the controller from route: ' . $matchedRoute->name); |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $routeParams['_route'] = $matchedRoute->name; |
| 147 | 147 | |
| 148 | 148 | // If the controller is an Object, and 'action' is defaulted to the route name - we default to __invoke |
| 149 | - if($routeParams['action'] === $matchedRoute->name) { |
|
| 149 | + if ($routeParams['action'] === $matchedRoute->name) { |
|
| 150 | 150 | $routeParams['action'] = '__invoke'; |
| 151 | 151 | } |
| 152 | 152 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | $loggerClass = $configs['parameters']['monolog.logger.class']; |
| 84 | - $serviceManager->setFactory('monolog.logger', function ($serviceManager) use ($loggerClass, $handlersToChannels) { |
|
| 84 | + $serviceManager->setFactory('monolog.logger', function($serviceManager) use ($loggerClass, $handlersToChannels) { |
|
| 85 | 85 | $logger = new $loggerClass('app'); |
| 86 | 86 | foreach ($handlersToChannels as $handler => $channels) { |
| 87 | 87 | $logger->pushHandler($serviceManager->get($handler)); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $class = $parameters[sprintf('monolog.handler.%s.class', $handler['type'])]; |
| 106 | 106 | $handler['level'] = is_int($handler['level']) ? $handler['level'] : constant('Monolog\Logger::' . strtoupper($handler['level'])); |
| 107 | 107 | |
| 108 | - $serviceManager->setFactory($handlerId, function ($serviceManager) use ($class, $handler) { |
|
| 108 | + $serviceManager->setFactory($handlerId, function($serviceManager) use ($class, $handler) { |
|
| 109 | 109 | switch ($handler['type']) { |
| 110 | 110 | case 'stream': |
| 111 | 111 | return new $class($handler['path'], $handler['level'], $handler['bubble']); |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | $serviceManager->setShared($name, $value); |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | - $serviceManager->addInitializer(function ($instance) use ($serviceManager) { |
|
| 136 | + $serviceManager->addInitializer(function($instance) use ($serviceManager) { |
|
| 137 | 137 | if ($instance instanceof EventManagerAwareInterface) { |
| 138 | 138 | if ($instance->getEventManager() instanceof EventManagerInterface) { |
| 139 | 139 | $instance->getEventManager()->setSharedManager( |
@@ -145,13 +145,13 @@ discard block |
||
| 145 | 145 | } |
| 146 | 146 | }); |
| 147 | 147 | |
| 148 | - $serviceManager->addInitializer(function ($instance) use ($serviceManager) { |
|
| 148 | + $serviceManager->addInitializer(function($instance) use ($serviceManager) { |
|
| 149 | 149 | if ($instance instanceof ServiceManagerAwareInterface) { |
| 150 | 150 | $instance->setServiceManager($serviceManager); |
| 151 | 151 | } |
| 152 | 152 | }); |
| 153 | 153 | |
| 154 | - $serviceManager->addInitializer(function ($instance) use ($serviceManager) { |
|
| 154 | + $serviceManager->addInitializer(function($instance) use ($serviceManager) { |
|
| 155 | 155 | if ($instance instanceof ServiceLocatorAwareInterface) { |
| 156 | 156 | $instance->setServiceLocator($serviceManager); |
| 157 | 157 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | $config = $serviceManager->get('Config'); |
| 47 | 47 | |
| 48 | - $options = array_merge(array( |
|
| 48 | + $options = array_merge(array( |
|
| 49 | 49 | 'auto_start' => false, |
| 50 | 50 | 'storage_id' => 'session.storage.native', |
| 51 | 51 | 'handler_id' => 'session.handler.native_file', |
@@ -67,14 +67,14 @@ discard block |
||
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | // session handler |
| 70 | - $serviceManager->setFactory('session.handler', function ($serviceManager) use ($options) { |
|
| 70 | + $serviceManager->setFactory('session.handler', function($serviceManager) use ($options) { |
|
| 71 | 71 | $handlerID = $options['handler_id']; |
| 72 | 72 | |
| 73 | 73 | return $handlerID === null ? null : $serviceManager->get($handlerID); |
| 74 | 74 | }); |
| 75 | 75 | |
| 76 | 76 | // session storage native |
| 77 | - $serviceManager->setFactory('session.storage.native', function ($serviceManager) use ($storageOptions) { |
|
| 77 | + $serviceManager->setFactory('session.storage.native', function($serviceManager) use ($storageOptions) { |
|
| 78 | 78 | |
| 79 | 79 | // We need to strip out keys with a null value so symfony doesn't try and set things with a blank value |
| 80 | 80 | $storageOptions = array_filter($storageOptions); |
@@ -83,19 +83,19 @@ discard block |
||
| 83 | 83 | }); |
| 84 | 84 | |
| 85 | 85 | // session flash bag |
| 86 | - $serviceManager->setFactory('session.flash_bag', function ($serviceManager) { |
|
| 86 | + $serviceManager->setFactory('session.flash_bag', function($serviceManager) { |
|
| 87 | 87 | return new FlashBag(); |
| 88 | 88 | }); |
| 89 | 89 | |
| 90 | 90 | // session attribute bag |
| 91 | - $serviceManager->setFactory('session.attribute_bag', function ($serviceManager) { |
|
| 91 | + $serviceManager->setFactory('session.attribute_bag', function($serviceManager) { |
|
| 92 | 92 | return new AttributeBag(); |
| 93 | 93 | }); |
| 94 | 94 | |
| 95 | 95 | $that = $this; |
| 96 | 96 | |
| 97 | 97 | // session handler native file |
| 98 | - $serviceManager->setFactory('session.handler.native_file', function ($serviceManager) use ($that, $storageOptions) { |
|
| 98 | + $serviceManager->setFactory('session.handler.native_file', function($serviceManager) use ($that, $storageOptions) { |
|
| 99 | 99 | |
| 100 | 100 | // We want absolute paths if we can |
| 101 | 101 | if (null !== $storageOptions['save_path'] && !$that->isAbsolutePath($storageOptions['save_path'])) { |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | }); |
| 113 | 113 | |
| 114 | 114 | // session |
| 115 | - $serviceManager->setFactory('session', function ($serviceManager) { |
|
| 115 | + $serviceManager->setFactory('session', function($serviceManager) { |
|
| 116 | 116 | |
| 117 | 117 | $session = new Session( |
| 118 | 118 | $serviceManager->get('session.storage.native'), |