@@ -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();  | 
                                                        
@@ -43,7 +43,7 @@ discard block  | 
                                                    ||
| 43 | 43 | // $loader->unregister();  | 
                                                        
| 44 | 44 | // $apcLoader->register(true);  | 
                                                        
| 45 | 45 | |
| 46 | -require_once __DIR__ . '/../app/WebsiteKernel.php';  | 
                                                        |
| 46 | +require_once __DIR__.'/../app/WebsiteKernel.php';  | 
                                                        |
| 47 | 47 | |
| 48 | 48 | $kernel = new WebsiteKernel(SYMFONY_ENV, SYMFONY_DEBUG);  | 
                                                        
| 49 | 49 | $kernel->loadClassCache();  | 
                                                        
@@ -51,7 +51,7 @@ discard block  | 
                                                    ||
| 51 | 51 | // Comment this line if you want to use the "varnish" http  | 
                                                        
| 52 | 52 | // caching strategy. See http://sulu.readthedocs.org/en/latest/cookbook/caching-with-varnish.html  | 
                                                        
| 53 | 53 |  if (SYMFONY_ENV != 'dev') { | 
                                                        
| 54 | - require_once __DIR__ . '/../app/WebsiteCache.php';  | 
                                                        |
| 54 | + require_once __DIR__.'/../app/WebsiteCache.php';  | 
                                                        |
| 55 | 55 | $kernel = new WebsiteCache($kernel);  | 
                                                        
| 56 | 56 | |
| 57 | 57 | // When using the HttpCache, you need to call the method in your front controller  | 
                                                        
@@ -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();  | 
                                                        
@@ -45,7 +45,7 @@ discard block  | 
                                                    ||
| 45 | 45 | $apcLoader->register(true);  | 
                                                        
| 46 | 46 | */  | 
                                                        
| 47 | 47 | |
| 48 | -require_once __DIR__ . '/../app/AdminKernel.php';  | 
                                                        |
| 48 | +require_once __DIR__.'/../app/AdminKernel.php';  | 
                                                        |
| 49 | 49 | |
| 50 | 50 | $kernel = new AdminKernel(SYMFONY_ENV, SYMFONY_DEBUG);  | 
                                                        
| 51 | 51 | $kernel->loadClassCache();  |