Completed
Push — 3.x-dev-kit ( cc4dbe )
by
unknown
03:15
created

MessageManagerMessageIterator   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 3
c 2
b 0
f 1
lcom 0
cbo 2
dl 0
loc 27
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getBuffer() 0 4 1
A __construct() 0 8 1
A _bufferize() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Sonata Project package.
5
 *
6
 * (c) Thomas Rabaix <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sonata\NotificationBundle\Tests\Iterator;
13
14
use Doctrine\Common\Persistence\ManagerRegistry;
15
use Sonata\NotificationBundle\Iterator\MessageManagerMessageIterator as Iterator;
16
use Sonata\NotificationBundle\Tests\Entity\MessageManagerMock;
17
18
/**
19
 * @author Kevin Nedelec <[email protected]>
20
 *
21
 * Class MessageManagerMessageIterator
22
 */
23
class MessageManagerMessageIterator extends Iterator
24
{
25
    public function __construct(ManagerRegistry $registry, $pause = 0, $batchSize = 10)
26
    {
27
        parent::__construct(
28
            new MessageManagerMock('Sonata\NotificationBundle\Model\Message', $registry),
29
            array(),
30
            $pause,
31
            $batchSize);
32
    }
33
34
    /**
35
     * @param array $types
36
     */
37
    public function _bufferize($types = array())
38
    {
39
        $this->bufferize($types);
40
    }
41
42
    /**
43
     * @return array
44
     */
45
    public function getBuffer()
46
    {
47
        return $this->buffer;
48
    }
49
}
50