@@ -67,19 +67,19 @@ discard block |
||
67 | 67 | $entries = collect(); |
68 | 68 | |
69 | 69 | if (Str::contains($file, "{$this->url()}/resources.html")) { |
70 | - $crawler->filter('h2')->each(function (HtmlPageCrawler $node) use ($entries, $file) { |
|
70 | + $crawler->filter('h2')->each(function(HtmlPageCrawler $node) use ($entries, $file) { |
|
71 | 71 | $entries->push([ |
72 | 72 | 'name' => $this->cleanAnchorText($node->text()), |
73 | 73 | 'type' => 'Resource', |
74 | - 'path' => Str::after($file . '#' . Str::slug($node->text()), $this->innerDirectory()), |
|
74 | + 'path' => Str::after($file.'#'.Str::slug($node->text()), $this->innerDirectory()), |
|
75 | 75 | ]); |
76 | 76 | }); |
77 | 77 | |
78 | - $crawler->filter('h3')->each(function (HtmlPageCrawler $node) use ($entries, $file) { |
|
78 | + $crawler->filter('h3')->each(function(HtmlPageCrawler $node) use ($entries, $file) { |
|
79 | 79 | $entries->push([ |
80 | 80 | 'name' => $this->cleanAnchorText($node->text()), |
81 | 81 | 'type' => 'Section', |
82 | - 'path' => Str::after($file . '#' . Str::slug($node->text()), $this->innerDirectory()), |
|
82 | + 'path' => Str::after($file.'#'.Str::slug($node->text()), $this->innerDirectory()), |
|
83 | 83 | ]); |
84 | 84 | }); |
85 | 85 | |
@@ -96,12 +96,12 @@ discard block |
||
96 | 96 | |
97 | 97 | $crawler |
98 | 98 | ->filter('nav#nav li.mt-8 a') |
99 | - ->each(function (HtmlPageCrawler $node) use ($entries, $itemsToIgnore) { |
|
100 | - if (! $itemsToIgnore->contains($node->text())) { |
|
99 | + ->each(function(HtmlPageCrawler $node) use ($entries, $itemsToIgnore) { |
|
100 | + if (!$itemsToIgnore->contains($node->text())) { |
|
101 | 101 | $entries->push([ |
102 | 102 | 'name' => trim($node->text()), |
103 | 103 | 'type' => 'Guide', |
104 | - 'path' => $this->url() . '/' . $node->attr('href'), |
|
104 | + 'path' => $this->url().'/'.$node->attr('href'), |
|
105 | 105 | ]); |
106 | 106 | } |
107 | 107 | }); |
@@ -114,11 +114,11 @@ discard block |
||
114 | 114 | { |
115 | 115 | $entries = collect(); |
116 | 116 | |
117 | - $crawler->filter('h2')->each(function (HtmlPageCrawler $node) use ($entries, $file) { |
|
117 | + $crawler->filter('h2')->each(function(HtmlPageCrawler $node) use ($entries, $file) { |
|
118 | 118 | $entries->push([ |
119 | 119 | 'name' => $this->cleanAnchorText($node->text()), |
120 | 120 | 'type' => 'Section', |
121 | - 'path' => Str::after($file . '#' . Str::slug($node->text()), $this->innerDirectory()), |
|
121 | + 'path' => Str::after($file.'#'.Str::slug($node->text()), $this->innerDirectory()), |
|
122 | 122 | ]); |
123 | 123 | }); |
124 | 124 | |
@@ -234,13 +234,13 @@ discard block |
||
234 | 234 | |
235 | 235 | protected function insertDashTableOfContents(HtmlPageCrawler $crawler, string $file) |
236 | 236 | { |
237 | - if (! Str::contains($file, "{$this->url()}/docs.html")) { |
|
237 | + if (!Str::contains($file, "{$this->url()}/docs.html")) { |
|
238 | 238 | $crawler->filter('body') |
239 | 239 | ->before('<a name="//apple_ref/cpp/Section/Top" class="dashAnchor"></a>'); |
240 | 240 | |
241 | - $crawler->filter('h2, h3')->each(function (HtmlPageCrawler $node) { |
|
241 | + $crawler->filter('h2, h3')->each(function(HtmlPageCrawler $node) { |
|
242 | 242 | $node->prepend( |
243 | - '<a id="' . Str::slug($node->text()) . '" name="//apple_ref/cpp/Section/' . rawurlencode($this->cleanAnchorText($node->text())) . '" class="dashAnchor"></a>' |
|
243 | + '<a id="'.Str::slug($node->text()).'" name="//apple_ref/cpp/Section/'.rawurlencode($this->cleanAnchorText($node->text())).'" class="dashAnchor"></a>' |
|
244 | 244 | ); |
245 | 245 | }); |
246 | 246 | } |