JasperPrint   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
eloc 8
dl 0
loc 37
c 0
b 0
f 0
ccs 10
cts 10
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getStatus() 0 3 1
A getReport() 0 3 1
A getJavaProxiedObject() 0 3 1
A __construct() 0 4 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