mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fixed some formatting
This commit is contained in:
parent
d7dab3282f
commit
f5daf1c8aa
2 changed files with 10 additions and 8 deletions
|
@ -7984,17 +7984,17 @@ class ModelReadTest extends BaseModelTest {
|
|||
'foreignKey' => 'something_id'
|
||||
)
|
||||
),
|
||||
'hasOne'=>array(
|
||||
'HasOne'=>array(
|
||||
'hasOne' => array(
|
||||
'HasOne' => array(
|
||||
'className' => 'JoinThing',
|
||||
'foreignKey' => 'something_id'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$results = $Something->find('all');
|
||||
|
||||
|
||||
$expected = array(
|
||||
array(
|
||||
'Something' => array(
|
||||
|
@ -8142,13 +8142,13 @@ class ModelReadTest extends BaseModelTest {
|
|||
|
||||
$JoinThing = new JoinThing();
|
||||
$JoinThing->unbindModel(array(
|
||||
'belongsTo'=>array(
|
||||
'belongsTo' => array(
|
||||
'Something'
|
||||
)
|
||||
)
|
||||
);
|
||||
$results = $JoinThing->find('all');
|
||||
|
||||
|
||||
$expected = array(
|
||||
array(
|
||||
'JoinThing' => array(
|
||||
|
|
|
@ -1511,12 +1511,13 @@ class SomethingElse extends CakeTestModel {
|
|||
*/
|
||||
public function afterFind($results, $primary = false) {
|
||||
foreach ($results as $key => $result) {
|
||||
if(!empty($result[$this->alias]) && is_array($result[$this->alias])){
|
||||
if (!empty($result[$this->alias]) && is_array($result[$this->alias])) {
|
||||
$results[$key][$this->alias]['afterFind'] = 'Successfuly added by AfterFind';
|
||||
}
|
||||
}
|
||||
return $results;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1549,12 +1550,13 @@ class JoinThing extends CakeTestModel {
|
|||
*/
|
||||
public function afterFind($results, $primary = false) {
|
||||
foreach ($results as $key => $result) {
|
||||
if(!empty($result[$this->alias]) && is_array($result[$this->alias])){
|
||||
if( !empty($result[$this->alias]) && is_array($result[$this->alias])) {
|
||||
$results[$key][$this->alias]['afterFind'] = 'Successfuly added by AfterFind';
|
||||
}
|
||||
}
|
||||
return $results;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue