Browse Source

address casting cs

euromark 12 years ago
parent
commit
e3a3946e89

+ 1 - 1
lib/Cake/Controller/Component/AuthComponent.php

@@ -812,7 +812,7 @@ class AuthComponent extends Component {
  * @return boolean true if the user is logged in, false otherwise
  */
 	public function loggedIn() {
-		return (boolean)$this->user();
+		return (bool)$this->user();
 	}
 
 /**

+ 1 - 1
lib/Cake/Test/Case/BasicsTest.php

@@ -278,7 +278,7 @@ class BasicsTest extends CakeTestCase {
 
 		Configure::write('Cache.disable', false);
 		$result = cache('basics_test', 'simple cache write');
-		$this->assertTrue((boolean)$result);
+		$this->assertTrue((bool)$result);
 		$this->assertTrue(file_exists(CACHE . 'basics_test'));
 
 		$result = cache('basics_test');

+ 1 - 1
lib/Cake/Test/Case/Model/ModelWriteTest.php

@@ -7144,7 +7144,7 @@ class ModelWriteTest extends BaseModelTest {
 		$TestModel = new Item();
 
 		$result = $TestModel->save(array('published' => true, 'id' => 1));
-		$this->assertTrue((boolean)$result);
+		$this->assertTrue((bool)$result);
 		$result = $TestModel->find('first', array(
 			'fields' => array('id', 'published'),
 			'conditions' => array('Item.id' => 1)));

+ 1 - 1
lib/Cake/Utility/Validation.php

@@ -497,7 +497,7 @@ class Validation {
 		if ($type === 'ipv6') {
 			$flags = FILTER_FLAG_IPV6;
 		}
-		return (boolean)filter_var($check, FILTER_VALIDATE_IP, array('flags' => $flags));
+		return (bool)filter_var($check, FILTER_VALIDATE_IP, array('flags' => $flags));
 	}
 
 /**