@@ -6,7 +6,7 @@ |
||
| 6 | 6 | Router::plugin( |
| 7 | 7 | 'SaitoSearch', |
| 8 | 8 | ['path' => '/searches'], |
| 9 | - function (RouteBuilder $routes) { |
|
| 9 | + function(RouteBuilder $routes) { |
|
| 10 | 10 | $routes->connect('/:action', ['controller' => 'searches']); |
| 11 | 11 | } |
| 12 | 12 | ); |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * Saito - The Threaded Web Forum |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | */ |
| 91 | 91 | public function getOmittedWords() |
| 92 | 92 | { |
| 93 | - $filter = function ($word) { |
|
| 93 | + $filter = function($word) { |
|
| 94 | 94 | return mb_strlen($word) < $this->_length; |
| 95 | 95 | }; |
| 96 | 96 | $string = preg_replace('/(".*")/', '', $this->_string); |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | if (mb_strpos($word, '-') === false) { |
| 150 | 150 | continue; |
| 151 | 151 | } |
| 152 | - $string = str_replace($word, '"' . $word . '"', $string); |
|
| 152 | + $string = str_replace($word, '"'.$word.'"', $string); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | return $string; |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * Saito - The Threaded Web Forum |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | $minWordLength = $connection |
| 94 | 94 | ->execute("SHOW VARIABLES LIKE 'ft_min_word_len'") |
| 95 | 95 | ->fetch()[1]; |
| 96 | - $options['searchTerm']->setMinWordLength((int)$minWordLength); |
|
| 96 | + $options['searchTerm']->setMinWordLength((int) $minWordLength); |
|
| 97 | 97 | |
| 98 | 98 | $query |
| 99 | 99 | ->where(['Entries.category_id IN' => $options['categories']]) |
@@ -37,14 +37,14 @@ discard block |
||
| 37 | 37 | $id = $options['conditions']['id']; |
| 38 | 38 | $lang = $options['conditions']['language']; |
| 39 | 39 | |
| 40 | - $findFiles = function ($id, $lang) { |
|
| 40 | + $findFiles = function($id, $lang) { |
|
| 41 | 41 | list($plugin, $id) = pluginSplit($id); |
| 42 | 42 | if ($plugin) { |
| 43 | 43 | $folderPath = Plugin::path($plugin); |
| 44 | 44 | } else { |
| 45 | - $folderPath = ROOT . DS; |
|
| 45 | + $folderPath = ROOT.DS; |
|
| 46 | 46 | } |
| 47 | - $folderPath .= 'docs' . DS . 'help' . DS . $lang; |
|
| 47 | + $folderPath .= 'docs'.DS.'help'.DS.$lang; |
|
| 48 | 48 | |
| 49 | 49 | $folder = new Folder($folderPath); |
| 50 | 50 | $files = $folder->find("$id(-.*?)?\.md"); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | return false; |
| 64 | 64 | } |
| 65 | 65 | $name = $files[0]; |
| 66 | - $file = new File($folderPath . DS . $name, false, 0444); |
|
| 66 | + $file = new File($folderPath.DS.$name, false, 0444); |
|
| 67 | 67 | $text = $file->read(); |
| 68 | 68 | $file->close(); |
| 69 | 69 | $data = [ |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | $this->get('/sitemap.xml'); |
| 30 | 30 | $baseUrl = Router::fullBaseUrl(); |
| 31 | 31 | $this->assertResponseContains( |
| 32 | - $baseUrl . '/sitemap/file/sitemap-entries-1-20000.xml' |
|
| 32 | + $baseUrl.'/sitemap/file/sitemap-entries-1-20000.xml' |
|
| 33 | 33 | ); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | Router::scope( |
| 9 | 9 | '/sitemap', |
| 10 | 10 | ['plugin' => 'Sitemap'], |
| 11 | - function ($routes) { |
|
| 11 | + function($routes) { |
|
| 12 | 12 | $routes->setExtensions(['xml']); |
| 13 | 13 | $routes->connect('/', ['controller' => 'Sitemaps']); |
| 14 | 14 | $routes->connect('/:action/*', ['controller' => 'Sitemaps']); |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | Router::prefix( |
| 22 | 22 | 'admin', |
| 23 | - function ($routes) { |
|
| 23 | + function($routes) { |
|
| 24 | 24 | $routes->connect( |
| 25 | 25 | '/plugins/sitemap', |
| 26 | 26 | ['plugin' => 'Sitemap', 'controller' => 'Sitemaps', 'action' => 'index'] |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | */ |
| 8 | 8 | SaitoEventManager::getInstance()->attach( |
| 9 | 9 | 'Request.Saito.View.Admin.plugins', |
| 10 | - function () { |
|
| 10 | + function() { |
|
| 11 | 11 | $url = '/admin/plugins/sitemap'; |
| 12 | 12 | $title = 'Sitemap'; |
| 13 | 13 | |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function sitemapUrl() |
| 17 | 17 | { |
| 18 | - return $this->baseUrl() . 'sitemap.xml'; |
|
| 18 | + return $this->baseUrl().'sitemap.xml'; |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | /** |
@@ -101,7 +101,7 @@ |
||
| 101 | 101 | { |
| 102 | 102 | $filename = "sitemap-{$this->_type}"; |
| 103 | 103 | if ($params) { |
| 104 | - $filename .= '-' . implode('-', $params); |
|
| 104 | + $filename .= '-'.implode('-', $params); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | return $filename; |