Completed
Push — master ( f7d051...7cf7a4 )
by Sébastien
03:48
created

JasperFillManager   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
dl 0
loc 28
c 0
b 0
f 0
wmc 3
lcom 1
cbo 2
ccs 6
cts 8
cp 0.75
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A fillReport() 0 4 1
A getJavaProxiedObject() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Soluble\Jasper\Proxy\V6;
6
7
use Soluble\Japha\Interfaces\JavaObject;
8
use Soluble\Japha\Bridge\Adapter as BridgeAdapter;
9
use Soluble\Jasper\Proxy\RemoteJavaObjectProxyInterface;
10
11
class JasperFillManager implements RemoteJavaObjectProxyInterface
12
{
13
    /**
14
     * @var BridgeAdapter
15
     */
16
    protected $ba;
17
18
    /**
19
     * @var \Soluble\Japha\Interfaces\JavaObject
20
     */
21
    protected $jasperFillManager;
22
23 1
    public function __construct(BridgeAdapter $bridgeAdapter)
24
    {
25 1
        $this->ba = $bridgeAdapter;
26 1
        $this->jasperFillManager = $this->ba->java('net.sf.jasperreports.engine.JasperFillManager');
27 1
    }
28
29 1
    public function fillReport($compiled, $params, JRDataSourceInterface $datasource)
30
    {
31 1
        return $this->jasperFillManager->fillReport($compiled, $params, $datasource->getJavaProxiedObject());
32
    }
33
34
    public function getJavaProxiedObject(): JavaObject
35
    {
36
        return $this->jasperFillManager;
37
    }
38
}
39