Completed
Pull Request — master (#21)
by Daniel
03:53 queued 01:13
created

DeleteAction::configureOptions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
namespace Psi\Component\Grid\Action;
4
5
use Psi\Component\Grid\ActionInterface;
6
use Psi\Component\ObjectAgent\AgentInterface;
7
use Symfony\Component\OptionsResolver\OptionsResolver;
8
9
class DeleteAction implements ActionInterface
10
{
11
    public function perform(AgentInterface $agent, \Traversable $collection, array $options)
12
    {
13
        foreach ($collection as $object) {
14
            $agent->remove($object);
0 ignored issues
show
Bug introduced by
The method remove() does not seem to exist on object<Psi\Component\ObjectAgent\AgentInterface>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
15
        }
16
17
        $agent->flush();
0 ignored issues
show
Bug introduced by
The method flush() does not seem to exist on object<Psi\Component\ObjectAgent\AgentInterface>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
18
    }
19
20
    public function configureOptions(OptionsResolver $options)
21
    {
22
    }
23
}
24