JasperPrint::getJavaProxiedObject()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * Jasper report integration for PHP
7
 *
8
 * @link      https://github.com/belgattitude/soluble-jasper
9
 * @author    Vanvelthem Sébastien
10
 * @copyright Copyright (c) 2017-2019 Vanvelthem Sébastien
11
 * @license   MIT
12
 */
13
14
namespace Soluble\Jasper\Proxy\Engine;
15
16
use Soluble\Japha\Interfaces\JavaObject;
17
use Soluble\Jasper\Proxy\RemoteJavaObjectProxyInterface;
18
use Soluble\Jasper\Report;
19
use Soluble\Jasper\Report\ReportStatusInterface;
20
21
class JasperPrint implements RemoteJavaObjectProxyInterface, ReportStatusInterface
22
{
23
    /**
24
     * @var JavaObject Java('net.sf.jasperreports.engine.JasperPrint')
25
     */
26
    private $jasperPrint;
27
28
    /**
29
     * @var Report
30
     */
31
    private $report;
32
33
    /**
34
     * @param JavaObject $jasperPrint Java('net.sf.jasperreports.engine.JasperPrint')
35
     */
36 15
    public function __construct(JavaObject $jasperPrint, Report $report)
37
    {
38 15
        $this->jasperPrint = $jasperPrint;
39 15
        $this->report      = $report;
40 15
    }
41
42
    /**
43
     * @return JavaObject Java('net.sf.jasperreports.engine.JasperPrint')
44
     */
45 13
    public function getJavaProxiedObject(): JavaObject
46
    {
47 13
        return $this->jasperPrint;
48
    }
49
50 1
    public function getStatus(): string
51
    {
52 1
        return ReportStatusInterface::STATUS_FILLED;
53
    }
54
55 1
    public function getReport(): Report
56
    {
57 1
        return $this->report;
58
    }
59
}
60