Passed
Pull Request — master (#16)
by Jack
12:55
created
source/FluidXml/CssTranslator.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -9,28 +9,28 @@  discard block
 block discarded – undo
9 9
                 // Empty part of #id and .class
10 10
                 [ '(?<=^|\s)      # The begining or an empty space.
11 11
                    (?=[.#\[])     # . | # | [',
12
-                  '*',
13
-                  'TAG',
14
-                  false ],
12
+                        '*',
13
+                        'TAG',
14
+                        false ],
15 15
                 // #id
16 16
                 [ '\#
17 17
                    ([\w\-]+)',
18
-                  '[@id="\1"]',
19
-                  'ID',
20
-                  false ],
18
+                        '[@id="\1"]',
19
+                        'ID',
20
+                        false ],
21 21
                 // .class
22 22
                 [ '\.
23 23
                    ([\w\-]+)',
24
-                  '[ contains( concat(" ", normalize-space(@class), " "), concat(" ", "\1", " ") ) ]',
25
-                  'CLASS',
26
-                  false ],
24
+                        '[ contains( concat(" ", normalize-space(@class), " "), concat(" ", "\1", " ") ) ]',
25
+                        'CLASS',
26
+                        false ],
27 27
                 // [attr]
28 28
                 [ '\[
29 29
                    ([\w\-]+)
30 30
                    \]',
31
-                  '[@\1]',
32
-                  'ATTR',
33
-                  false ],
31
+                        '[@\1]',
32
+                        'ATTR',
33
+                        false ],
34 34
                 // [attr="val"]
35 35
                 [ '\[
36 36
                    ([\w\-]+)
@@ -38,76 +38,76 @@  discard block
 block discarded – undo
38 38
                    (.*)
39 39
                    ["\']
40 40
                    \]',
41
-                  '[@\1="\2"]',
42
-                  'ATTR',
43
-                  false ],
41
+                        '[@\1="\2"]',
42
+                        'ATTR',
43
+                        false ],
44 44
                 // ns|A
45 45
                 [ '([\w\-]+)
46 46
                    \|
47 47
                    (?=\w)       # A namespace must be followed at least by a character.',
48
-                  '\1:',
49
-                  'NS',
50
-                  false ],
48
+                        '\1:',
49
+                        'NS',
50
+                        false ],
51 51
                 // :root
52 52
                 [ ':root\b',
53
-                  '/*',
54
-                  'TAG',
55
-                  false ],
53
+                        '/*',
54
+                        'TAG',
55
+                        false ],
56 56
                 // A
57 57
                 [ '(?<=^|\s|\})
58 58
                    ( [\w\-]+ | \* )',
59
-                  '\1',
60
-                  'TAG',
61
-                  false ],
59
+                        '\1',
60
+                        'TAG',
61
+                        false ],
62 62
                 // Aggregates the components of a tag in an expression.
63 63
                 [ '({NS\d+})?
64 64
                    ({TAG\d+})
65 65
                    ((?:{ATTR\d+})*|)
66 66
                    ((?:{ID\d+})*|)
67 67
                    ((?:{CLASS\d+})*|)',
68
-                  '\1\2\3\4\5',
69
-                  'EXP',
70
-                  false ],
68
+                        '\1\2\3\4\5',
69
+                        'EXP',
70
+                        false ],
71 71
                 [ '({EXP\d+})
72 72
                    :first-child',
73
-                  '*[1]/self::\1',
74
-                  'EXP',
75
-                  false ],
73
+                        '*[1]/self::\1',
74
+                        'EXP',
75
+                        false ],
76 76
                 // {} + {}
77 77
                 [ '({EXP\d+})
78 78
                    \s* \+ \s*
79 79
                    ({EXP\d+})',
80
-                  '\1/following-sibling::*[1]/self::\2',
81
-                  'EXP',
82
-                  true ],
80
+                        '\1/following-sibling::*[1]/self::\2',
81
+                        'EXP',
82
+                        true ],
83 83
                 // {} ~ {}
84 84
                 [ '({EXP\d+})
85 85
                    \s* \~ \s*
86 86
                    ({EXP\d+})',
87
-                  '\1/following-sibling::*/self::\2',
88
-                  'EXP',
89
-                  true ],
87
+                        '\1/following-sibling::*/self::\2',
88
+                        'EXP',
89
+                        true ],
90 90
                 // {} > {}
91 91
                 [ '({EXP\d+})
92 92
                    \s* > \s*
93 93
                    ({EXP\d+})',
94
-                  '\1/\2',
95
-                  'EXP',
96
-                  true ],
94
+                        '\1/\2',
95
+                        'EXP',
96
+                        true ],
97 97
                 // {} {}
98 98
                 [ '({EXP\d+})
99 99
                    \s+
100 100
                    ({EXP\d+})',
101
-                  '\1//\2',
102
-                  'EXP',
103
-                  true ],
101
+                        '\1//\2',
102
+                        'EXP',
103
+                        true ],
104 104
                 // {}, {}
105 105
                 [ '({EXP\d+})
106 106
                    \s* , \s*
107 107
                    ({EXP\d+})',
108
-                  '\1|\2',
109
-                  'EXP',
110
-                  true ]
108
+                        '\1|\2',
109
+                        'EXP',
110
+                        true ]
111 111
         ];
112 112
 
113 113
         public static function xpath($css)
Please login to merge, or discard this patch.
source/FluidXml/FluidHelper.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -76,22 +76,22 @@
 block discarded – undo
76 76
                 }
77 77
 
78 78
                 $voids = ['area',
79
-                          'base',
80
-                          'br',
81
-                          'col',
82
-                          'colgroup',
83
-                          'command',
84
-                          'embed',
85
-                          'hr',
86
-                          'img',
87
-                          'input',
88
-                          'keygen',
89
-                          'link',
90
-                          'meta',
91
-                          'param',
92
-                          'source',
93
-                          'track',
94
-                          'wbr'];
79
+                                'base',
80
+                                'br',
81
+                                'col',
82
+                                'colgroup',
83
+                                'command',
84
+                                'embed',
85
+                                'hr',
86
+                                'img',
87
+                                'input',
88
+                                'keygen',
89
+                                'link',
90
+                                'meta',
91
+                                'param',
92
+                                'source',
93
+                                'track',
94
+                                'wbr'];
95 95
 
96 96
                 // Every empty node. There is no reason to match nodes with content inside.
97 97
                 $query = '//*[not(node())]';
Please login to merge, or discard this patch.
source/FluidXml/FluidNamespace.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
         const MODE_EXPLICIT = 1;
13 13
 
14 14
         private $config = [ self::ID   => '',
15
-                            self::URI  => '',
16
-                            self::MODE => self::MODE_EXPLICIT ];
15
+                                self::URI  => '',
16
+                                self::MODE => self::MODE_EXPLICIT ];
17 17
 
18 18
         public function __construct($id, $uri, $mode = 1)
19 19
         {
Please login to merge, or discard this patch.
source/FluidXml/FluidContext.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@
 block discarded – undo
8 8
 class FluidContext implements FluidInterface, \ArrayAccess, \Iterator
9 9
 {
10 10
         use FluidAliasesTrait,
11
-            FluidSaveTrait,
12
-            NewableTrait,
13
-            ReservedCallTrait,          // For compatibility with PHP 5.6.
14
-            ReservedCallStaticTrait;    // For compatibility with PHP 5.6.
11
+                FluidSaveTrait,
12
+                NewableTrait,
13
+                ReservedCallTrait,          // For compatibility with PHP 5.6.
14
+                ReservedCallStaticTrait;    // For compatibility with PHP 5.6.
15 15
 
16 16
         private $document;
17 17
         private $handler;
Please login to merge, or discard this patch.
source/FluidXml/FluidXml.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -8,17 +8,17 @@  discard block
 block discarded – undo
8 8
 class FluidXml implements FluidInterface
9 9
 {
10 10
         use FluidAliasesTrait,
11
-            FluidSaveTrait,
12
-            NewableTrait,
13
-            ReservedCallTrait,          // For compatibility with PHP 5.6.
14
-            ReservedCallStaticTrait;    // For compatibility with PHP 5.6.
11
+                FluidSaveTrait,
12
+                NewableTrait,
13
+                ReservedCallTrait,          // For compatibility with PHP 5.6.
14
+                ReservedCallStaticTrait;    // For compatibility with PHP 5.6.
15 15
 
16 16
         const ROOT_NODE = 'doc';
17 17
 
18 18
         private $defaults = [ 'root'       => self::ROOT_NODE,
19
-                              'version'    => '1.0',
20
-                              'encoding'   => 'UTF-8',
21
-                              'stylesheet' => null ];
19
+                                'version'    => '1.0',
20
+                                'encoding'   => 'UTF-8',
21
+                                'stylesheet' => null ];
22 22
 
23 23
         private $document;
24 24
         private $handler;
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
                 // Now, we can further populate the DOM with any stylesheet or child.
64 64
                 $this->initStylesheet($options)
65
-                     ->initRoot($options);
65
+                        ->initRoot($options);
66 66
         }
67 67
 
68 68
         protected function mergeOptions(&$arguments)
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
         {
98 98
                 if (! empty($options['stylesheet'])) {
99 99
                         $attrs = 'type="text/xsl" '
100
-                               . "encoding=\"{$options['encoding']}\" "
101
-                               . 'indent="yes" '
102
-                               . "href=\"{$options['stylesheet']}\"";
100
+                                . "encoding=\"{$options['encoding']}\" "
101
+                                . 'indent="yes" '
102
+                                . "href=\"{$options['stylesheet']}\"";
103 103
 
104 104
                         $stylesheet = new \DOMProcessingInstruction('xml-stylesheet', $attrs);
105 105
 
Please login to merge, or discard this patch.