Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit c5f5228

Browse files
committed
CS fixes in Zend_Application
1 parent 82aca66 commit c5f5228

File tree

1 file changed

+30
-9
lines changed

1 file changed

+30
-9
lines changed

library/Zend/Application.php

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ public function __construct($environment, $options = null)
8686
} elseif ($options instanceof Zend_Config) {
8787
$options = $options->toArray();
8888
} elseif (!is_array($options)) {
89-
throw new Zend_Application_Exception('Invalid options provided; must be location of config file, a config object, or an array');
89+
throw new Zend_Application_Exception(
90+
'Invalid options provided; must be location of config file,'
91+
. ' a config object, or an array'
92+
);
9093
}
9194

9295
$this->setOptions($options);
@@ -127,11 +130,15 @@ public function setOptions(array $options)
127130
if (is_array($options['config'])) {
128131
$_options = array();
129132
foreach ($options['config'] as $tmp) {
130-
$_options = $this->mergeOptions($_options, $this->_loadConfig($tmp));
133+
$_options = $this->mergeOptions(
134+
$_options, $this->_loadConfig($tmp)
135+
);
131136
}
132137
$options = $this->mergeOptions($_options, $options);
133138
} else {
134-
$options = $this->mergeOptions($this->_loadConfig($options['config']), $options);
139+
$options = $this->mergeOptions(
140+
$this->_loadConfig($options['config']), $options
141+
);
135142
}
136143
}
137144

@@ -171,7 +178,9 @@ public function setOptions(array $options)
171178
$this->setBootstrap($bootstrap);
172179
} elseif (is_array($bootstrap)) {
173180
if (empty($bootstrap['path'])) {
174-
throw new Zend_Application_Exception('No bootstrap path provided');
181+
throw new Zend_Application_Exception(
182+
'No bootstrap path provided'
183+
);
175184
}
176185

177186
$path = $bootstrap['path'];
@@ -183,7 +192,9 @@ public function setOptions(array $options)
183192

184193
$this->setBootstrap($path, $class);
185194
} else {
186-
throw new Zend_Application_Exception('Invalid bootstrap information provided');
195+
throw new Zend_Application_Exception(
196+
'Invalid bootstrap information provided'
197+
);
187198
}
188199
}
189200

@@ -319,13 +330,18 @@ public function setBootstrap($path, $class = null)
319330
if (!class_exists($class, false)) {
320331
require_once $path;
321332
if (!class_exists($class, false)) {
322-
throw new Zend_Application_Exception('Bootstrap class not found');
333+
throw new Zend_Application_Exception(
334+
'Bootstrap class not found'
335+
);
323336
}
324337
}
325338
$this->_bootstrap = new $class($this);
326339

327340
if (!$this->_bootstrap instanceof Zend_Application_Bootstrap_Bootstrapper) {
328-
throw new Zend_Application_Exception('Bootstrap class does not implement Zend_Application_Bootstrap_Bootstrapper');
341+
throw new Zend_Application_Exception(
342+
'Bootstrap class does not implement'
343+
. ' Zend_Application_Bootstrap_Bootstrapper'
344+
);
329345
}
330346

331347
return $this;
@@ -403,13 +419,18 @@ protected function _loadConfig($file)
403419
case 'inc':
404420
$config = include $file;
405421
if (!is_array($config)) {
406-
throw new Zend_Application_Exception('Invalid configuration file provided; PHP file does not return array value');
422+
throw new Zend_Application_Exception(
423+
'Invalid configuration file provided; PHP file does not'
424+
. ' return array value'
425+
);
407426
}
408427
return $config;
409428
break;
410429

411430
default:
412-
throw new Zend_Application_Exception('Invalid configuration file provided; unknown config type');
431+
throw new Zend_Application_Exception(
432+
'Invalid configuration file provided; unknown config type'
433+
);
413434
}
414435

415436
return $config->toArray();

0 commit comments

Comments
 (0)