Skip to content

Commit

Permalink
Fix phpcs.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Feb 27, 2017
1 parent 9df275c commit ffc7707
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/ORM/Association/DependentDeleteTrait.php
Expand Up @@ -39,6 +39,7 @@ trait DependentDeleteTrait
public function cascadeDelete(EntityInterface $entity, array $options = [])
{
$helper = new DependentDeleteHelper();

return $helper->cascadeDelete($this, $entity, $options);
}
}
1 change: 1 addition & 0 deletions src/ORM/Association/HasMany.php
Expand Up @@ -661,6 +661,7 @@ public function eagerLoader(array $options)
public function cascadeDelete(EntityInterface $entity, array $options = [])
{
$helper = new DependentDeleteHelper();

return $helper->cascadeDelete($this, $entity, $options);
}
}
1 change: 1 addition & 0 deletions src/ORM/Association/HasOne.php
Expand Up @@ -150,6 +150,7 @@ public function eagerLoader(array $options)
public function cascadeDelete(EntityInterface $entity, array $options = [])
{
$helper = new DependentDeleteHelper();

return $helper->cascadeDelete($this, $entity, $options);
}
}
7 changes: 4 additions & 3 deletions tests/TestCase/ORM/Association/HasOneTest.php
Expand Up @@ -284,7 +284,7 @@ public function testAttachToBeforeFind()
$query = $this->user->query();

$this->listenerCalled = false;
$this->profile->eventManager()->on('Model.beforeFind', function($event, $query, $options, $primary) {
$this->profile->eventManager()->on('Model.beforeFind', function ($event, $query, $options, $primary) {
$this->listenerCalled = true;
$this->assertInstanceOf('\Cake\Event\Event', $event);
$this->assertInstanceOf('\Cake\ORM\Query', $query);
Expand Down Expand Up @@ -313,13 +313,14 @@ public function testAttachToBeforeFindExtraOptions()
$opts = new \ArrayObject(['something' => 'more']);
$this->profile->eventManager()->on(
'Model.beforeFind',
function ($event, $query, $options, $primary) use ($opts) {
function ($event, $query, $options, $primary) use ($opts) {
$this->listenerCalled = true;
$this->assertInstanceOf('\Cake\Event\Event', $event);
$this->assertInstanceOf('\Cake\ORM\Query', $query);
$this->assertEquals($options, $opts);
$this->assertFalse($primary);
});
}
);
$association = new HasOne('Profiles', $config);
$query = $this->user->find();
$association->attachTo($query, ['queryBuilder' => function ($q) {
Expand Down

0 comments on commit ffc7707

Please sign in to comment.