@@ -62,10 +62,10 @@ |
||
62 | 62 | { |
63 | 63 | $controller = str_replace('\\', '/', $this->get('controller')); |
64 | 64 | |
65 | - $path = (empty($controller) ? '' : $controller . '/') . $this->get('name') . '.' . $this->get('format') . '.' . $this->get('engine'); |
|
65 | + $path = (empty($controller) ? '' : $controller.'/').$this->get('name').'.'.$this->get('format').'.'.$this->get('engine'); |
|
66 | 66 | |
67 | 67 | return empty($this->parameters['module']) ? |
68 | - self::APP_VIEWS_DIRECTORY . '/' . $path : '@' . $this->get('module') . '/' . self::MODULE_VIEWS_DIRECTORY . '/' . $path; |
|
68 | + self::APP_VIEWS_DIRECTORY.'/'.$path : '@'.$this->get('module').'/'.self::MODULE_VIEWS_DIRECTORY.'/'.$path; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -49,9 +49,9 @@ |
||
49 | 49 | $output->writeln(sprintf('%s is running with <info>%d</info> modules loaded.', $appName, count($modules))); |
50 | 50 | |
51 | 51 | foreach ($modules as $module) { |
52 | - $output->writeln(PHP_EOL . '<info>' . $module->getName() . '</info>'); |
|
53 | - $output->writeln(' - <comment>namespace:</comment> ' . $module->getNamespace()); |
|
54 | - $output->writeln(' - <comment>path:</comment> ' . $module->getPath()); |
|
52 | + $output->writeln(PHP_EOL.'<info>'.$module->getName().'</info>'); |
|
53 | + $output->writeln(' - <comment>namespace:</comment> '.$module->getNamespace()); |
|
54 | + $output->writeln(' - <comment>path:</comment> '.$module->getPath()); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | } |
@@ -87,9 +87,9 @@ discard block |
||
87 | 87 | $r = new \ReflectionFunction($service); |
88 | 88 | if ($ns = $r->getNamespaceName()) { |
89 | 89 | $filename = basename($r->getFileName(), '.php'); |
90 | - $lines[$key]['class'] = $ns . '\\' . $filename . '\{closure}'; |
|
90 | + $lines[$key]['class'] = $ns.'\\'.$filename.'\{closure}'; |
|
91 | 91 | } else { |
92 | - $lines[$key]['class'] = 'Closure in ' . $r->getFileName(); |
|
92 | + $lines[$key]['class'] = 'Closure in '.$r->getFileName(); |
|
93 | 93 | } |
94 | 94 | } else { |
95 | 95 | $r = new \ReflectionObject($service); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $service = $sm->get($id); |
134 | 134 | $output->write(sprintf(' <info>OK</info> [%s]', is_object($service) ? get_class($service) : gettype($service))); |
135 | 135 | } catch (\Exception $e) { |
136 | - $output->write(' <error>FAIL</error> [' . $e->getMessage() . ']'); |
|
136 | + $output->write(' <error>FAIL</error> ['.$e->getMessage().']'); |
|
137 | 137 | } |
138 | 138 | } |
139 | 139 | $output->writeln(''); |
@@ -56,6 +56,6 @@ |
||
56 | 56 | return; |
57 | 57 | } |
58 | 58 | |
59 | - $filesystem->remove(glob($cacheDir . '/*')); |
|
59 | + $filesystem->remove(glob($cacheDir.'/*')); |
|
60 | 60 | } |
61 | 61 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $contents = array(); |
67 | 67 | |
68 | 68 | if (($files['php'] = $input->getOption('write-php'))) { |
69 | - $contents['php'] = "<?php\n\nreturn " . var_export($config, true) . ";\n\n?>\n"; |
|
69 | + $contents['php'] = "<?php\n\nreturn ".var_export($config, true).";\n\n?>\n"; |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | if (($files['yaml'] = $input->getOption('write-yaml'))) { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $output->writeln($message); |
82 | 82 | |
83 | 83 | foreach ($config as $rootKey => $subConfig) { |
84 | - $output->writeln('<info>' . $rootKey . '</info>:'); |
|
84 | + $output->writeln('<info>'.$rootKey.'</info>:'); |
|
85 | 85 | $output->writeln($dumper->dump($subConfig, 6, $indentation, false, false)); |
86 | 86 | } |
87 | 87 | |
@@ -89,13 +89,13 @@ discard block |
||
89 | 89 | } |
90 | 90 | |
91 | 91 | foreach ($files as $format => $file) { |
92 | - $output->write('Saving configuration in <info>' . strtoupper($format) . '</info> format...'); |
|
92 | + $output->write('Saving configuration in <info>'.strtoupper($format).'</info> format...'); |
|
93 | 93 | if ($fileExists = file_exists($file)) { |
94 | 94 | if (!isset($dialog)) { |
95 | 95 | $dialog = $this->getHelperSet()->get('dialog'); |
96 | 96 | } |
97 | 97 | if (!$dialog->askConfirmation($output, |
98 | - " <question>File \"" . $file . "\" already exists. Proceed anyway?</question> ", false)) { |
|
98 | + " <question>File \"".$file."\" already exists. Proceed anyway?</question> ", false)) { |
|
99 | 99 | continue; |
100 | 100 | } |
101 | 101 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $filesystem = $this->getServiceManager()->get('filesystem'); |
81 | 81 | |
82 | 82 | // Create the modules directory otherwise symlink will fail. |
83 | - $filesystem->mkdir($targetArg . '/modules/', 0777); |
|
83 | + $filesystem->mkdir($targetArg.'/modules/', 0777); |
|
84 | 84 | |
85 | 85 | $output->writeln(sprintf("Installing assets using the <comment>%s</comment> option", $input->getOption('symlink') ? 'symlink' : 'hard copy')); |
86 | 86 | |
@@ -88,11 +88,11 @@ discard block |
||
88 | 88 | if (!method_exists($module, 'getPath')) { |
89 | 89 | continue; |
90 | 90 | } |
91 | - if (!is_dir($originDir = $module->getPath() . '/resources/public')) { |
|
91 | + if (!is_dir($originDir = $module->getPath().'/resources/public')) { |
|
92 | 92 | continue; |
93 | 93 | } |
94 | - $modulesDir = $targetArg . '/modules/'; |
|
95 | - $targetDir = $modulesDir . str_replace('module', '', strtolower($module->getName())); |
|
94 | + $modulesDir = $targetArg.'/modules/'; |
|
95 | + $targetDir = $modulesDir.str_replace('module', '', strtolower($module->getName())); |
|
96 | 96 | |
97 | 97 | $output->writeln(sprintf('Installing assets for <comment>%s</comment> into <comment>%s</comment>', $module->getNamespace(), $targetDir)); |
98 | 98 |
@@ -36,7 +36,7 @@ |
||
36 | 36 | public function __construct(AppInterface $app) |
37 | 37 | { |
38 | 38 | $this->app = $app; |
39 | - parent::__construct('PPI', $app->getVersion() . ' - ' . $app->getEnvironment() . ($app->isDebug() ? '/debug' : '')); |
|
39 | + parent::__construct('PPI', $app->getVersion().' - '.$app->getEnvironment().($app->isDebug() ? '/debug' : '')); |
|
40 | 40 | |
41 | 41 | $this->getDefinition()->addOption(new InputOption('--shell', '-s', InputOption::VALUE_NONE, 'Launch the shell.')); |
42 | 42 | $this->getDefinition()->addOption(new InputOption('--process-isolation', null, InputOption::VALUE_NONE, 'Launch commands from shell as a separate process.')); |
@@ -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)); |
@@ -103,9 +103,9 @@ discard block |
||
103 | 103 | { |
104 | 104 | $handlerId = $this->getHandlerId($name); |
105 | 105 | $class = $parameters[sprintf('monolog.handler.%s.class', $handler['type'])]; |
106 | - $handler['level'] = is_int($handler['level']) ? $handler['level'] : constant('Monolog\Logger::' . strtoupper($handler['level'])); |
|
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']); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | public function resolveArray(array $data) |
81 | 81 | { |
82 | 82 | $self = $this; |
83 | - array_walk_recursive($data, function (&$value, $key) use ($self) { |
|
83 | + array_walk_recursive($data, function(&$value, $key) use ($self) { |
|
84 | 84 | if (is_string($value)) { |
85 | 85 | $value = $self->resolveString($value); |
86 | 86 | } |
@@ -110,13 +110,13 @@ discard block |
||
110 | 110 | } |
111 | 111 | foreach ($subnode as $key => $value) { |
112 | 112 | if (is_array($value)) { |
113 | - $nodePath = $path ? $path . '.' . $key : $key; |
|
113 | + $nodePath = $path ? $path.'.'.$key : $key; |
|
114 | 114 | $this->flatten($parameters, $value, $nodePath); |
115 | 115 | if (null === $path) { |
116 | 116 | unset($parameters[$key]); |
117 | 117 | } |
118 | 118 | } elseif (null !== $path) { |
119 | - $parameters[$path . '.' . $key] = $value; |
|
119 | + $parameters[$path.'.'.$key] = $value; |
|
120 | 120 | } |
121 | 121 | } |
122 | 122 | } |