Completed
Branch master (073708)
by Josh
02:11
created
src/Escaper.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@  discard block
 block discarded – undo
10 10
 class Escaper
11 11
 {
12 12
 	/**
13
-	* @var array Characters to escape in a character class
14
-	*/
13
+	 * @var array Characters to escape in a character class
14
+	 */
15 15
 	public $inCharacterClass = ['-' => '\\-', '\\' => '\\\\', ']' => '\\]'];
16 16
 
17 17
 	/**
18
-	* @var array Characters to escape outside of a character class
19
-	*/
18
+	 * @var array Characters to escape outside of a character class
19
+	 */
20 20
 	public $inLiteral = [
21 21
 		'$'  => '\\$',  '(' => '\\(', ')' => '\\)', '*' => '\\*',
22 22
 		'+'  => '\\+',  '.' => '\\.', '?' => '\\?', '[' => '\\]',
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 	];
25 25
 
26 26
 	/**
27
-	* @param string $delimiter Delimiter used in the final regexp
28
-	*/
27
+	 * @param string $delimiter Delimiter used in the final regexp
28
+	 */
29 29
 	public function __construct($delimiter = '/')
30 30
 	{
31 31
 		foreach (str_split($delimiter, 1) as $char)
@@ -36,22 +36,22 @@  discard block
 block discarded – undo
36 36
 	}
37 37
 
38 38
 	/**
39
-	* Escape given character to be used in a character class
40
-	*
41
-	* @param  string $char Original character
42
-	* @return string       Escaped character
43
-	*/
39
+	 * Escape given character to be used in a character class
40
+	 *
41
+	 * @param  string $char Original character
42
+	 * @return string       Escaped character
43
+	 */
44 44
 	public function escapeCharacterClass($char)
45 45
 	{
46 46
 		return (isset($this->inCharacterClass[$char])) ? $this->inCharacterClass[$char] : $char;
47 47
 	}
48 48
 
49 49
 	/**
50
-	* Escape given character to be used outside of a character class
51
-	*
52
-	* @param  string $char Original character
53
-	* @return string       Escaped character
54
-	*/
50
+	 * Escape given character to be used outside of a character class
51
+	 *
52
+	 * @param  string $char Original character
53
+	 * @return string       Escaped character
54
+	 */
55 55
 	public function escapeLiteral($char)
56 56
 	{
57 57
 		return (isset($this->inLiteral[$char])) ? $this->inLiteral[$char] : $char;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
 	* @var array Characters to escape outside of a character class
19 19
 	*/
20 20
 	public $inLiteral = [
21
-		'$'  => '\\$',  '(' => '\\(', ')' => '\\)', '*' => '\\*',
22
-		'+'  => '\\+',  '.' => '\\.', '?' => '\\?', '[' => '\\]',
21
+		'$'  => '\\$', '(' => '\\(', ')' => '\\)', '*' => '\\*',
22
+		'+'  => '\\+', '.' => '\\.', '?' => '\\?', '[' => '\\]',
23 23
 		'\\' => '\\\\', '^' => '\\^', '{' => '\\{', '|' => '\\|'
24 24
 	];
25 25
 
Please login to merge, or discard this patch.
src/Input/InputInterface.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 InputInterface
11 11
 {
12 12
 	/**
13
-	* Split given string into a list of values
14
-	*
15
-	* @param  string    $string
16
-	* @return integer[]
17
-	*/
13
+	 * Split given string into a list of values
14
+	 *
15
+	 * @param  string    $string
16
+	 * @return integer[]
17
+	 */
18 18
 	public function split($string);
19 19
 }
20 20
\ No newline at end of file
Please login to merge, or discard this patch.
src/Runner.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -12,27 +12,27 @@
 block discarded – undo
12 12
 class Runner
13 13
 {
14 14
 	/**
15
-	* @var PassInterface[]
16
-	*/
15
+	 * @var PassInterface[]
16
+	 */
17 17
 	protected $passes = [];
18 18
 
19 19
 	/**
20
-	* Add a pass to the list
21
-	*
22
-	* @param  PassInterface $pass
23
-	* @return void
24
-	*/
20
+	 * Add a pass to the list
21
+	 *
22
+	 * @param  PassInterface $pass
23
+	 * @return void
24
+	 */
25 25
 	public function addPass(PassInterface $pass)
26 26
 	{
27 27
 		$this->passes[] = $pass;
28 28
 	}
29 29
 
30 30
 	/**
31
-	* Run all passes on the list of strings
32
-	*
33
-	* @param  array[] $strings
34
-	* @return array[]
35
-	*/
31
+	 * Run all passes on the list of strings
32
+	 *
33
+	 * @param  array[] $strings
34
+	 * @return array[]
35
+	 */
36 36
 	public function run(array $strings)
37 37
 	{
38 38
 		foreach ($this->passes as $pass)
Please login to merge, or discard this patch.
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/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 1 patch
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.