mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
incorrect tab to space - whitespace coding standards
This commit is contained in:
parent
dd28b2396d
commit
42777b7809
10 changed files with 41 additions and 42 deletions
|
@ -114,7 +114,7 @@ if (isset($filePresent)):
|
|||
<?php
|
||||
if ($connected && $connected->isConnected()):
|
||||
echo '<span class="notice success">';
|
||||
echo __d('cake_dev', 'Cake is able to connect to the database.');
|
||||
echo __d('cake_dev', 'Cake is able to connect to the database.');
|
||||
echo '</span>';
|
||||
else:
|
||||
echo '<span class="notice">';
|
||||
|
|
|
@ -1327,7 +1327,7 @@ class DboSource extends DataSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* A more efficient way to fetch associations. Woohoo!
|
||||
* A more efficient way to fetch associations.
|
||||
*
|
||||
* @param Model $model Primary model object
|
||||
* @param string $query Association query
|
||||
|
@ -1343,8 +1343,7 @@ class DboSource extends DataSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* mergeHasMany - Merge the results of hasMany relations.
|
||||
*
|
||||
* Merge the results of hasMany relations.
|
||||
*
|
||||
* @param array $resultSet Data to merge into
|
||||
* @param array $merge Data to merge
|
||||
|
@ -1670,7 +1669,7 @@ class DboSource extends DataSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Builds and generates a JOIN statement from an array. Handles final clean-up before conversion.
|
||||
* Builds and generates a JOIN statement from an array. Handles final clean-up before conversion.
|
||||
*
|
||||
* @param array $join An array defining a JOIN statement in a query
|
||||
* @return string An SQL JOIN statement to be used in a query
|
||||
|
@ -1698,7 +1697,7 @@ class DboSource extends DataSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Builds and generates an SQL statement from an array. Handles final clean-up before conversion.
|
||||
* Builds and generates an SQL statement from an array. Handles final clean-up before conversion.
|
||||
*
|
||||
* @param array $query An array defining an SQL query
|
||||
* @param Model $model The model object which initiated the query
|
||||
|
@ -1916,7 +1915,7 @@ class DboSource extends DataSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets a list of record IDs for the given conditions. Used for multi-record updates and deletes
|
||||
* Gets a list of record IDs for the given conditions. Used for multi-record updates and deletes
|
||||
* in databases that do not support aliases in UPDATE/DELETE queries.
|
||||
*
|
||||
* @param Model $model
|
||||
|
|
|
@ -128,12 +128,12 @@ class Router {
|
|||
* @var array
|
||||
*/
|
||||
protected static $_resourceMap = array(
|
||||
array('action' => 'index', 'method' => 'GET', 'id' => false),
|
||||
array('action' => 'view', 'method' => 'GET', 'id' => true),
|
||||
array('action' => 'add', 'method' => 'POST', 'id' => false),
|
||||
array('action' => 'edit', 'method' => 'PUT', 'id' => true),
|
||||
array('action' => 'delete', 'method' => 'DELETE', 'id' => true),
|
||||
array('action' => 'edit', 'method' => 'POST', 'id' => true)
|
||||
array('action' => 'index', 'method' => 'GET', 'id' => false),
|
||||
array('action' => 'view', 'method' => 'GET', 'id' => true),
|
||||
array('action' => 'add', 'method' => 'POST', 'id' => false),
|
||||
array('action' => 'edit', 'method' => 'PUT', 'id' => true),
|
||||
array('action' => 'delete', 'method' => 'DELETE', 'id' => true),
|
||||
array('action' => 'edit', 'method' => 'POST', 'id' => true)
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
@ -3042,7 +3042,7 @@ class ModelReadTest extends BaseModelTest {
|
|||
$Apple = new Apple();
|
||||
$result = $Apple->find('threaded');
|
||||
$result = Hash::extract($result, '{n}.children');
|
||||
$expected = array(array(), array(), array(), array(), array(), array(), array());
|
||||
$expected = array(array(), array(), array(), array(), array(), array(), array());
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
|
@ -3057,7 +3057,7 @@ class ModelReadTest extends BaseModelTest {
|
|||
$Model->recursive = -1;
|
||||
$result = $Model->find('threaded');
|
||||
$result = Hash::extract($result, '{n}.children');
|
||||
$expected = array(array(), array(), array(), array(), array(), array(), array());
|
||||
$expected = array(array(), array(), array(), array(), array(), array(), array());
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$result = $Model->find('threaded', array('parent' => 'mother_id'));
|
||||
|
|
|
@ -2591,22 +2591,22 @@ class RouterTest extends CakeTestCase {
|
|||
public function testResourceMap() {
|
||||
$default = Router::resourceMap();
|
||||
$expected = array(
|
||||
array('action' => 'index', 'method' => 'GET', 'id' => false),
|
||||
array('action' => 'view', 'method' => 'GET', 'id' => true),
|
||||
array('action' => 'add', 'method' => 'POST', 'id' => false),
|
||||
array('action' => 'edit', 'method' => 'PUT', 'id' => true),
|
||||
array('action' => 'delete', 'method' => 'DELETE', 'id' => true),
|
||||
array('action' => 'edit', 'method' => 'POST', 'id' => true)
|
||||
array('action' => 'index', 'method' => 'GET', 'id' => false),
|
||||
array('action' => 'view', 'method' => 'GET', 'id' => true),
|
||||
array('action' => 'add', 'method' => 'POST', 'id' => false),
|
||||
array('action' => 'edit', 'method' => 'PUT', 'id' => true),
|
||||
array('action' => 'delete', 'method' => 'DELETE', 'id' => true),
|
||||
array('action' => 'edit', 'method' => 'POST', 'id' => true)
|
||||
);
|
||||
$this->assertEquals($default, $expected);
|
||||
|
||||
$custom = array(
|
||||
array('action' => 'index', 'method' => 'GET', 'id' => false),
|
||||
array('action' => 'view', 'method' => 'GET', 'id' => true),
|
||||
array('action' => 'add', 'method' => 'POST', 'id' => false),
|
||||
array('action' => 'edit', 'method' => 'PUT', 'id' => true),
|
||||
array('action' => 'delete', 'method' => 'DELETE', 'id' => true),
|
||||
array('action' => 'update', 'method' => 'POST', 'id' => true)
|
||||
array('action' => 'index', 'method' => 'GET', 'id' => false),
|
||||
array('action' => 'view', 'method' => 'GET', 'id' => true),
|
||||
array('action' => 'add', 'method' => 'POST', 'id' => false),
|
||||
array('action' => 'edit', 'method' => 'PUT', 'id' => true),
|
||||
array('action' => 'delete', 'method' => 'DELETE', 'id' => true),
|
||||
array('action' => 'update', 'method' => 'POST', 'id' => true)
|
||||
);
|
||||
Router::resourceMap($custom);
|
||||
$this->assertEquals(Router::resourceMap(), $custom);
|
||||
|
|
|
@ -1872,8 +1872,8 @@ class SetTest extends CakeTestCase {
|
|||
$result = Set::combine($a, '{n}.User.id', '{n}.User.Data');
|
||||
$expected = array(
|
||||
2 => array('user' => 'mariano.iglesias', 'name' => 'Mariano Iglesias'),
|
||||
14 => array('user' => 'phpnut', 'name' => 'Larry E. Masters'),
|
||||
25 => array('user' => 'gwoo', 'name' => 'The Gwoo'));
|
||||
14 => array('user' => 'phpnut', 'name' => 'Larry E. Masters'),
|
||||
25 => array('user' => 'gwoo', 'name' => 'The Gwoo'));
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$result = Set::combine($a, '{n}.User.id', '{n}.User.Data.name');
|
||||
|
|
|
@ -53,15 +53,15 @@ class AroTwoFixture extends CakeTestFixture {
|
|||
* @var array
|
||||
*/
|
||||
public $records = array(
|
||||
array('parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'root', 'lft' => '1', 'rght' => '20'),
|
||||
array('parent_id' => 1, 'model' => 'Group', 'foreign_key' => '1', 'alias' => 'admin', 'lft' => '2', 'rght' => '5'),
|
||||
array('parent_id' => 1, 'model' => 'Group', 'foreign_key' => '2', 'alias' => 'managers', 'lft' => '6', 'rght' => '9'),
|
||||
array('parent_id' => 1, 'model' => 'Group', 'foreign_key' => '3', 'alias' => 'users', 'lft' => '10', 'rght' => '19'),
|
||||
array('parent_id' => 2, 'model' => 'User', 'foreign_key' => '1', 'alias' => 'Bobs', 'lft' => '3', 'rght' => '4'),
|
||||
array('parent_id' => 3, 'model' => 'User', 'foreign_key' => '2', 'alias' => 'Lumbergh', 'lft' => '7' , 'rght' => '8'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '3', 'alias' => 'Samir', 'lft' => '11' , 'rght' => '12'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '4', 'alias' => 'Micheal', 'lft' => '13', 'rght' => '14'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '5', 'alias' => 'Peter', 'lft' => '15', 'rght' => '16'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '6', 'alias' => 'Milton', 'lft' => '17', 'rght' => '18'),
|
||||
array('parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'root', 'lft' => '1', 'rght' => '20'),
|
||||
array('parent_id' => 1, 'model' => 'Group', 'foreign_key' => '1', 'alias' => 'admin', 'lft' => '2', 'rght' => '5'),
|
||||
array('parent_id' => 1, 'model' => 'Group', 'foreign_key' => '2', 'alias' => 'managers', 'lft' => '6', 'rght' => '9'),
|
||||
array('parent_id' => 1, 'model' => 'Group', 'foreign_key' => '3', 'alias' => 'users', 'lft' => '10', 'rght' => '19'),
|
||||
array('parent_id' => 2, 'model' => 'User', 'foreign_key' => '1', 'alias' => 'Bobs', 'lft' => '3', 'rght' => '4'),
|
||||
array('parent_id' => 3, 'model' => 'User', 'foreign_key' => '2', 'alias' => 'Lumbergh', 'lft' => '7' , 'rght' => '8'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '3', 'alias' => 'Samir', 'lft' => '11' , 'rght' => '12'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '4', 'alias' => 'Micheal', 'lft' => '13', 'rght' => '14'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '5', 'alias' => 'Peter', 'lft' => '15', 'rght' => '16'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '6', 'alias' => 'Milton', 'lft' => '17', 'rght' => '18'),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<body>
|
||||
<!--nocache--><?php $x++; ?><!--/nocache-->
|
||||
<!--nocache--><?php $x++; ?><!--/nocache-->
|
||||
<?php echo $content_for_layout; ?>
|
||||
<?php echo $content_for_layout; ?>
|
||||
<!--nocache--><?php echo 'cached count is: ' . $x; ?><!--/nocache-->
|
||||
</body>
|
||||
</html>
|
|
@ -60,7 +60,7 @@ if (isset($filePresent)):
|
|||
<?php
|
||||
if ($connected && $connected->isConnected()):
|
||||
echo '<span class="notice success">';
|
||||
echo __d('cake_dev', 'Cake is able to connect to the database.');
|
||||
echo __d('cake_dev', 'Cake is able to connect to the database.');
|
||||
echo '</span>';
|
||||
else:
|
||||
echo '<span class="notice">';
|
||||
|
|
|
@ -67,7 +67,7 @@ if (!empty($filePresent)):
|
|||
<span class="notice">
|
||||
<?php echo __d('cake', 'Cake');
|
||||
if ($connected->isConnected()):
|
||||
__d('cake', ' is able to ');
|
||||
__d('cake', ' is able to ');
|
||||
else:
|
||||
__d('cake', ' is NOT able to ');
|
||||
endif;
|
||||
|
|
Loading…
Reference in a new issue