Passed
Branch master (7391d7)
by Arthur
03:02
created
examples/dirty_html.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
examples/docx.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
examples/doc.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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']);
Please login to merge, or discard this patch.