Completed
Push — master ( c8d49c...f7d051 )
by Sébastien
03:16
created

JasperFillManager   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 75%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 1
cbo 1
dl 0
loc 28
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;
6
7
use Soluble\Japha\Interfaces\JavaObject;
8
use Soluble\Japha\Bridge\Adapter as BridgeAdapter;
9
10
class JasperFillManager implements RemoteJavaObjectProxyInterface
11
{
12
    /**
13
     * @var BridgeAdapter
14
     */
15
    protected $ba;
16
17
    /**
18
     * @var \Soluble\Japha\Interfaces\JavaObject
19
     */
20
    protected $jasperFillManager;
21
22 1
    public function __construct(BridgeAdapter $bridgeAdapter)
23
    {
24 1
        $this->ba = $bridgeAdapter;
25 1
        $this->jasperFillManager = $this->ba->java('net.sf.jasperreports.engine.JasperFillManager');
26 1
    }
27
28 1
    public function fillReport($compiled, $params, JRDataSourceInterface $datasource)
29
    {
30 1
        return $this->jasperFillManager->fillReport($compiled, $params, $datasource->getJavaProxiedObject());
31
    }
32
33
    public function getJavaProxiedObject(): JavaObject
34
    {
35
        return $this->jasperFillManager;
36
    }
37
}
38