1 | <?php |
||
7 | class Collection extends \ArrayIterator |
||
8 | { |
||
9 | 5 | public function __construct($files = array(), ContainerInterface $container = null) |
|
19 | |||
20 | 1 | public function clear() |
|
21 | { |
||
22 | 1 | foreach ($this as $file) { |
|
23 | /* @var $file \Sirius\Upload\Result\File */ |
||
24 | 1 | $file->clear(); |
|
25 | 1 | } |
|
26 | 1 | } |
|
27 | |||
28 | 2 | public function confirm() |
|
29 | { |
||
30 | 2 | foreach ($this as $file) { |
|
31 | /* @var $file \Sirius\Upload\Result\File */ |
||
32 | 2 | $file->confirm(); |
|
33 | 2 | } |
|
34 | 2 | } |
|
35 | |||
36 | 2 | public function isValid() |
|
46 | |||
47 | 2 | public function getMessages() |
|
57 | |||
58 | } |
||
59 |
It seems like you allow that null is being passed for a parameter, however the function which is called does not seem to accept null.
We recommend to add an additional type check (or disallow null for the parameter):