@@ -28,7 +28,7 @@ |
||
| 28 | 28 | // The templates for showing exceptions are outside of the normal application |
| 29 | 29 | // template path. It is therefore necessary to specify the path here. |
| 30 | 30 | $this->get('php_template_engine')->addPath( |
| 31 | - __DIR__ . '/../Resources/ListenersDebug' |
|
| 31 | + __DIR__.'/../Resources/ListenersDebug' |
|
| 32 | 32 | ); |
| 33 | 33 | |
| 34 | 34 | // Render the template |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | { |
| 38 | 38 | return new self( |
| 39 | 39 | sprintf( |
| 40 | - 'The controller action method %s for controller %s must return an instance of Veto\\Http\\Response. ' . |
|
| 40 | + 'The controller action method %s for controller %s must return an instance of Veto\\Http\\Response. '. |
|
| 41 | 41 | 'A %s was returned instead.', |
| 42 | 42 | $method, |
| 43 | 43 | $controller, |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | { |
| 76 | 76 | // Validate the rules |
| 77 | 77 | foreach ($rules as $parameter => $rule) { |
| 78 | - if (@preg_match('@' . $rule . '@', null) === false) { |
|
| 78 | + if (@preg_match('@'.$rule.'@', null) === false) { |
|
| 79 | 79 | throw new \InvalidArgumentException( |
| 80 | 80 | sprintf('Rule for parameter %s of route %s is not a valid regex string.', $name, $parameter) |
| 81 | 81 | ); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | foreach ($placeholders[1] as $placeholder) { |
| 117 | 117 | $targetRegexes[] = '@{[A-Za-z_]+}@'; |
| 118 | 118 | $replacementRegexes[] = |
| 119 | - array_key_exists($placeholder, $this->rules) ? '(' . $this->rules[$placeholder] . ')' : '([^/]+)'; |
|
| 119 | + array_key_exists($placeholder, $this->rules) ? '('.$this->rules[$placeholder].')' : '([^/]+)'; |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | // Convert all {...} blocks into regex groups |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | $placeholders = $placeholders[1]; |
| 127 | 127 | |
| 128 | 128 | // See if the route matches |
| 129 | - if (preg_match('@^' . $pattern . '$@', $request->getUri()->getPath(), $matches)) { |
|
| 129 | + if (preg_match('@^'.$pattern.'$@', $request->getUri()->getPath(), $matches)) { |
|
| 130 | 130 | // Merge the placeholder names with their URI values |
| 131 | 131 | array_shift($matches); |
| 132 | 132 | return array_combine($placeholders, $matches); |
@@ -157,13 +157,13 @@ discard block |
||
| 157 | 157 | |
| 158 | 158 | if (!array_key_exists($placeholder, $parameters)) { |
| 159 | 159 | throw new \Exception( |
| 160 | - 'Parameter "' . $placeholder . '" must be specified to ' . |
|
| 161 | - 'generate URL for route "' . $this->name . '"' |
|
| 160 | + 'Parameter "'.$placeholder.'" must be specified to '. |
|
| 161 | + 'generate URL for route "'.$this->name.'"' |
|
| 162 | 162 | ); |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | // Replace it with the value from the array |
| 166 | - $url = str_replace('{' . $placeholder . '}', $parameters[$placeholder], $url); |
|
| 166 | + $url = str_replace('{'.$placeholder.'}', $parameters[$placeholder], $url); |
|
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | return $url; |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | // Enforce the type of $layer |
| 41 | 41 | if (!($layer instanceof InboundLayerInterface || $layer instanceof OutboundLayerInterface)) { |
| 42 | 42 | throw new \InvalidArgumentException( |
| 43 | - 'Argument 1 of ' . __CLASS__ . '::' . __METHOD__ . |
|
| 43 | + 'Argument 1 of '.__CLASS__.'::'.__METHOD__. |
|
| 44 | 44 | ' must be either an InboundLayerInterface or an OutboundLayerInterface instance.' |
| 45 | 45 | ); |
| 46 | 46 | } |
@@ -70,8 +70,8 @@ discard block |
||
| 70 | 70 | // By the end of the inbound layer list, a response should have been obtained |
| 71 | 71 | if (!$response instanceof Response) { |
| 72 | 72 | throw new \RuntimeException( |
| 73 | - 'At least one inbound layer must produce a Response instance. ' . |
|
| 74 | - 'The final processed layer returned a "' . gettype($response) . '".' |
|
| 73 | + 'At least one inbound layer must produce a Response instance. '. |
|
| 74 | + 'The final processed layer returned a "'.gettype($response).'".' |
|
| 75 | 75 | ); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -104,8 +104,8 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | if (!$result instanceof Request) { |
| 106 | 106 | throw new \RuntimeException( |
| 107 | - 'Each inbound layer of the chain must produce a Request or Response type. ' . |
|
| 108 | - 'The "' . $layerName . '" layer returned ' . gettype($request) . '.' |
|
| 107 | + 'Each inbound layer of the chain must produce a Request or Response type. '. |
|
| 108 | + 'The "'.$layerName.'" layer returned '.gettype($request).'.' |
|
| 109 | 109 | ); |
| 110 | 110 | } |
| 111 | 111 | } |
@@ -133,8 +133,8 @@ discard block |
||
| 133 | 133 | |
| 134 | 134 | if (!$result instanceof Response) { |
| 135 | 135 | throw new \RuntimeException( |
| 136 | - 'Each outbound layer of the chain must produce a Response type. ' . |
|
| 137 | - 'The "' . $layerName . '" layer returned ' . gettype($response) . '.' |
|
| 136 | + 'Each outbound layer of the chain must produce a Response type. '. |
|
| 137 | + 'The "'.$layerName.'" layer returned '.gettype($response).'.' |
|
| 138 | 138 | ); |
| 139 | 139 | } |
| 140 | 140 | } |
@@ -51,11 +51,11 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | // Load the base configuration |
| 53 | 53 | $baseConfig = new Hive(); |
| 54 | - $baseConfig->load(dirname(__DIR__) . '/config/base.yml'); |
|
| 54 | + $baseConfig->load(dirname(__DIR__).'/config/base.yml'); |
|
| 55 | 55 | |
| 56 | 56 | // Load the debug configuration if this application will start in Debug mode |
| 57 | 57 | if ($this->debug) { |
| 58 | - $baseConfig->load(dirname(__DIR__) . '/config/debug.yml'); |
|
| 58 | + $baseConfig->load(dirname(__DIR__).'/config/debug.yml'); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | // Merge the actual config onto the base config |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | if (isset($element['class'])) { |
| 108 | 108 | |
| 109 | 109 | // This is a service definition |
| 110 | - $definition = Definition::initWithArray($namespace . ($namespace ? '.' : '') . $name, $element); |
|
| 110 | + $definition = Definition::initWithArray($namespace.($namespace ? '.' : '').$name, $element); |
|
| 111 | 111 | $this->container->define($definition); |
| 112 | 112 | |
| 113 | 113 | } else { |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | // This is an array of services in a namespace |
| 116 | 116 | $this->registerServices( |
| 117 | 117 | $element, |
| 118 | - $namespace . ($namespace ? '.' : '') . $name |
|
| 118 | + $namespace.($namespace ? '.' : '').$name |
|
| 119 | 119 | ); |
| 120 | 120 | |
| 121 | 121 | } |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | public function render($templateName, array $parameters = array()) |
| 59 | 59 | { |
| 60 | 60 | foreach ($this->paths as $path) { |
| 61 | - $fullPath = $path . DIRECTORY_SEPARATOR . $templateName; |
|
| 61 | + $fullPath = $path.DIRECTORY_SEPARATOR.$templateName; |
|
| 62 | 62 | if (file_exists($fullPath)) { |
| 63 | 63 | extract($parameters, EXTR_SKIP); |
| 64 | 64 | ob_start(); |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | public function get($serviceName) |
| 99 | 99 | { |
| 100 | 100 | if (!$this->isDefined($serviceName)) { |
| 101 | - throw new \RuntimeException('The service name "' . $serviceName . '" is not defined.'); |
|
| 101 | + throw new \RuntimeException('The service name "'.$serviceName.'" is not defined.'); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | // Retrieve the definition |
@@ -139,8 +139,8 @@ |
||
| 139 | 139 | ); |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | - foreach($config['@import'] as $importPath) { |
|
| 143 | - $importPath = dirname($basePath) . '/' . $importPath; |
|
| 142 | + foreach ($config['@import'] as $importPath) { |
|
| 143 | + $importPath = dirname($basePath).'/'.$importPath; |
|
| 144 | 144 | |
| 145 | 145 | if (!file_exists($importPath)) { |
| 146 | 146 | throw ConfigurationException::missingImportedFile( |