Skip to content

Commit

Permalink
QA: Misc. Fixes
Browse files Browse the repository at this point in the history
Mostly whitespace and line-length fixes, also cleaning up some newlines at the end of some files.
  • Loading branch information
daschl committed Aug 4, 2011
1 parent 73be5ea commit 1281928
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 16 deletions.
4 changes: 2 additions & 2 deletions analysis/Debugger.php
Expand Up @@ -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
*/
Expand Down
4 changes: 2 additions & 2 deletions core/StaticObject.php
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion data/Entity.php
Expand Up @@ -392,4 +392,4 @@ public function to($format, array $options = array()) {
}
}

?>
?>
3 changes: 2 additions & 1 deletion net/http/Response.php
Expand Up @@ -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]);
Expand Down
8 changes: 4 additions & 4 deletions tests/cases/core/EnvironmentTest.php
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion tests/cases/util/SetTest.php
Expand Up @@ -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));
}
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/net/SocketTest.php
Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions tests/mocks/core/MockRequest.php
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion util/Set.php
Expand Up @@ -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)) {
Expand Down

0 comments on commit 1281928

Please sign in to comment.