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

JasperFillManager::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 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