Passed
Push — feature/v4 ( e5e380...dac4aa )
by Samuel
11:37
created

ApiHelper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 3
c 0
b 0
f 0
dl 0
loc 7
ccs 0
cts 3
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Ivory Google Map package.
7
 *
8
 * (c) Eric GELOEN <[email protected]>
9
 *
10
 * For the full copyright and license information, please read the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Ivory\GoogleMap\Helper;
15
16
use Ivory\GoogleMap\Helper\Event\ApiEvent;
17
use Ivory\GoogleMap\Helper\Event\ApiEvents;
18
19
class ApiHelper extends AbstractHelper
20
{
21
    public function render(array $objects): string
22
    {
23
        $this->getEventDispatcher()->dispatch($event = new ApiEvent($objects), ApiEvents::JAVASCRIPT);
24
25
        return $event->getCode();
26
    }
27
}
28