@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | public function getFilters() |
| 31 | 31 | { |
| 32 | - return []; |
|
| 32 | + return [ ]; |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function getFunctions() |
| 39 | 39 | { |
| 40 | - return []; |
|
| 40 | + return [ ]; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | // Add here some custom twig extensions |
@@ -35,24 +35,24 @@ |
||
| 35 | 35 | |
| 36 | 36 | $queryString = ''; |
| 37 | 37 | if (strlen($query) < 3) { |
| 38 | - $queryString .= '+("' . self::escapeDoubleQuotes($query) . '") '; |
|
| 38 | + $queryString .= '+("'.self::escapeDoubleQuotes($query).'") '; |
|
| 39 | 39 | } else { |
| 40 | 40 | $queryValues = explode(' ', $query); |
| 41 | 41 | foreach ($queryValues as $queryValue) { |
| 42 | 42 | if (strlen($queryValue) > 2) { |
| 43 | - $queryString .= '+("' . self::escapeDoubleQuotes($queryValue) . '" OR ' . |
|
| 44 | - preg_replace('/([^\pL\s\d])/u', '?', $queryValue) . '* OR ' . |
|
| 45 | - preg_replace('/([^\pL\s\d])/u', '', $queryValue) . '~) '; |
|
| 43 | + $queryString .= '+("'.self::escapeDoubleQuotes($queryValue).'" OR '. |
|
| 44 | + preg_replace('/([^\pL\s\d])/u', '?', $queryValue).'* OR '. |
|
| 45 | + preg_replace('/([^\pL\s\d])/u', '', $queryValue).'~) '; |
|
| 46 | 46 | } else { |
| 47 | - $queryString .= '+("' . self::escapeDoubleQuotes($queryValue) . '") '; |
|
| 47 | + $queryString .= '+("'.self::escapeDoubleQuotes($queryValue).'") '; |
|
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | $hits = $searchManager |
| 53 | - ->createSearch($queryString . ' +(state:published)') |
|
| 53 | + ->createSearch($queryString.' +(state:published)') |
|
| 54 | 54 | ->locale($locale) |
| 55 | - ->index('page_' . $webspaceKey) |
|
| 55 | + ->index('page_'.$webspaceKey) |
|
| 56 | 56 | ->execute(); |
| 57 | 57 | |
| 58 | 58 | $data = $this->getAttributes( |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | $configuration = new Configuration(); |
| 32 | 32 | $config = $this->processConfiguration($configuration, $configs); |
| 33 | 33 | |
| 34 | - $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 34 | + $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 35 | 35 | $loader->load('services.xml'); |
| 36 | 36 | } |
| 37 | 37 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | define('SYMFONY_DEBUG', filter_var(getenv('SYMFONY_DEBUG') ?: SYMFONY_ENV === 'dev', FILTER_VALIDATE_BOOLEAN)); |
| 21 | 21 | |
| 22 | 22 | // maintenance mode |
| 23 | -$maintenanceFilePath = __DIR__ . '/../app/maintenance.php'; |
|
| 23 | +$maintenanceFilePath = __DIR__.'/../app/maintenance.php'; |
|
| 24 | 24 | if (SULU_MAINTENANCE && file_exists($maintenanceFilePath)) { |
| 25 | 25 | // show maintenance mode and exit if no allowed IP is met |
| 26 | 26 | if (require $maintenanceFilePath) { |
@@ -28,8 +28,8 @@ discard block |
||
| 28 | 28 | } |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | -$loader = require __DIR__ . '/../app/autoload.php'; |
|
| 32 | -include_once __DIR__ . '/../app/bootstrap.php.cache'; |
|
| 31 | +$loader = require __DIR__.'/../app/autoload.php'; |
|
| 32 | +include_once __DIR__.'/../app/bootstrap.php.cache'; |
|
| 33 | 33 | |
| 34 | 34 | if (SYMFONY_DEBUG) { |
| 35 | 35 | Debug::enable(); |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | define('SYMFONY_DEBUG', filter_var(getenv('SYMFONY_DEBUG') ?: SYMFONY_ENV === 'dev', FILTER_VALIDATE_BOOLEAN)); |
| 21 | 21 | |
| 22 | 22 | // maintenance mode |
| 23 | -$maintenanceFilePath = __DIR__ . '/../app/maintenance.php'; |
|
| 23 | +$maintenanceFilePath = __DIR__.'/../app/maintenance.php'; |
|
| 24 | 24 | if (SULU_MAINTENANCE && file_exists($maintenanceFilePath)) { |
| 25 | 25 | // show maintenance mode and exit if no allowed IP is met |
| 26 | 26 | if (require $maintenanceFilePath) { |
@@ -28,8 +28,8 @@ discard block |
||
| 28 | 28 | } |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | -$loader = require __DIR__ . '/../app/autoload.php'; |
|
| 32 | -include_once __DIR__ . '/../app/bootstrap.php.cache'; |
|
| 31 | +$loader = require __DIR__.'/../app/autoload.php'; |
|
| 32 | +include_once __DIR__.'/../app/bootstrap.php.cache'; |
|
| 33 | 33 | |
| 34 | 34 | if (SYMFONY_DEBUG) { |
| 35 | 35 | Debug::enable(); |