Completed
Push — 1.7 ( ce7091...0d97cf )
by Greg
14:14 queued 07:41
created
app/Soundex.php 1 patch
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,13 +18,15 @@  discard block
 block discarded – undo
18 18
 /**
19 19
  * Phonetic matching of strings.
20 20
  */
21
-class Soundex {
21
+class Soundex
22
+{
22 23
 	/**
23 24
 	 * Which algorithms are supported.
24 25
 	 *
25 26
 	 * @return string[]
26 27
 	 */
27
-	public static function getAlgorithms() {
28
+	public static function getAlgorithms()
29
+	{
28 30
 		return array(
29 31
 			'std' => /* I18N: http://en.wikipedia.org/wiki/Soundex */ I18N::translate('Russell'),
30 32
 			'dm'  => /* I18N: http://en.wikipedia.org/wiki/Daitch–Mokotoff_Soundex */ I18N::translate('Daitch-Mokotoff'),
@@ -39,7 +41,8 @@  discard block
 block discarded – undo
39 41
 	 *
40 42
 	 * @return bool
41 43
 	 */
42
-	public static function compare($soundex1, $soundex2) {
44
+	public static function compare($soundex1, $soundex2)
45
+	{
43 46
 		if ($soundex1 && $soundex2) {
44 47
 			foreach (explode(':', $soundex1) as $code) {
45 48
 				if (strpos($soundex2, $code) !== false) {
@@ -58,7 +61,8 @@  discard block
 block discarded – undo
58 61
 	 *
59 62
 	 * @return null|string
60 63
 	 */
61
-	public static function russell($text) {
64
+	public static function russell($text)
65
+	{
62 66
 		$words         = preg_split('/\s/', $text, -1, PREG_SPLIT_NO_EMPTY);
63 67
 		$soundex_array = array();
64 68
 		foreach ($words as $word) {
@@ -89,7 +93,8 @@  discard block
 block discarded – undo
89 93
 	 *
90 94
 	 * @return null|string
91 95
 	 */
92
-	public static function daitchMokotoff($text) {
96
+	public static function daitchMokotoff($text)
97
+	{
93 98
 		$words         = preg_split('/\s/', $text, -1, PREG_SPLIT_NO_EMPTY);
94 99
 		$soundex_array = array();
95 100
 		foreach ($words as $word) {
@@ -686,7 +691,8 @@  discard block
 block discarded – undo
686 691
 	 *
687 692
 	 * @return string[] List of possible DM codes for the word.
688 693
 	 */
689
-	private static function daitchMokotoffWord($name) {
694
+	private static function daitchMokotoffWord($name)
695
+	{
690 696
 		// Apply special transformation rules to the input string
691 697
 		$name = I18N::strtoupper($name);
692 698
 		foreach (self::$transformNameTable as $transformRule) {
Please login to merge, or discard this patch.
app/Report/ReportParserSetup.php 1 patch
Braces   +18 added lines, -9 removed lines patch added patch discarded remove patch
@@ -21,7 +21,8 @@  discard block
 block discarded – undo
21 21
 /**
22 22
  * Class ReportParserSetup - parse a report.xml file and extract the setup options.
23 23
  */
24
-class ReportParserSetup extends ReportParserBase {
24
+class ReportParserSetup extends ReportParserBase
25
+{
25 26
 	/** @var array An array of report options/parameters */
26 27
 	private $data = array();
27 28
 
@@ -33,7 +34,8 @@  discard block
 block discarded – undo
33 34
 	 *
34 35
 	 * @return array
35 36
 	 */
36
-	public function reportProperties() {
37
+	public function reportProperties()
38
+	{
37 39
 		return $this->data;
38 40
 	}
39 41
 
@@ -42,7 +44,8 @@  discard block
 block discarded – undo
42 44
 	 *
43 45
 	 * @param string[] $attrs
44 46
 	 */
45
-	protected function reportStartHandler($attrs) {
47
+	protected function reportStartHandler($attrs)
48
+	{
46 49
 		$access = Auth::PRIV_PRIVATE;
47 50
 		if (isset($attrs['access'])) {
48 51
 			if (isset($$attrs["access"])) {
@@ -63,7 +66,8 @@  discard block
 block discarded – undo
63 66
 	 *
64 67
 	 * @param string[] $attrs
65 68
 	 */
66
-	protected function varStartHandler($attrs) {
69
+	protected function varStartHandler($attrs)
70
+	{
67 71
 		if (preg_match('/^I18N::number\((.+)\)$/', $attrs['var'], $match)) {
68 72
 			$this->text .= I18N::number($match[1]);
69 73
 		} elseif (preg_match('/^I18N::translate\(\'(.+)\'\)$/', $attrs['var'], $match)) {
@@ -78,14 +82,16 @@  discard block
 block discarded – undo
78 82
 	/**
79 83
 	 * Process <Title>
80 84
 	 */
81
-	protected function titleStartHandler() {
85
+	protected function titleStartHandler()
86
+	{
82 87
 		$this->text = '';
83 88
 	}
84 89
 
85 90
 	/**
86 91
 	 * Process </Title>
87 92
 	 */
88
-	protected function titleEndHandler() {
93
+	protected function titleEndHandler()
94
+	{
89 95
 		$this->data['title'] = $this->text;
90 96
 		$this->text          = '';
91 97
 	}
@@ -93,7 +99,8 @@  discard block
 block discarded – undo
93 99
 	/**
94 100
 	 * Process </Description>
95 101
 	 */
96
-	protected function descriptionEndHandler() {
102
+	protected function descriptionEndHandler()
103
+	{
97 104
 		$this->data['description'] = $this->text;
98 105
 		$this->text                = '';
99 106
 	}
@@ -103,7 +110,8 @@  discard block
 block discarded – undo
103 110
 	 *
104 111
 	 * @param string[] $attrs
105 112
 	 */
106
-	protected function inputStartHandler($attrs) {
113
+	protected function inputStartHandler($attrs)
114
+	{
107 115
 		$this->text  = '';
108 116
 		$this->input = array(
109 117
 			'name'    => isset($attrs['name']) ? $attrs['name'] : '',
@@ -135,7 +143,8 @@  discard block
 block discarded – undo
135 143
 	/**
136 144
 	 * Process </Input>
137 145
 	 */
138
-	protected function inputEndHandler() {
146
+	protected function inputEndHandler()
147
+	{
139 148
 		$this->input['value'] = $this->text;
140 149
 		if (!isset($this->data['inputs'])) {
141 150
 			$this->data['inputs'] = array();
Please login to merge, or discard this patch.
app/Report/ReportHtmlLine.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,13 +18,15 @@
 block discarded – undo
18 18
 /**
19 19
  * Class ReportHtmlLine
20 20
  */
21
-class ReportHtmlLine extends ReportBaseLine {
21
+class ReportHtmlLine extends ReportBaseLine
22
+{
22 23
 	/**
23 24
 	 * HTML line renderer
24 25
 	 *
25 26
 	 * @param ReportHtml $renderer
26 27
 	 */
27
-	public function render($renderer) {
28
+	public function render($renderer)
29
+	{
28 30
 		if ($this->x1 == '.') {
29 31
 			$this->x1 = $renderer->getX();
30 32
 		}
Please login to merge, or discard this patch.
app/Report/ReportPdfHtml.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,8 @@  discard block
 block discarded – undo
18 18
 /**
19 19
  * Class ReportPdfHtml
20 20
  */
21
-class ReportPdfHtml extends ReportBaseHtml {
21
+class ReportPdfHtml extends ReportBaseHtml
22
+{
22 23
 	/**
23 24
 	 * Render the output.
24 25
 	 *
@@ -27,7 +28,8 @@  discard block
 block discarded – undo
27 28
 	 *
28 29
 	 * @return int|string
29 30
 	 */
30
-	public function render($renderer, $sub = false) {
31
+	public function render($renderer, $sub = false)
32
+	{
31 33
 		if (!empty($this->attrs['style'])) {
32 34
 			$renderer->setCurrentStyle($this->attrs['style']);
33 35
 		}
Please login to merge, or discard this patch.
app/Report/ReportBaseLine.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,8 @@  discard block
 block discarded – undo
18 18
 /**
19 19
  * Class ReportBaseLine
20 20
  */
21
-class ReportBaseLine extends ReportBaseElement {
21
+class ReportBaseLine extends ReportBaseElement
22
+{
22 23
 	/**
23 24
 	 * Start horizontal position, current position (default)
24 25
 	 *
@@ -52,7 +53,8 @@  discard block
 block discarded – undo
52 53
 	 * @param mixed $x2
53 54
 	 * @param mixed $y2
54 55
 	 */
55
-	public function __construct($x1, $y1, $x2, $y2) {
56
+	public function __construct($x1, $y1, $x2, $y2)
57
+	{
56 58
 		$this->x1 = $x1;
57 59
 		$this->y1 = $y1;
58 60
 		$this->x2 = $x2;
@@ -68,7 +70,8 @@  discard block
 block discarded – undo
68 70
 	 *
69 71
 	 * @return number
70 72
 	 */
71
-	public function getHeight($renderer) {
73
+	public function getHeight($renderer)
74
+	{
72 75
 		return abs($this->y2 - $this->y1);
73 76
 	}
74 77
 
@@ -79,7 +82,8 @@  discard block
 block discarded – undo
79 82
 	 *
80 83
 	 * @return number
81 84
 	 */
82
-	public function getWidth($renderer) {
85
+	public function getWidth($renderer)
86
+	{
83 87
 		return abs($this->x2 - $this->x1);
84 88
 	}
85 89
 }
Please login to merge, or discard this patch.
app/Report/ReportBaseText.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,8 @@  discard block
 block discarded – undo
18 18
 /**
19 19
  * Class ReportBaseText
20 20
  */
21
-class ReportBaseText extends ReportBaseElement {
21
+class ReportBaseText extends ReportBaseElement
22
+{
22 23
 	/**
23 24
 	 * Text color in HTML code
24 25
 	 *
@@ -50,7 +51,8 @@  discard block
 block discarded – undo
50 51
 	 * @param string $style The name of the text style
51 52
 	 * @param string $color HTML color code
52 53
 	 */
53
-	public function __construct($style, $color) {
54
+	public function __construct($style, $color)
55
+	{
54 56
 		$this->text               = '';
55 57
 		$this->color              = $color;
56 58
 		$this->wrapWidthRemaining = 0;
@@ -67,7 +69,8 @@  discard block
 block discarded – undo
67 69
 	 *
68 70
 	 * @return mixed
69 71
 	 */
70
-	public function setWrapWidth($wrapwidth, $cellwidth) {
72
+	public function setWrapWidth($wrapwidth, $cellwidth)
73
+	{
71 74
 		$this->wrapWidthCell = $cellwidth;
72 75
 		if (strpos($this->text, "\n") !== false) {
73 76
 			$this->wrapWidthRemaining = $cellwidth;
@@ -83,7 +86,8 @@  discard block
 block discarded – undo
83 86
 	 *
84 87
 	 * @return string
85 88
 	 */
86
-	public function getStyleName() {
89
+	public function getStyleName()
90
+	{
87 91
 		return $this->styleName;
88 92
 	}
89 93
 }
Please login to merge, or discard this patch.
app/Report/ReportBaseHtml.php 1 patch
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,7 +18,8 @@  discard block
 block discarded – undo
18 18
 /**
19 19
  * Class ReportBaseHtml
20 20
  */
21
-class ReportBaseHtml extends ReportBaseElement {
21
+class ReportBaseHtml extends ReportBaseElement
22
+{
22 23
 	/** @var string The XML tag. */
23 24
 	public $tag;
24 25
 
@@ -34,7 +35,8 @@  discard block
 block discarded – undo
34 35
 	 * @param $tag
35 36
 	 * @param $attrs
36 37
 	 */
37
-	public function __construct($tag, $attrs) {
38
+	public function __construct($tag, $attrs)
39
+	{
38 40
 		$this->tag   = $tag;
39 41
 		$this->attrs = $attrs;
40 42
 
@@ -46,7 +48,8 @@  discard block
 block discarded – undo
46 48
 	 *
47 49
 	 * @return string
48 50
 	 */
49
-	public function getStart() {
51
+	public function getStart()
52
+	{
50 53
 		$str = "<" . $this->tag . " ";
51 54
 		foreach ($this->attrs as $key => $value) {
52 55
 			$str .= $key . "=\"" . $value . "\" ";
@@ -61,7 +64,8 @@  discard block
 block discarded – undo
61 64
 	 *
62 65
 	 * @return string
63 66
 	 */
64
-	public function getEnd() {
67
+	public function getEnd()
68
+	{
65 69
 		return "</" . $this->tag . ">";
66 70
 	}
67 71
 
@@ -70,7 +74,8 @@  discard block
 block discarded – undo
70 74
 	 *
71 75
 	 * @param ReportBaseElement $element
72 76
 	 */
73
-	public function addElement($element) {
77
+	public function addElement($element)
78
+	{
74 79
 		$this->elements[] = $element;
75 80
 	}
76 81
 }
Please login to merge, or discard this patch.
app/Report/ReportBaseImage.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,8 @@  discard block
 block discarded – undo
18 18
 /**
19 19
  * Class ReportBaseImage
20 20
  */
21
-class ReportBaseImage extends ReportBaseElement {
21
+class ReportBaseImage extends ReportBaseElement
22
+{
22 23
 	/**
23 24
 	 * Filename of the image
24 25
 	 *
@@ -73,7 +74,8 @@  discard block
 block discarded – undo
73 74
 	 * @param string $align Placement of the image. L: left, C:center, R:right
74 75
 	 * @param string $ln    T:same line, N:next line
75 76
 	 */
76
-	public function __construct($file, $x, $y, $w, $h, $align, $ln) {
77
+	public function __construct($file, $x, $y, $w, $h, $align, $ln)
78
+	{
77 79
 		$this->file   = $file;
78 80
 		$this->width  = $w;
79 81
 		$this->height = $h;
@@ -92,7 +94,8 @@  discard block
 block discarded – undo
92 94
 	 *
93 95
 	 * @return float
94 96
 	 */
95
-	public function getHeight($renderer) {
97
+	public function getHeight($renderer)
98
+	{
96 99
 		return $this->height;
97 100
 	}
98 101
 
@@ -103,7 +106,8 @@  discard block
 block discarded – undo
103 106
 	 *
104 107
 	 * @return float
105 108
 	 */
106
-	public function getWidth($renderer) {
109
+	public function getWidth($renderer)
110
+	{
107 111
 		return $this->width;
108 112
 	}
109 113
 }
Please login to merge, or discard this patch.
app/Report/ReportPdfFootnote.php 1 patch
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,13 +18,15 @@  discard block
 block discarded – undo
18 18
 /**
19 19
  * Class ReportPdfFootnote
20 20
  */
21
-class ReportPdfFootnote extends ReportBaseFootnote {
21
+class ReportPdfFootnote extends ReportBaseFootnote
22
+{
22 23
 	/**
23 24
 	 * PDF Footnotes number renderer
24 25
 	 *
25 26
 	 * @param ReportTcpdf $renderer
26 27
 	 */
27
-	public function render($renderer) {
28
+	public function render($renderer)
29
+	{
28 30
 		$renderer->setCurrentStyle("footnotenum");
29 31
 		$renderer->Write($renderer->getCurrentStyleHeight(), $this->numText, $this->addlink); //source link numbers after name
30 32
 	}
@@ -35,7 +37,8 @@  discard block
 block discarded – undo
35 37
 	 *
36 38
 	 * @param ReportTcpdf $pdf
37 39
 	 */
38
-	public function renderFootnote($pdf) {
40
+	public function renderFootnote($pdf)
41
+	{
39 42
 		if ($pdf->getCurrentStyle() != $this->styleName) {
40 43
 			$pdf->setCurrentStyle($this->styleName);
41 44
 		}
@@ -61,7 +64,8 @@  discard block
 block discarded – undo
61 64
 	 *
62 65
 	 * @return float $h
63 66
 	 */
64
-	public function getFootnoteHeight($renderer) {
67
+	public function getFootnoteHeight($renderer)
68
+	{
65 69
 		return 0;
66 70
 	}
67 71
 
@@ -73,7 +77,8 @@  discard block
 block discarded – undo
73 77
 	 *
74 78
 	 * @return array
75 79
 	 */
76
-	public function getWidth($pdf) {
80
+	public function getWidth($pdf)
81
+	{
77 82
 		// Setup the style name, a font must be selected to calculate the width
78 83
 		$pdf->setCurrentStyle("footnotenum");
79 84
 
Please login to merge, or discard this patch.