@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | $path = $data; |
20 | 20 | |
21 | 21 | |
22 | -foreach(qp($path, 'w|p') as $qp) { |
|
22 | +foreach (qp($path, 'w|p') as $qp) { |
|
23 | 23 | $qr = $qp->branch(); |
24 | - print format($qr->find('w|r:first'), 'w|r:first').' '; |
|
24 | + print format($qr->find('w|r:first'), 'w|r:first') . ' '; |
|
25 | 25 | $qp->find('w|r:first'); |
26 | - while($qp->next('w|r')->html() != null) { |
|
26 | + while ($qp->next('w|r')->html() != null) { |
|
27 | 27 | $qr = $qp->branch(); |
28 | - print format($qr->find('w|r'), 'w|r').' '; |
|
28 | + print format($qr->find('w|r'), 'w|r') . ' '; |
|
29 | 29 | // print $qp->text(); |
30 | 30 | } |
31 | 31 | print '</br>'; |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | |
47 | 47 | $text = $qr->find($findSelector)->find('w|t')->text(); |
48 | 48 | |
49 | - $text = (checkUnderline($qp->branch())) ? '<u>'.$text.'</u>' : $text; |
|
50 | - $text = (checkBold($qp->branch())) ? '<b>'.$text.'</b>' : $text; |
|
49 | + $text = (checkUnderline($qp->branch())) ? '<u>' . $text . '</u>' : $text; |
|
50 | + $text = (checkBold($qp->branch())) ? '<b>' . $text . '</b>' : $text; |
|
51 | 51 | |
52 | 52 | return $text; |
53 | 53 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * @param String $v |
19 | 19 | */ |
20 | 20 | function addClasses($v) { |
21 | - return "<a href='".$_SERVER['PHP_SELF']."?key=$v'><span class='keyname'>$v</span></a><br />"; |
|
21 | + return "<a href='" . $_SERVER['PHP_SELF'] . "?key=$v'><span class='keyname'>$v</span></a><br />"; |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | // The document skeleton |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $qpnames = array(); |
36 | 36 | |
37 | 37 | // Search through the xml file to find any entries of jQuery entities |
38 | -foreach(qp('querypath.xml', 'entry') as $entry) { |
|
38 | +foreach (qp('querypath.xml', 'entry') as $entry) { |
|
39 | 39 | $qpnames[$entry->attr('name')] = |
40 | 40 | array('desc' => $entry->find('desc')->innerXML(), |
41 | 41 | 'jquery' => $entry->parent()->find('jquery')->innerXML(), |
@@ -43,14 +43,14 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | // Search through the xml file to find all entries of jQuery entities |
46 | -foreach(htmlqp('http://api.jquery.com/api/', 'entry') as $entry) { |
|
46 | +foreach (htmlqp('http://api.jquery.com/api/', 'entry') as $entry) { |
|
47 | 47 | $category = false; |
48 | 48 | $category = array_search($entry->find('category:first')->attr('name'), $qparray); |
49 | - while($entry->next('category')->html() != null) { |
|
49 | + while ($entry->next('category')->html() != null) { |
|
50 | 50 | $category = (array_search($entry->attr('name'), $qparray)) ? true : $category; |
51 | - if($category) break; |
|
51 | + if ($category) break; |
|
52 | 52 | } |
53 | - if($category) { |
|
53 | + if ($category) { |
|
54 | 54 | $jqnames[$entry->parent()->attr('name')] = |
55 | 55 | array('longdesc' => $entry->find('longdesc')->innerXML(), |
56 | 56 | 'name' => $entry->parent()->find('category')->attr('name')); |
@@ -64,14 +64,14 @@ discard block |
||
64 | 64 | |
65 | 65 | // Add the keys to the nav bar |
66 | 66 | $qpdoc->find('#leftbody'); |
67 | -foreach($jqkeys as $k => $v) { |
|
67 | +foreach ($jqkeys as $k => $v) { |
|
68 | 68 | $qpdoc->append($v); |
69 | 69 | } |
70 | 70 | |
71 | 71 | // Add the description to the main window if the key exists |
72 | -if(array_key_exists($key, $jqnames)) { |
|
73 | - if(array_key_exists($key, $qpnames)) { |
|
74 | - $qpdoc->top()->find('#rightfunction')->text('Function: '.ucfirst($key)); |
|
72 | +if (array_key_exists($key, $jqnames)) { |
|
73 | + if (array_key_exists($key, $qpnames)) { |
|
74 | + $qpdoc->top()->find('#rightfunction')->text('Function: ' . ucfirst($key)); |
|
75 | 75 | $qpdoc->top()->find('#rightdesc')->text($qpnames[$key]['desc']); |
76 | 76 | $qpdoc->top()->find('#righttitle')->text('How it\'s done in jQuery'); |
77 | 77 | $qpdoc->top()->find('#righttext')->text($qpnames[$key]['jquery']); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $qpdoc->top()->find('#righttext2')->text($qpnames[$key]['querypath']); |
80 | 80 | } |
81 | 81 | else { |
82 | - $qpdoc->top()->find('#rightfunction')->text('Function: '.ucfirst($key)); |
|
82 | + $qpdoc->top()->find('#rightfunction')->text('Function: ' . ucfirst($key)); |
|
83 | 83 | $qpdoc->top()->find('#rightdesc')->remove(); |
84 | 84 | $qpdoc->top()->find('#righttitle')->text('jQuery Documentation'); |
85 | 85 | $qpdoc->top()->find('#righttext')->append($jqnames[$key]['longdesc']); |
@@ -84,9 +84,9 @@ discard block |
||
84 | 84 | $splos->rewind(); |
85 | 85 | $first = $splos->current(); |
86 | 86 | if ($first instanceof \DOMDocument) { |
87 | - $this->dom = $first;//->documentElement; |
|
87 | + $this->dom = $first; //->documentElement; |
|
88 | 88 | } else { |
89 | - $this->dom = $first->ownerDocument;//->documentElement; |
|
89 | + $this->dom = $first->ownerDocument; //->documentElement; |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | $this->scopeNode = $scopeNode; |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | return $this->combineAnyDescendant($node, $selectors, $index); |
265 | 265 | case SimpleSelector::ANOTHER_SELECTOR: |
266 | 266 | // fprintf(STDOUT, "Next selector: %s\n", $selectors[$index]); |
267 | - return $this->matchesSimpleSelector($node, $selectors, $index);; |
|
267 | + return $this->matchesSimpleSelector($node, $selectors, $index); ; |
|
268 | 268 | } |
269 | 269 | |
270 | 270 | return false; |
@@ -776,7 +776,7 @@ discard block |
||
776 | 776 | $name = $pseudoClass['name']; |
777 | 777 | // Avoid E_STRICT violation. |
778 | 778 | $value = $pseudoClass['value'] ?? NULL; |
779 | - $ret &= $this->psHandler->elementMatches($name, $node, $this->scopeNode, $value); |
|
779 | + $ret &= $this->psHandler->elementMatches($name, $node, $this->scopeNode, $value); |
|
780 | 780 | } |
781 | 781 | |
782 | 782 | return $ret; |