Passed
Branch master (947605)
by smiley
03:06
created
tests/Data/DataTest.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
 namespace chillerlan\QRCodeTest\Data;
12 12
 
13 13
 use chillerlan\QRCode\BitBuffer;
14
-use chillerlan\QRCode\QRConst;
15 14
 use chillerlan\QRCode\Data\AlphaNum;
16 15
 use chillerlan\QRCode\Data\Byte;
17 16
 use chillerlan\QRCode\Data\Kanji;
18 17
 use chillerlan\QRCode\Data\Number;
18
+use chillerlan\QRCode\QRConst;
19 19
 
20 20
 class DataTest extends \PHPUnit_Framework_TestCase{
21 21
 
Please login to merge, or discard this patch.
tests/QRCodeTest.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
 
12 12
 namespace chillerlan\QRCodeTest;
13 13
 
14
+use ReflectionClass;
14 15
 use chillerlan\QRCode\Output\QRString;
15 16
 use chillerlan\QRCode\QRCode;
16 17
 use chillerlan\QRCode\QRConst;
17 18
 use chillerlan\QRCode\QROptions;
18
-use ReflectionClass;
19 19
 
20 20
 class QRCodeTest extends \PHPUnit_Framework_TestCase{
21 21
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -86,21 +86,21 @@
 block discarded – undo
86 86
 
87 87
 	public function getTypeNumberDataProvider(){
88 88
 		return [
89
-			[true,  QRCode::TYPE_05, 'foobar'],
89
+			[true, QRCode::TYPE_05, 'foobar'],
90 90
 			[false, QRCode::TYPE_05, 'foobar'],
91
-			[true,  QRCode::TYPE_10, 'foobar'],
91
+			[true, QRCode::TYPE_10, 'foobar'],
92 92
 			[false, QRCode::TYPE_10, 'foobar'],
93
-			[true,  QRCode::TYPE_05, '1234567890'],
93
+			[true, QRCode::TYPE_05, '1234567890'],
94 94
 			[false, QRCode::TYPE_05, '1234567890'],
95
-			[true,  QRCode::TYPE_10, '1234567890'],
95
+			[true, QRCode::TYPE_10, '1234567890'],
96 96
 			[false, QRCode::TYPE_10, '1234567890'],
97
-			[true,  QRCode::TYPE_05, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 $%*+-./:'],
97
+			[true, QRCode::TYPE_05, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 $%*+-./:'],
98 98
 			[false, QRCode::TYPE_05, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 $%*+-./:'],
99
-			[true,  QRCode::TYPE_10, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 $%*+-./:'],
99
+			[true, QRCode::TYPE_10, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 $%*+-./:'],
100 100
 			[false, QRCode::TYPE_10, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 $%*+-./:'],
101
-			[true,  QRCode::TYPE_05, '茗荷'],
101
+			[true, QRCode::TYPE_05, '茗荷'],
102 102
 			[false, QRCode::TYPE_05, '茗荷'],
103
-			[true,  QRCode::TYPE_10, '茗荷'],
103
+			[true, QRCode::TYPE_10, '茗荷'],
104 104
 			[false, QRCode::TYPE_10, '茗荷'],
105 105
 		];
106 106
 	}
Please login to merge, or discard this patch.
src/Data/AlphaNum.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 	/**
46 46
 	 * @param \chillerlan\QRCode\BitBuffer $buffer
47 47
 	 */
48
-	public function write(BitBuffer &$buffer){
48
+	public function write(BitBuffer&$buffer){
49 49
 		$i = 0;
50 50
 
51 51
 		while($i + 1 < $this->dataLength){
Please login to merge, or discard this patch.
src/Data/Byte.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 	/**
34 34
 	 * @param \chillerlan\QRCode\BitBuffer $buffer
35 35
 	 */
36
-	public function write(BitBuffer &$buffer){
36
+	public function write(BitBuffer&$buffer){
37 37
 		for($i = 0; $i < $this->dataLength; $i++){
38 38
 			$buffer->put(ord($this->data[$i]), 8);
39 39
 		}
Please login to merge, or discard this patch.
src/Data/Kanji.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 	 *
36 36
 	 * @throws \chillerlan\QRCode\Data\QRCodeDataException
37 37
 	 */
38
-	public function write(BitBuffer &$buffer){
38
+	public function write(BitBuffer&$buffer){
39 39
 
40 40
 		$i = 0;
41 41
 		while($i + 1 < $this->dataLength){
Please login to merge, or discard this patch.
src/Data/Number.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 	/**
34 34
 	 * @param \chillerlan\QRCode\BitBuffer $buffer
35 35
 	 */
36
-	public function write(BitBuffer &$buffer){
36
+	public function write(BitBuffer&$buffer){
37 37
 		$i = 0;
38 38
 
39 39
 		while($i + 2 < $this->dataLength){
Please login to merge, or discard this patch.
src/Data/QRDataBase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 	public function getLengthInBits($type){
53 53
 
54 54
 		switch(true){
55
-			case $type >=  1 && $type <= 9: return $this->lengthBits[0]; //  1 -  9
55
+			case $type >= 1 && $type <= 9: return $this->lengthBits[0]; //  1 -  9
56 56
 			case $type <= 26              : return $this->lengthBits[1]; // 10 - 26
57 57
 			case $type <= 40              : return $this->lengthBits[2]; // 27 - 40
58 58
 			default:
Please login to merge, or discard this patch.
src/Data/QRDataInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 	/**
23 23
 	 * @param \chillerlan\QRCode\BitBuffer $buffer
24 24
 	 */
25
-	public function write(BitBuffer &$buffer);
25
+	public function write(BitBuffer&$buffer);
26 26
 
27 27
 	/**
28 28
 	 * @param $type
Please login to merge, or discard this patch.
src/Output/QRImage.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 		$this->options->pixelSize = max(1, min(25, (int)$this->options->pixelSize));
39 39
 		$this->options->marginSize = max(0, min(25, (int)$this->options->marginSize));
40 40
 
41
-		foreach(['fgRed', 'fgGreen', 'fgBlue', 'bgRed', 'bgGreen', 'bgBlue',] as $val){
41
+		foreach(['fgRed', 'fgGreen', 'fgBlue', 'bgRed', 'bgGreen', 'bgBlue', ] as $val){
42 42
 			$this->options->{$val} = max(0, min(255, (int)$this->options->{$val}));
43 43
 		}
44 44
 
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
 			for($c = 0; $c < $this->pixelCount; $c++){
79 79
 				if($this->matrix[$r][$c]){
80 80
 					imagefilledrectangle($image,
81
-						$this->options->marginSize +  $c      * $this->options->pixelSize,
82
-						$this->options->marginSize +  $r      * $this->options->pixelSize,
81
+						$this->options->marginSize + $c * $this->options->pixelSize,
82
+						$this->options->marginSize + $r * $this->options->pixelSize,
83 83
 						$this->options->marginSize + ($c + 1) * $this->options->pixelSize - 1,
84 84
 						$this->options->marginSize + ($r + 1) * $this->options->pixelSize - 1,
85 85
 						$foreground);
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
 		ob_start();
91 91
 
92 92
 		switch($this->options->type){
93
-			case QRCode::OUTPUT_IMAGE_PNG: imagepng ($image, $this->options->cachefile, (int)$this->options->pngCompression); break;
93
+			case QRCode::OUTPUT_IMAGE_PNG: imagepng($image, $this->options->cachefile, (int)$this->options->pngCompression); break;
94 94
 			case QRCode::OUTPUT_IMAGE_JPG: imagejpeg($image, $this->options->cachefile, (int)$this->options->jpegQuality); break;
95
-			case QRCode::OUTPUT_IMAGE_GIF: imagegif ($image, $this->options->cachefile); break; /** Actually, it's pronounced "DJIFF". *hides* */
95
+			case QRCode::OUTPUT_IMAGE_GIF: imagegif($image, $this->options->cachefile); break; /** Actually, it's pronounced "DJIFF". *hides* */
96 96
 		}
97 97
 
98 98
 		$imageData = ob_get_contents();
Please login to merge, or discard this patch.