@@ -23,6 +23,6 @@ |
||
| 23 | 23 | $this->output(print_r($container->getReport(), true)); |
| 24 | 24 | |
| 25 | 25 | $timeElapsed = round((microtime(true) - $start) / 60, 2); |
| 26 | - return $this->outputSuccess('Cralwer finished in ' . $timeElapsed . ' min.'); |
|
| 26 | + return $this->outputSuccess('Cralwer finished in '.$timeElapsed.' min.'); |
|
| 27 | 27 | } |
| 28 | 28 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | $info = parse_url($this->baseUrl); |
| 34 | 34 | |
| 35 | - $this->baseHost = $info['scheme'] . '://' . $info['host']; |
|
| 35 | + $this->baseHost = $info['scheme'].'://'.$info['host']; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | public function flush() |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | public function getLinks() |
| 61 | 61 | { |
| 62 | - $links = $this->getCrawler()->filterXPath('//a')->each(function ($node, $i) { |
|
| 62 | + $links = $this->getCrawler()->filterXPath('//a')->each(function($node, $i) { |
|
| 63 | 63 | return $node->extract(array('_text', 'href'))[0]; |
| 64 | 64 | }); |
| 65 | 65 | foreach ($links as $key => $item) { |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | if (!isset($url['host']) || !isset($url['scheme'])) { |
| 69 | 69 | $base = $this->baseHost; |
| 70 | 70 | } else { |
| 71 | - $base = $url['scheme'] . '//' . $url['host']; |
|
| 71 | + $base = $url['scheme'].'//'.$url['host']; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | $path = null; |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $path = $url['path']; |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - $url = rtrim($base, "/") . "/" . ltrim($path, "/"); |
|
| 80 | + $url = rtrim($base, "/")."/".ltrim($path, "/"); |
|
| 81 | 81 | |
| 82 | 82 | |
| 83 | 83 | $links[$key][1] = http_build_url($url, [ |
@@ -145,7 +145,7 @@ |
||
| 145 | 145 | $type = $this->getCrawler($url)->getContentType(); |
| 146 | 146 | |
| 147 | 147 | if (strpos($type, 'text/html') === false) { |
| 148 | - $this->addLog('invalid_header', $url . ' invalid header ' . $type); |
|
| 148 | + $this->addLog('invalid_header', $url.' invalid header '.$type); |
|
| 149 | 149 | return false; |
| 150 | 150 | } |
| 151 | 151 | |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | // composer autoload include |
| 3 | -require(__DIR__ . '/../vendor/autoload.php'); |
|
| 3 | +require(__DIR__.'/../vendor/autoload.php'); |
|
| 4 | 4 | |
| 5 | 5 | // use the luya boot wrapping class |
| 6 | 6 | $boot = new \luya\Boot(); |
| 7 | -$boot->setYiiPath(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php'); |
|
| 7 | +$boot->setYiiPath(__DIR__.'/../vendor/yiisoft/yii2/Yii.php'); |
|
| 8 | 8 | $boot->run(); |
@@ -43,16 +43,16 @@ |
||
| 43 | 43 | <ul> |
| 44 | 44 | <?php foreach (Yii::$app->menu->find()->where(['parent_nav_id' => 0, 'container' => 'default'])->all() as $item): ?> |
| 45 | 45 | <li> |
| 46 | - <a<?php if ($item->isActive): ?> class="active"<?php endif;?> href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a> |
|
| 46 | + <a<?php if ($item->isActive): ?> class="active"<?php endif; ?> href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a> |
|
| 47 | 47 | <?php if ($item->hasChildren()): ?> |
| 48 | 48 | <ul> |
| 49 | 49 | <?php foreach ($item->children as $child): ?> |
| 50 | - <li><a<?php if ($child->isActive): ?> class="active"<?php endif;?> href="<?php echo $child->link; ?>">» <?php echo $child->title; ?></a></li> |
|
| 50 | + <li><a<?php if ($child->isActive): ?> class="active"<?php endif; ?> href="<?php echo $child->link; ?>">» <?php echo $child->title; ?></a></li> |
|
| 51 | 51 | |
| 52 | 52 | <?php if ($child->hasChildren()): ?> |
| 53 | 53 | <ul> |
| 54 | 54 | <?php foreach ($child->children as $grandChild): ?> |
| 55 | - <li><a<?php if ($grandChild->isActive): ?> class="active"<?php endif;?> href="<?php echo $grandChild->link; ?>">» <?php echo $grandChild->title; ?></a> |
|
| 55 | + <li><a<?php if ($grandChild->isActive): ?> class="active"<?php endif; ?> href="<?php echo $grandChild->link; ?>">» <?php echo $grandChild->title; ?></a> |
|
| 56 | 56 | <?php endforeach; ?> |
| 57 | 57 | </ul> |
| 58 | 58 | <?php endif; ?> |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | |
| 30 | 30 | public function callbackHalloAjax($foo) |
| 31 | 31 | { |
| 32 | - return 'foo' . $foo; |
|
| 32 | + return 'foo'.$foo; |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | // composer autoload include |
| 3 | -require(__DIR__ . '/../vendor/autoload.php'); |
|
| 3 | +require(__DIR__.'/../vendor/autoload.php'); |
|
| 4 | 4 | |
| 5 | 5 | // use the luya boot wrapping class |
| 6 | 6 | $boot = new \luya\Boot(); |
| 7 | -$boot->setYiiPath(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php'); |
|
| 7 | +$boot->setYiiPath(__DIR__.'/../vendor/yiisoft/yii2/Yii.php'); |
|
| 8 | 8 | $boot->run(); |
| 9 | 9 | \ No newline at end of file |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | |
| 4 | 4 | <h2><?php echo count($results); ?> Resultate</h2> |
| 5 | 5 | <ul> |
| 6 | -<?php foreach($results as $item): ?> |
|
| 6 | +<?php foreach ($results as $item): ?> |
|
| 7 | 7 | <li><a href="<?php echo $item->url; ?>"><?php echo $item->title; ?></a> |
| 8 | 8 | |
| 9 | 9 | <p style="background-color:red;"><?php echo $item->preview($query); ?></p> |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | <div class="container" id="content"> |
| 24 | 24 | <div class="row"> |
| 25 | 25 | <ol class="breadcrumb"> |
| 26 | - <?php foreach(Yii::$app->menu->current->teardown as $item): ?> |
|
| 26 | + <?php foreach (Yii::$app->menu->current->teardown as $item): ?> |
|
| 27 | 27 | <li><a href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a> |
| 28 | 28 | <?php endforeach; ?> |
| 29 | 29 | </ol> |
@@ -34,16 +34,16 @@ discard block |
||
| 34 | 34 | <ul> |
| 35 | 35 | <?php foreach (Yii::$app->menu->find()->where(['parent_nav_id' => 0, 'container' => 'default'])->all() as $item): ?> |
| 36 | 36 | <li> |
| 37 | - <a<?php if($item->isActive): ?> class="active"<?php endif;?> href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a> |
|
| 38 | - <?php if($item->hasChildren()): ?> |
|
| 37 | + <a<?php if ($item->isActive): ?> class="active"<?php endif; ?> href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a> |
|
| 38 | + <?php if ($item->hasChildren()): ?> |
|
| 39 | 39 | <ul> |
| 40 | - <?php foreach($item->children as $child): ?> |
|
| 41 | - <li><a<?php if($child->isActive): ?> class="active"<?php endif;?> href="<?php echo $child->link; ?>">» <?php echo $child->title; ?></a></li> |
|
| 40 | + <?php foreach ($item->children as $child): ?> |
|
| 41 | + <li><a<?php if ($child->isActive): ?> class="active"<?php endif; ?> href="<?php echo $child->link; ?>">» <?php echo $child->title; ?></a></li> |
|
| 42 | 42 | |
| 43 | - <?php if($child->hasChildren()): ?> |
|
| 43 | + <?php if ($child->hasChildren()): ?> |
|
| 44 | 44 | <ul> |
| 45 | - <?php foreach($child->children as $grandChild): ?> |
|
| 46 | - <li><a<?php if($grandChild->isActive): ?> class="active"<?php endif;?> href="<?php echo $grandChild->link; ?>">» <?php echo $grandChild->title; ?></a> |
|
| 45 | + <?php foreach ($child->children as $grandChild): ?> |
|
| 46 | + <li><a<?php if ($grandChild->isActive): ?> class="active"<?php endif; ?> href="<?php echo $grandChild->link; ?>">» <?php echo $grandChild->title; ?></a> |
|
| 47 | 47 | <?php endforeach; ?> |
| 48 | 48 | </ul> |
| 49 | 49 | <?php endif; ?> |