@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | } |
301 | 301 | } |
302 | 302 | } |
303 | - $this->matches = $found;//UniqueElementList::get($found); |
|
303 | + $this->matches = $found; //UniqueElementList::get($found); |
|
304 | 304 | $this->findAnyElement = false; |
305 | 305 | } |
306 | 306 | |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | } |
319 | 319 | } |
320 | 320 | |
321 | - $this->matches = $found;//UniqueElementList::get($found); |
|
321 | + $this->matches = $found; //UniqueElementList::get($found); |
|
322 | 322 | $this->findAnyElement = false; |
323 | 323 | } |
324 | 324 | |
@@ -1272,7 +1272,7 @@ discard block |
||
1272 | 1272 | $line = trim($lines[0]); |
1273 | 1273 | if (!empty($line)) { |
1274 | 1274 | $o->textContent = $line; |
1275 | - $found->attach($o);//trim($lines[0]); |
|
1275 | + $found->attach($o); //trim($lines[0]); |
|
1276 | 1276 | } |
1277 | 1277 | } |
1278 | 1278 | } |
@@ -68,7 +68,7 @@ |
||
68 | 68 | $element->appendChild($cdata); |
69 | 69 | } |
70 | 70 | |
71 | - return $this->qp;; |
|
71 | + return $this->qp; ; |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | // Look for CDATA sections. |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | require '../src/qp.php'; |
3 | -$xml =<<<EOF |
|
3 | +$xml = <<<EOF |
|
4 | 4 | <?xml version="1.0"?> |
5 | 5 | <table> |
6 | 6 | <tr id="row1"> |
@@ -21,7 +21,7 @@ |
||
21 | 21 | require_once '../src/QueryPath/QueryPath.php'; |
22 | 22 | |
23 | 23 | // This is the stub RSS document. |
24 | -$rss_stub ='<?xml version="1.0"?> |
|
24 | +$rss_stub = '<?xml version="1.0"?> |
|
25 | 25 | <rss version="2.0" |
26 | 26 | xmlns:dc="http://purl.org/dc/elements/1.1/"> |
27 | 27 | <channel> |
@@ -32,6 +32,6 @@ |
||
32 | 32 | ->children('p') |
33 | 33 | ->after('<p id="new">new paragraph</p>'); |
34 | 34 | |
35 | - echo ($qp->find('p')->children('p')->html()) ? 'print' : 'dont print';; |
|
35 | + echo ($qp->find('p')->children('p')->html()) ? 'print' : 'dont print'; ; |
|
36 | 36 | |
37 | 37 | // ->writeHTML(); |
@@ -50,5 +50,5 @@ |
||
50 | 50 | print PHP_EOL . "Ordered List" . PHP_EOL; |
51 | 51 | $i = 0; |
52 | 52 | foreach ($doc->top()->find('text|list[text|style-name="L2"]:first text|p[text|style-name="P2"]') as $bullet) { |
53 | - print ' ' . (++$i) . '. '. $bullet->text() . PHP_EOL; |
|
53 | + print ' ' . (++$i) . '. ' . $bullet->text() . PHP_EOL; |
|
54 | 54 | } |
55 | 55 | \ No newline at end of file |
@@ -26,13 +26,13 @@ |
||
26 | 26 | print '<p>The best match we found was for ' . $artist->children('name')->text() . PHP_EOL; |
27 | 27 | print '</p><p>Artist ID: ' . $id . PHP_EOL; |
28 | 28 | print '</p><p>Albums for this artist' . PHP_EOL; |
29 | - print '</p><p><a href="'.$album_url . urlencode($id).'">'.$album_url.'</a></p>'; |
|
29 | + print '</p><p><a href="' . $album_url . urlencode($id) . '">' . $album_url . '</a></p>'; |
|
30 | 30 | $albums = qp($album_url . urlencode($id))->writeXML(); |
31 | 31 | |
32 | 32 | foreach ($albums as $album) { |
33 | 33 | print $album->find('title')->text() . PHP_EOL; |
34 | 34 | // Fixme: Label is broken. See Drupal QueryPath module. |
35 | - print '(' . $album->next('label')->text() . ')' .PHP_EOL; |
|
35 | + print '(' . $album->next('label')->text() . ')' . PHP_EOL; |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | } |
@@ -12,8 +12,8 @@ |
||
12 | 12 | print '<h3>Urban Dictionary Random Word Generator</h3>'; |
13 | 13 | |
14 | 14 | $page = rand(0, 288); |
15 | -$qp = htmlqp('http://www.urbandictionary.com/?page='.$page, '#home'); |
|
15 | +$qp = htmlqp('http://www.urbandictionary.com/?page=' . $page, '#home'); |
|
16 | 16 | |
17 | 17 | $rand = rand(0, 7); |
18 | -print $qp->find('.word')->eq($rand)->text().'<br />'; |
|
18 | +print $qp->find('.word')->eq($rand)->text() . '<br />'; |
|
19 | 19 | print $qp->top()->find('.definition')->eq($rand)->text(); |
@@ -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 | } |