| @@ -77,7 +77,7 @@ discard block | ||
| 77 | 77 | ); | 
| 78 | 78 |          } catch (ParseException $exc) { | 
| 79 | 79 | $mess = sprintf( | 
| 80 | - 'Unable to parse the YAML configuration file %2$s.' . ' The error message was %1$s', | |
| 80 | + 'Unable to parse the YAML configuration file %2$s.'.' The error message was %1$s', | |
| 81 | 81 | $exc->getMessage(), | 
| 82 | 82 | $configFile | 
| 83 | 83 | ); | 
| @@ -106,7 +106,7 @@ discard block | ||
| 106 | 106 |      { | 
| 107 | 107 | $names = ['Config', 'Error', 'Event', 'Log', 'Sql', 'Xml', 'Xsd', 'Xsl', 'Cache', 'Network', 'EveApi']; | 
| 108 | 108 |          foreach ($names as $name) { | 
| 109 | - $className = __NAMESPACE__ . '\\' . $name . 'Wiring'; | |
| 109 | + $className = __NAMESPACE__.'\\'.$name.'Wiring'; | |
| 110 | 110 |              if (class_exists($className, true)) { | 
| 111 | 111 | /** | 
| 112 | 112 | * @var WiringInterface $class | 
| @@ -115,11 +115,11 @@ discard block | ||
| 115 | 115 | $class->wire($this->dic); | 
| 116 | 116 | continue; | 
| 117 | 117 | } | 
| 118 | - $methodName = 'wire' . $name; | |
| 118 | + $methodName = 'wire'.$name; | |
| 119 | 119 |              if (method_exists($this, $methodName)) { | 
| 120 | 120 | $this->$methodName(); | 
| 121 | 121 |              } else { | 
| 122 | - $mess = 'Could NOT find class or method for ' . $name; | |
| 122 | + $mess = 'Could NOT find class or method for '.$name; | |
| 123 | 123 | throw new \LogicException($mess); | 
| 124 | 124 | } | 
| 125 | 125 | } | 
| @@ -143,7 +143,7 @@ discard block | ||
| 143 | 143 |          do { | 
| 144 | 144 | $settings = preg_replace_callback( | 
| 145 | 145 | $regEx, | 
| 146 | -                function ($match) use ($settings, $dic) { | |
| 146 | +                function($match) use ($settings, $dic) { | |
| 147 | 147 |                      if (!empty($settings[$match['name']])) { | 
| 148 | 148 | return $settings[$match['name']]; | 
| 149 | 149 | } | 
| @@ -164,7 +164,7 @@ discard block | ||
| 164 | 164 |              if (PREG_NO_ERROR !== $lastError) { | 
| 165 | 165 | $constants = array_flip(get_defined_constants(true)['pcre']); | 
| 166 | 166 | $lastError = $constants[$lastError]; | 
| 167 | - $mess = 'Received preg error ' . $lastError; | |
| 167 | + $mess = 'Received preg error '.$lastError; | |
| 168 | 168 | throw new \DomainException($mess); | 
| 169 | 169 | } | 
| 170 | 170 | } while ($count > 0); | 
| @@ -183,7 +183,7 @@ discard block | ||
| 183 | 183 | $rdi->setFlags($flags); | 
| 184 | 184 | /** @noinspection SpellCheckingInspection */ | 
| 185 | 185 | $rcfi = new \RecursiveCallbackFilterIterator( | 
| 186 | -            $rdi, function (\SplFileInfo $current, $key, \RecursiveDirectoryIterator $rdi) { | |
| 186 | +            $rdi, function(\SplFileInfo $current, $key, \RecursiveDirectoryIterator $rdi) { | |
| 187 | 187 |              if ($rdi->hasChildren()) { | 
| 188 | 188 | return true; | 
| 189 | 189 | } | 
| @@ -218,16 +218,16 @@ discard block | ||
| 218 | 218 | $dic['Yapeal.baseDir'] = $path; | 
| 219 | 219 | } | 
| 220 | 220 |          if (empty($dic['Yapeal.libDir'])) { | 
| 221 | - $dic['Yapeal.libDir'] = $path . 'lib/'; | |
| 221 | + $dic['Yapeal.libDir'] = $path.'lib/'; | |
| 222 | 222 | } | 
| 223 | 223 | $configFiles = [ | 
| 224 | - $fpn->normalizeFile(__DIR__ . '/yapeal_defaults.yaml'), | |
| 225 | - $fpn->normalizeFile($dic['Yapeal.baseDir'] . 'config/yapeal.yaml') | |
| 224 | + $fpn->normalizeFile(__DIR__.'/yapeal_defaults.yaml'), | |
| 225 | + $fpn->normalizeFile($dic['Yapeal.baseDir'].'config/yapeal.yaml') | |
| 226 | 226 | ]; | 
| 227 | 227 | $vendorPos = strpos($path, 'vendor/'); | 
| 228 | 228 |          if (false !== $vendorPos) { | 
| 229 | 229 | $dic['Yapeal.vendorParentDir'] = substr($path, 0, $vendorPos); | 
| 230 | - $configFiles[] = $fpn->normalizeFile($dic['Yapeal.vendorParentDir'] . 'config/yapeal.yaml'); | |
| 230 | + $configFiles[] = $fpn->normalizeFile($dic['Yapeal.vendorParentDir'].'config/yapeal.yaml'); | |
| 231 | 231 | } | 
| 232 | 232 | $settings = []; | 
| 233 | 233 | // Process each file in turn so any substitutions are done in a more | 
| @@ -270,8 +270,8 @@ discard block | ||
| 270 | 270 | basename($subscriber, '.php') | 
| 271 | 271 | ); | 
| 272 | 272 |                  if (!isset($dic[$service])) { | 
| 273 | -                    $dic[$service] = function () use ($dic, $service) { | |
| 274 | -                        $class = '\\' . str_replace('.', '\\', $service); | |
| 273 | +                    $dic[$service] = function() use ($dic, $service) { | |
| 274 | +                        $class = '\\'.str_replace('.', '\\', $service); | |
| 275 | 275 | /** | 
| 276 | 276 | * @var \Yapeal\CommonToolsTrait $callable | 
| 277 | 277 | */ | 
| @@ -280,27 +280,27 @@ discard block | ||
| 280 | 280 | ->setPdo($dic['Yapeal.Sql.Connection']); | 
| 281 | 281 | }; | 
| 282 | 282 | } | 
| 283 | - $events = [$service . '.start' => ['startEveApi', 'last']]; | |
| 283 | + $events = [$service.'.start' => ['startEveApi', 'last']]; | |
| 284 | 284 |                  if (false === strpos($subscriber, 'Section')) { | 
| 285 | - $events[$service . '.preserve'] = ['preserveEveApi', 'last']; | |
| 285 | + $events[$service.'.preserve'] = ['preserveEveApi', 'last']; | |
| 286 | 286 | } | 
| 287 | 287 | $mediator->addServiceSubscriberByEventList($service, $events); | 
| 288 | 288 | } | 
| 289 | 289 | } | 
| 290 | 290 |          if (empty($dic['Yapeal.EveApi.Creator'])) { | 
| 291 | -            $dic['Yapeal.EveApi.Creator'] = function () use ($dic) { | |
| 291 | +            $dic['Yapeal.EveApi.Creator'] = function() use ($dic) { | |
| 292 | 292 | $loader = new \Twig_Loader_Filesystem($dic['Yapeal.EveApi.dir']); | 
| 293 | 293 | $twig = new \Twig_Environment( | 
| 294 | 294 | $loader, ['debug' => true, 'strict_variables' => true, 'autoescape' => false] | 
| 295 | 295 | ); | 
| 296 | 296 | $filter = new \Twig_SimpleFilter( | 
| 297 | -                    'ucFirst', function ($value) { | |
| 297 | +                    'ucFirst', function($value) { | |
| 298 | 298 | return ucfirst($value); | 
| 299 | 299 | } | 
| 300 | 300 | ); | 
| 301 | 301 | $twig->addFilter($filter); | 
| 302 | 302 | $filter = new \Twig_SimpleFilter( | 
| 303 | -                    'lcFirst', function ($value) { | |
| 303 | +                    'lcFirst', function($value) { | |
| 304 | 304 | return lcfirst($value); | 
| 305 | 305 | } | 
| 306 | 306 | ); | 
| @@ -123,7 +123,7 @@ discard block | ||
| 123 | 123 | */ | 
| 124 | 124 |          $statements = str_replace(array_keys($replacements), array_values($replacements), explode(';', $sqlStatements)); | 
| 125 | 125 | // 5 is a 'magic' number that I think is shorter than any legal SQL statement. | 
| 126 | -        $statements = array_filter($statements, function ($value) { | |
| 126 | +        $statements = array_filter($statements, function($value) { | |
| 127 | 127 | return 5 <= strlen(trim($value)); | 
| 128 | 128 | }); | 
| 129 | 129 | $progress = null; | 
| @@ -151,7 +151,7 @@ discard block | ||
| 151 | 151 | $progress->finish(); | 
| 152 | 152 |                      $output->writeln(''); | 
| 153 | 153 | } | 
| 154 | - $mess = $sql . PHP_EOL; | |
| 154 | + $mess = $sql.PHP_EOL; | |
| 155 | 155 | $mess .= sprintf( | 
| 156 | 156 | 'Sql failed in %1$s on statement %2$s with (%3$s) %4$s', | 
| 157 | 157 | $fileName, | 
| @@ -182,7 +182,7 @@ discard block | ||
| 182 | 182 | $dic = $this->getDic(); | 
| 183 | 183 |          foreach (['class', 'database', 'hostName', 'password', 'platform', 'tablePrefix', 'userName'] as $option) { | 
| 184 | 184 |              if (!empty($options[$option])) { | 
| 185 | - $dic[$base . $option] = $options[$option]; | |
| 185 | + $dic[$base.$option] = $options[$option]; | |
| 186 | 186 | } | 
| 187 | 187 | } | 
| 188 | 188 |          if (!empty($options['configFile'])) { |