TableRowGroupBox::appendTableWrapperBox()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 0
c 0
b 0
f 0
dl 0
loc 2
rs 10
cc 1
nc 1
nop 4
1
<?php
2
3
declare(strict_types=1);
4
/**
5
 * TableRowGroupBox class.
6
 *
7
 * @package   YetiForcePDF\Layout
8
 *
9
 * @copyright YetiForce Sp. z o.o
10
 * @license   MIT
11
 * @author    Rafal Pospiech <[email protected]>
12
 */
13
14
namespace YetiForcePDF\Layout;
15
16
use YetiForcePDF\Html\Element;
17
use YetiForcePDF\Style\Style;
18
19
/**
20
 * Class TableRowGroupBox.
21
 */
22
class TableRowGroupBox extends BlockBox
23
{
24
	/**
25
	 * We shouldn't append block box here.
26
	 *
27
	 * @param mixed $childDomElement
28
	 * @param mixed $element
29
	 * @param mixed $style
30
	 * @param mixed $parentBlock
31
	 */
32
	public function appendBlockBox($childDomElement, $element, $style, $parentBlock)
33
	{
34
	}
35
36
	/**
37
	 * We shouldn't append table wrapper here.
38
	 *
39
	 * @param mixed $childDomElement
40
	 * @param mixed $element
41
	 * @param mixed $style
42
	 * @param mixed $parentBlock
43
	 */
44
	public function appendTableWrapperBox($childDomElement, $element, $style, $parentBlock)
45
	{
46
	}
47
48
	/**
49
	 * We shouldn't append inline block box here.
50
	 *
51
	 * @param mixed $childDomElement
52
	 * @param mixed $element
53
	 * @param mixed $style
54
	 * @param mixed $parentBlock
55
	 */
56
	public function appendInlineBlockBox($childDomElement, $element, $style, $parentBlock)
57
	{
58
	}
59
60
	/**
61
	 * We shouldn't append inline box here.
62
	 *
63
	 * @param mixed $childDomElement
64
	 * @param mixed $element
65
	 * @param mixed $style
66
	 * @param mixed $parentBlock
67
	 */
68
	public function appendInlineBox($childDomElement, $element, $style, $parentBlock)
69
	{
70
	}
71
72
	/**
73
	 * Create row box
74
	 * return TableRowBox.
75
	 */
76
	public function createRowBox()
77
	{
78
		$style = (new \YetiForcePDF\Style\Style())
79
			->setDocument($this->document)
80
			->setContent('')
81
			->parseInline();
82
		$box = (new TableRowBox())
83
			->setDocument($this->document)
84
			->setParent($this)
85
			->setStyle($style)
86
			->init();
87
		$this->appendChild($box);
88
		$box->getStyle()->init();
89
		return $box;
90
	}
91
92
	/**
93
	 * Append table row box element.
94
	 *
95
	 * @param \DOMNode                      $childDomElement
96
	 * @param Element                       $element
97
	 * @param Style                         $style
98
	 * @param \YetiForcePDF\Layout\BlockBox $parentBlock
99
	 *
100
	 * @return $this
101
	 */
102
	public function appendTableRowBox($childDomElement, $element, $style, $parentBlock)
0 ignored issues
show
Unused Code introduced by
The parameter $childDomElement is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

102
	public function appendTableRowBox(/** @scrutinizer ignore-unused */ $childDomElement, $element, $style, $parentBlock)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $parentBlock is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

102
	public function appendTableRowBox($childDomElement, $element, $style, /** @scrutinizer ignore-unused */ $parentBlock)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
103
	{
104
		$box = (new TableRowBox())
105
			->setDocument($this->document)
106
			->setParent($this)
107
			->setElement($element)
108
			->setStyle($style)
109
			->init();
110
		$this->appendChild($box);
111
		$box->getStyle()->init();
112
		$box->buildTree($box);
113
		return $box;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $box returns the type YetiForcePDF\Layout\TableRowBox which is incompatible with the documented return type YetiForcePDF\Layout\TableRowGroupBox.
Loading history...
114
	}
115
116
	/**
117
	 * {@inheritdoc}
118
	 */
119
	public function getInstructions(): string
120
	{
121
		return ''; // not renderable
122
	}
123
}
124