@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | $this->config = $config; |
| 61 | 61 | |
| 62 | - if (! $this->config->hasKey($element)) { |
|
| 62 | + if ( ! $this->config->hasKey($element)) { |
|
| 63 | 63 | throw new FailedToInstantiateFactoryException(sprintf( |
| 64 | 64 | 'Could not instantiate Factory for unknown Element Type "%1$s".', |
| 65 | 65 | $element |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | $classMap = $this->config[$this->element]; |
| 87 | 87 | |
| 88 | - if (! array_key_exists($type, $classMap)) { |
|
| 88 | + if ( ! array_key_exists($type, $classMap)) { |
|
| 89 | 89 | throw new FailedToInstantiateClassException(sprintf( |
| 90 | 90 | 'Could not create object, unknown Type "%1$s" for "%2$s" elements.', |
| 91 | 91 | $type, |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | class ChainMail |
| 27 | 27 | { |
| 28 | 28 | |
| 29 | - const DEFAULT_CONFIG = __DIR__ . '/../config/defaults.php'; |
|
| 29 | + const DEFAULT_CONFIG = __DIR__.'/../config/defaults.php'; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Configuration Settings. |
@@ -49,15 +49,15 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | $defaults = ConfigFactory::create(include(self::DEFAULT_CONFIG)); |
| 51 | 51 | |
| 52 | - if (! $config) { |
|
| 52 | + if ( ! $config) { |
|
| 53 | 53 | $this->config = $defaults; |
| 54 | 54 | |
| 55 | 55 | return; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | $this->config = ConfigFactory::create(array_merge( |
| 59 | - (array)$defaults, |
|
| 60 | - (array)$config) |
|
| 59 | + (array) $defaults, |
|
| 60 | + (array) $config) |
|
| 61 | 61 | ); |
| 62 | 62 | } |
| 63 | 63 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * specific view to be rendered. |
| 23 | 23 | */ |
| 24 | 24 | 'view_root_locations' => [ |
| 25 | - 'default' => realpath( __DIR__ . '/../views' ), |
|
| 25 | + 'default' => realpath(__DIR__.'/../views'), |
|
| 26 | 26 | ], |
| 27 | 27 | |
| 28 | 28 | /* |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | 'Initialised section without passing it a section name.' |
| 114 | 114 | ); |
| 115 | 115 | } |
| 116 | - if (! array_key_exists($section, $this->config['sections'])) { |
|
| 116 | + if ( ! array_key_exists($section, $this->config['sections'])) { |
|
| 117 | 117 | throw new FailedToInitialiseSectionException( |
| 118 | 118 | 'Initialised section with an unknown section name.' |
| 119 | 119 | ); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | protected function getViewName(array $context) |
| 156 | 156 | { |
| 157 | 157 | return $this->config['sections'][$this->getSectionName()]['view_name'] |
| 158 | - . '.' . $context['format']; |
|
| 158 | + . '.'.$context['format']; |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | /** |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | public function getTemplate() |
| 117 | 117 | { |
| 118 | 118 | |
| 119 | - if (! $this->template) { |
|
| 119 | + if ( ! $this->template) { |
|
| 120 | 120 | $this->setDefaultTemplate(); |
| 121 | 121 | } |
| 122 | 122 | |
@@ -152,10 +152,10 @@ discard block |
||
| 152 | 152 | ); |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - if (! $template instanceof TemplateInterface) { |
|
| 155 | + if ( ! $template instanceof TemplateInterface) { |
|
| 156 | 156 | throw new InvalidTemplateException( |
| 157 | 157 | 'Could not set the template, invalid type.', |
| 158 | - (array)$template |
|
| 158 | + (array) $template |
|
| 159 | 159 | ); |
| 160 | 160 | } |
| 161 | 161 | $this->template = $template; |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | if (null === $template) { |
| 102 | 102 | throw new FailedToInitialiseTemplateException('Initialised template without passing it a template name.'); |
| 103 | 103 | } |
| 104 | - if (! array_key_exists($template, $this->config['templates'])) { |
|
| 104 | + if ( ! array_key_exists($template, $this->config['templates'])) { |
|
| 105 | 105 | throw new FailedToInitialiseTemplateException('Initialised template with an unknown template name.'); |
| 106 | 106 | } |
| 107 | 107 | $this->templateName = $template; |
@@ -155,6 +155,6 @@ discard block |
||
| 155 | 155 | protected function getViewName(array $context) |
| 156 | 156 | { |
| 157 | 157 | return $this->config['templates'][$this->getTemplateName()]['view_name'] |
| 158 | - . '.' . $context['format']; |
|
| 158 | + . '.'.$context['format']; |
|
| 159 | 159 | } |
| 160 | 160 | } |