mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
address casting cs
This commit is contained in:
parent
12f2f729c8
commit
e3a3946e89
4 changed files with 4 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue