Permalink
Browse files

QA: Misc. Fixes

Mostly whitespace and line-length fixes, also cleaning up some newlines at the end of some files.
  • Loading branch information...
1 parent 73be5ea commit 1281928b2f1a132b6b674e78488bea850aa56ad0 @daschl daschl committed Aug 4, 2011
@@ -17,10 +17,10 @@
* state of an application in its current context.
*/
class Debugger extends \lithium\core\Object {
-
+
/**
* Used for temporary closure caching.
- *
+ *
* @see lithium\analysis\Debugger::_closureDef()
* @var array
*/
@@ -56,8 +56,8 @@ public static function applyFilter($method, $filter = null) {
/**
* Calls a method on this object with the given parameters. Provides an OO wrapper for
- * `forward_static_call_array()`, and improves performance by using straight method calls in most
- * cases.
+ * `forward_static_call_array()`, and improves performance by using straight method calls
+ * in most cases.
*
* @param string $method Name of the method to call.
* @param array $params Parameter list to use when calling `$method`.
View
@@ -392,4 +392,4 @@ public function to($format, array $options = array()) {
}
}
-?>
+?>
@@ -104,7 +104,8 @@ protected function _init() {
$this->body = $this->_parseMessage($this->_config['message']);
}
if (isset($this->headers['Content-Type'])) {
- preg_match('/([-\w\/+]+)(;\s*?charset=(.+))?/i', $this->headers['Content-Type'], $match);
+ $pattern = '/([-\w\/+]+)(;\s*?charset=(.+))?/i';
+ preg_match($pattern, $this->headers['Content-Type'], $match);
if (isset($match[1])) {
$this->type = trim($match[1]);
@@ -94,22 +94,22 @@ public function testEnvironmentDetection() {
Environment::set($request);
$isProduction = Environment::is('production'); // returns true if not running locally
$this->assertTrue($isProduction);
-
+
$request = new MockRequest(array('SERVER_ADDR' => '::1'));
$request->url = 'test/myTest';
Environment::set($request);
$this->assertTrue(Environment::is('test'));
-
+
$request = new MockRequest();
$request->argv = array(0 => 'test');
Environment::set($request);
$this->assertTrue(Environment::is('test'));
-
+
$request = new MockRequest();
$request->argv = array(0 => 'something');
Environment::set($request);
$this->assertTrue(Environment::is('development'));
-
+
$request = new MockRequest();
$request->params = array('env' => 'production');
Environment::set($request);
@@ -825,7 +825,7 @@ public function testIsNumericArrayCheck() {
$data = array('one', 2 => 'two', 3 => 'three', 4 => 'four', 'a' => 'five');
$this->assertFalse(Set::isNumeric(array_keys($data)));
-
+
$data = array();
$this->assertNull(Set::isNumeric($data));
}
@@ -48,7 +48,7 @@ public function testContextAdapter() {
public function testCurlAdapter() {
$message = 'Your PHP installation was not compiled with curl support.';
$this->skipIf(!function_exists('curl_init'), $message);
-
+
$socket = new Curl($this->_testConfig);
$this->assertTrue($socket->open());
$response = $socket->send();
@@ -9,11 +9,11 @@
namespace lithium\tests\mocks\core;
class MockRequest extends \lithium\core\Object {
-
+
public $url = null;
-
+
public $params = array();
-
+
public $argv = array();
public function env($key) {
View
@@ -542,7 +542,8 @@ public static function insert($list, $path, $data = array()) {
* Checks to see if all the values in the array are numeric.
*
* @param array $array The array to check. If null, the value of the current Set object.
- * @return mixed `true` if values are numeric, `false` if not and `null` if the array to check is empty.
+ * @return mixed `true` if values are numeric, `false` if not and `null` if the array to
+ * check is empty.
*/
public static function isNumeric($array = null) {
if (empty($array)) {

0 comments on commit 1281928

Please sign in to comment.