File tree Expand file tree Collapse file tree 5 files changed +29
-29
lines changed
tests/Core/Generators/Fixtures Expand file tree Collapse file tree 5 files changed +29
-29
lines changed Original file line number Diff line number Diff line change @@ -75,15 +75,15 @@ public function __construct(Ruleset $ruleset)
75
75
76
76
77
77
/**
78
- * Retrieves the title of the sniff from the DOMNode supplied.
78
+ * Retrieves the title of the sniff from the DOMElement supplied.
79
79
*
80
- * @param \DOMNode $doc The DOMNode object for the sniff.
81
- * It represents the "documentation" tag in the XML
82
- * standard file.
80
+ * @param \DOMElement $doc The DOMElement object for the sniff.
81
+ * It represents the "documentation" tag in the XML
82
+ * standard file.
83
83
*
84
84
* @return string
85
85
*/
86
- protected function getTitle (DOMNode $ doc )
86
+ protected function getTitle (DOMElement $ doc )
87
87
{
88
88
$ title = $ doc ->getAttribute ('title ' );
89
89
@@ -141,14 +141,14 @@ public function generate()
141
141
*
142
142
* Doc generators must implement this function to produce output.
143
143
*
144
- * @param \DOMNode $doc The DOMNode object for the sniff.
145
- * It represents the "documentation" tag in the XML
146
- * standard file.
144
+ * @param \DOMElement $doc The DOMElement object for the sniff.
145
+ * It represents the "documentation" tag in the XML
146
+ * standard file.
147
147
*
148
148
* @return void
149
149
* @see generate()
150
150
*/
151
- abstract protected function processSniff (DOMNode $ doc );
151
+ abstract protected function processSniff (DOMElement $ doc );
152
152
153
153
154
154
}//end class
Original file line number Diff line number Diff line change @@ -262,13 +262,13 @@ protected function getFormattedFooter()
262
262
/**
263
263
* Process the documentation for a single sniff.
264
264
*
265
- * @param \DOMNode $doc The DOMNode object for the sniff.
266
- * It represents the "documentation" tag in the XML
267
- * standard file.
265
+ * @param \DOMElement $doc The DOMElement object for the sniff.
266
+ * It represents the "documentation" tag in the XML
267
+ * standard file.
268
268
*
269
269
* @return void
270
270
*/
271
- public function processSniff (DOMNode $ doc )
271
+ public function processSniff (DOMElement $ doc )
272
272
{
273
273
$ content = '' ;
274
274
foreach ($ doc ->childNodes as $ node ) {
@@ -301,7 +301,7 @@ public function processSniff(DOMNode $doc)
301
301
*
302
302
* @return string
303
303
*/
304
- private function titleToAnchor ($ title )
304
+ private function titleToAnchor (string $ title )
305
305
{
306
306
// Slugify the text.
307
307
$ title = strtolower ($ title );
Original file line number Diff line number Diff line change @@ -100,13 +100,13 @@ protected function getFormattedFooter()
100
100
/**
101
101
* Process the documentation for a single sniff.
102
102
*
103
- * @param \DOMNode $doc The DOMNode object for the sniff.
104
- * It represents the "documentation" tag in the XML
105
- * standard file.
103
+ * @param \DOMElement $doc The DOMElement object for the sniff.
104
+ * It represents the "documentation" tag in the XML
105
+ * standard file.
106
106
*
107
107
* @return void
108
108
*/
109
- protected function processSniff (DOMNode $ doc )
109
+ protected function processSniff (DOMElement $ doc )
110
110
{
111
111
$ content = '' ;
112
112
foreach ($ doc ->childNodes as $ node ) {
Original file line number Diff line number Diff line change @@ -23,13 +23,13 @@ class Text extends Generator
23
23
/**
24
24
* Process the documentation for a single sniff.
25
25
*
26
- * @param \DOMNode $doc The DOMNode object for the sniff.
27
- * It represents the "documentation" tag in the XML
28
- * standard file.
26
+ * @param \DOMElement $doc The DOMElement object for the sniff.
27
+ * It represents the "documentation" tag in the XML
28
+ * standard file.
29
29
*
30
30
* @return void
31
31
*/
32
- public function processSniff (DOMNode $ doc )
32
+ public function processSniff (DOMElement $ doc )
33
33
{
34
34
$ content = '' ;
35
35
foreach ($ doc ->childNodes as $ node ) {
@@ -50,16 +50,16 @@ public function processSniff(DOMNode $doc)
50
50
/**
51
51
* Format the title area for a single sniff.
52
52
*
53
- * @param \DOMNode $doc The DOMNode object for the sniff.
54
- * It represents the "documentation" tag in the XML
55
- * standard file.
53
+ * @param \DOMElement $doc The DOMElement object for the sniff.
54
+ * It represents the "documentation" tag in the XML
55
+ * standard file.
56
56
*
57
57
* @since 3.12.0 Replaces the Text::printTitle() method,
58
58
* which was deprecated in 3.12.0 and removed in 4.0.0.
59
59
*
60
60
* @return string
61
61
*/
62
- protected function getFormattedTitle (DOMNode $ doc )
62
+ protected function getFormattedTitle (DOMElement $ doc )
63
63
{
64
64
$ title = $ this ->getTitle ($ doc );
65
65
$ standard = $ this ->ruleset ->name ;
Original file line number Diff line number Diff line change 8
8
9
9
namespace PHP_CodeSniffer \Tests \Core \Generators \Fixtures ;
10
10
11
- use DOMNode ;
11
+ use DOMElement ;
12
12
use PHP_CodeSniffer \Generators \Generator ;
13
13
14
14
class MockGenerator extends Generator
@@ -17,11 +17,11 @@ class MockGenerator extends Generator
17
17
/**
18
18
* Process the documentation for a single sniff.
19
19
*
20
- * @param \DOMNode $doc The DOMNode object for the sniff.
20
+ * @param \DOMElement $doc The DOMElement object for the sniff.
21
21
*
22
22
* @return void
23
23
*/
24
- protected function processSniff (DOMNode $ doc )
24
+ protected function processSniff (DOMElement $ doc )
25
25
{
26
26
echo $ this ->getTitle ($ doc ), PHP_EOL ;
27
27
}
You can’t perform that action at this time.
0 commit comments