Completed
Branch master (7d9e94)
by Josh
02:18
created
src/Output/JavaScript.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
12 12
 class JavaScript extends PrintableAscii
13 13
 {
14 14
 	/**
15
-	* {@inheritdoc}
16
-	*/
15
+	 * {@inheritdoc}
16
+	 */
17 17
 	public function escapeUnicode($cp)
18 18
 	{
19 19
 		if ($cp > 0xFFFF)
Please login to merge, or discard this patch.
src/Output/PrintableAscii.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
 abstract class PrintableAscii implements OutputInterface
11 11
 {
12 12
 	/**
13
-	* {@inheritdoc}
14
-	*/
13
+	 * {@inheritdoc}
14
+	 */
15 15
 	public function output($value)
16 16
 	{
17 17
 		if ($value < 32)
@@ -28,22 +28,22 @@  discard block
 block discarded – undo
28 28
 	}
29 29
 
30 30
 	/**
31
-	* Escape given ASCII codepoint
32
-	*
33
-	* @param  integer $cp
34
-	* @return string
35
-	*/
31
+	 * Escape given ASCII codepoint
32
+	 *
33
+	 * @param  integer $cp
34
+	 * @return string
35
+	 */
36 36
 	protected function escapeAscii($cp)
37 37
 	{
38 38
 		return '\\x' . sprintf('%02X', $cp);
39 39
 	}
40 40
 
41 41
 	/**
42
-	* Escape given control code
43
-	*
44
-	* @param  integer $cp
45
-	* @return string
46
-	*/
42
+	 * Escape given control code
43
+	 *
44
+	 * @param  integer $cp
45
+	 * @return string
46
+	 */
47 47
 	protected function escapeControlCode($cp)
48 48
 	{
49 49
 		$table = [9 => '\\t', 10 => '\\n', 13 => '\\r'];
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
 	}
53 53
 
54 54
 	/**
55
-	* Output the representation of a unicode character
56
-	*
57
-	* @param  integer $cp Unicode codepoint
58
-	* @return string
59
-	*/
55
+	 * Output the representation of a unicode character
56
+	 *
57
+	 * @param  integer $cp Unicode codepoint
58
+	 * @return string
59
+	 */
60 60
 	abstract protected function escapeUnicode($cp);
61 61
 }
62 62
\ No newline at end of file
Please login to merge, or discard this patch.
src/Output/OutputInterface.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 block discarded – undo
10 10
 interface OutputInterface
11 11
 {
12 12
 	/**
13
-	* Serialize a value into a character
14
-	*
15
-	* @param  integer $value
16
-	* @return string
17
-	*/
13
+	 * Serialize a value into a character
14
+	 *
15
+	 * @param  integer $value
16
+	 * @return string
17
+	 */
18 18
 	public function output($value);
19 19
 }
20 20
\ No newline at end of file
Please login to merge, or discard this patch.
src/Output/Utf8.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
 class Utf8 implements OutputInterface
13 13
 {
14 14
 	/**
15
-	* {@inheritdoc}
16
-	*/
15
+	 * {@inheritdoc}
16
+	 */
17 17
 	public function output($value)
18 18
 	{
19 19
 		if ($value < 0x80)
@@ -27,15 +27,15 @@  discard block
 block discarded – undo
27 27
 		if ($value < 0x10000)
28 28
 		{
29 29
 			return chr(0xE0 | ($value >> 12))
30
-			     . chr(0x80 | (($value >> 6) & 0x3F))
31
-			     . chr(0x80 | ($value & 0x3F));
30
+				 . chr(0x80 | (($value >> 6) & 0x3F))
31
+				 . chr(0x80 | ($value & 0x3F));
32 32
 		}
33 33
 		if ($value < 0x110000)
34 34
 		{
35 35
 			return chr(0xF0 | ($value >> 18))
36
-			     . chr(0x80 | (($value >> 12) & 0x3F))
37
-			     . chr(0x80 | (($value >> 6) & 0x3F))
38
-			     . chr(0x80 | ($value & 0x3F));
36
+				 . chr(0x80 | (($value >> 12) & 0x3F))
37
+				 . chr(0x80 | (($value >> 6) & 0x3F))
38
+				 . chr(0x80 | ($value & 0x3F));
39 39
 		}
40 40
 		throw new InvalidArgumentException('Invalid UTF-8 codepoint 0x' . dechex($value));
41 41
 	}
Please login to merge, or discard this patch.
src/Passes/PassInterface.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 block discarded – undo
10 10
 interface PassInterface
11 11
 {
12 12
 	/**
13
-	* Run this pass
14
-	*
15
-	* @param  array[] $strings Original strings
16
-	* @return array[]          Modified strings
17
-	*/
13
+	 * Run this pass
14
+	 *
15
+	 * @param  array[] $strings Original strings
16
+	 * @return array[]          Modified strings
17
+	 */
18 18
 	public function run(array $strings);
19 19
 }
20 20
\ No newline at end of file
Please login to merge, or discard this patch.
src/Passes/GroupSingleCharacters.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
 class GroupSingleCharacters extends AbstractPass
11 11
 {
12 12
 	/**
13
-	* {@inheritdoc}
14
-	*/
13
+	 * {@inheritdoc}
14
+	 */
15 15
 	protected function processStrings(array $strings)
16 16
 	{
17 17
 		$singles = $this->getSingleCharStrings($strings);
@@ -27,11 +27,11 @@  discard block
 block discarded – undo
27 27
 	}
28 28
 
29 29
 	/**
30
-	* Return an array of every single-char string in given list of strings
31
-	*
32
-	* @param  array[] $strings
33
-	* @return array[]
34
-	*/
30
+	 * Return an array of every single-char string in given list of strings
31
+	 *
32
+	 * @param  array[] $strings
33
+	 * @return array[]
34
+	 */
35 35
 	protected function getSingleCharStrings(array $strings)
36 36
 	{
37 37
 		$singles = [];
Please login to merge, or discard this patch.
src/Passes/PromoteSingleStrings.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,19 +10,19 @@
 block discarded – undo
10 10
 class PromoteSingleStrings extends AbstractPass
11 11
 {
12 12
 	/**
13
-	* {@inheritdoc}
14
-	*/
13
+	 * {@inheritdoc}
14
+	 */
15 15
 	protected function processStrings(array $strings)
16 16
 	{
17 17
 		return array_map([$this, 'promoteSingleStrings'], $strings);
18 18
 	}
19 19
 
20 20
 	/**
21
-	* Promote single strings found inside given string
22
-	*
23
-	* @param  array $string Original string
24
-	* @return array         Modified string
25
-	*/
21
+	 * Promote single strings found inside given string
22
+	 *
23
+	 * @param  array $string Original string
24
+	 * @return array         Modified string
25
+	 */
26 26
 	protected function promoteSingleStrings(array $string)
27 27
 	{
28 28
 		$newString = [];
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@
 block discarded – undo
34 34
 				{
35 35
 					$newString[] = $element;
36 36
 				}
37
-			}
38
-			else
37
+			} else
39 38
 			{
40 39
 				$newString[] = $element;
41 40
 			}
Please login to merge, or discard this patch.
src/Passes/MergeSuffix.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
 class MergeSuffix extends AbstractPass
11 11
 {
12 12
 	/**
13
-	* {@inheritdoc}
14
-	*/
13
+	 * {@inheritdoc}
14
+	 */
15 15
 	protected function processStrings(array $strings)
16 16
 	{
17 17
 		if (count($strings) < 2)
@@ -40,11 +40,11 @@  discard block
 block discarded – undo
40 40
 	}
41 41
 
42 42
 	/**
43
-	* Test whether all given strings have the same last element
44
-	*
45
-	* @param  array[] $strings
46
-	* @return bool
47
-	*/
43
+	 * Test whether all given strings have the same last element
44
+	 *
45
+	 * @param  array[] $strings
46
+	 * @return bool
47
+	 */
48 48
 	protected function hasMatchingSuffix(array $strings)
49 49
 	{
50 50
 		$suffix = end($strings[1]);
Please login to merge, or discard this patch.
src/Passes/MergePrefix.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
 class MergePrefix extends AbstractPass
11 11
 {
12 12
 	/**
13
-	* {@inheritdoc}
14
-	*/
13
+	 * {@inheritdoc}
14
+	 */
15 15
 	protected function processStrings(array $strings)
16 16
 	{
17 17
 		$newStrings = [];
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
 	}
25 25
 
26 26
 	/**
27
-	* Get the number of leading elements common to all given strings
28
-	*
29
-	* @param  array[] $strings
30
-	* @return integer
31
-	*/
27
+	 * Get the number of leading elements common to all given strings
28
+	 *
29
+	 * @param  array[] $strings
30
+	 * @return integer
31
+	 */
32 32
 	protected function getPrefixLength(array $strings)
33 33
 	{
34 34
 		$len = 0;
@@ -49,13 +49,13 @@  discard block
 block discarded – undo
49 49
 	}
50 50
 
51 51
 	/**
52
-	* Return given strings grouped by their first element
53
-	*
54
-	* NOTE: assumes that this pass is run before the first element of any string could be replaced
55
-	*
56
-	* @param  array[] $strings
57
-	* @return array[]
58
-	*/
52
+	 * Return given strings grouped by their first element
53
+	 *
54
+	 * NOTE: assumes that this pass is run before the first element of any string could be replaced
55
+	 *
56
+	 * @param  array[] $strings
57
+	 * @return array[]
58
+	 */
59 59
 	protected function getStringsByPrefix(array $strings)
60 60
 	{
61 61
 		$byPrefix = [];
@@ -68,11 +68,11 @@  discard block
 block discarded – undo
68 68
 	}
69 69
 
70 70
 	/**
71
-	* Merge given strings into a new single string
72
-	*
73
-	* @param  array[] $strings
74
-	* @return array
75
-	*/
71
+	 * Merge given strings into a new single string
72
+	 *
73
+	 * @param  array[] $strings
74
+	 * @return array
75
+	 */
76 76
 	protected function mergeStrings(array $strings)
77 77
 	{
78 78
 		$len       = $this->getPrefixLength($strings);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 		$newStrings = [];
18 18
 		foreach ($this->getStringsByPrefix($strings) as $prefix => $strings)
19 19
 		{
20
-			$newStrings[] =  (isset($strings[1])) ? $this->mergeStrings($strings) : $strings[0];
20
+			$newStrings[] = (isset($strings[1])) ? $this->mergeStrings($strings) : $strings[0];
21 21
 		}
22 22
 
23 23
 		return $newStrings;
Please login to merge, or discard this patch.