@@ -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(); |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | |
| 16 | 16 | return $this->renderStructure( |
| 17 | 17 | $structure, |
| 18 | - ['metadata' => $metadata], |
|
| 18 | + [ 'metadata' => $metadata ], |
|
| 19 | 19 | $preview, |
| 20 | 20 | $partial |
| 21 | 21 | ); |
@@ -43,8 +43,8 @@ discard block |
||
| 43 | 43 | return [ |
| 44 | 44 | new \Twig_SimpleFunction( |
| 45 | 45 | 'show_source_code', |
| 46 | - [$this, 'showSourceCode'], |
|
| 47 | - ['is_safe' => ['html'], 'needs_environment' => true] |
|
| 46 | + [ $this, 'showSourceCode' ], |
|
| 47 | + [ 'is_safe' => [ 'html' ], 'needs_environment' => true ] |
|
| 48 | 48 | ), |
| 49 | 49 | ]; |
| 50 | 50 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $method->getStartLine() - 1, |
| 76 | 76 | $method->getEndLine() - $method->getStartLine() + 1 |
| 77 | 77 | ); |
| 78 | - $controllerCode = ' ' . $method->getDocComment() . "\n" . implode('', $methodCode); |
|
| 78 | + $controllerCode = ' '.$method->getDocComment()."\n".implode('', $methodCode); |
|
| 79 | 79 | |
| 80 | 80 | return [ |
| 81 | 81 | 'file_path' => $method->getFileName(), |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | private function getCallableReflector($callable) |
| 97 | 97 | { |
| 98 | 98 | if (is_array($callable)) { |
| 99 | - return new \ReflectionMethod($callable[0], $callable[1]); |
|
| 99 | + return new \ReflectionMethod($callable[ 0 ], $callable[ 1 ]); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | if (is_object($callable) && !$callable instanceof \Closure) { |
@@ -131,14 +131,14 @@ discard block |
||
| 131 | 131 | |
| 132 | 132 | $indentedLines = array_filter( |
| 133 | 133 | $codeLines, |
| 134 | - function ($lineOfCode) { |
|
| 134 | + function($lineOfCode) { |
|
| 135 | 135 | return '' === $lineOfCode || ' ' === substr($lineOfCode, 0, 4); |
| 136 | 136 | } |
| 137 | 137 | ); |
| 138 | 138 | |
| 139 | 139 | if (count($indentedLines) === count($codeLines)) { |
| 140 | 140 | $formattedCode = array_map( |
| 141 | - function ($lineOfCode) { |
|
| 141 | + function($lineOfCode) { |
|
| 142 | 142 | return substr($lineOfCode, 4); |
| 143 | 143 | }, |
| 144 | 144 | $codeLines |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | { |
| 24 | 24 | public function load(array $configs, ContainerBuilder $container) |
| 25 | 25 | { |
| 26 | - $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 26 | + $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 27 | 27 | |
| 28 | 28 | $loader->load('services.yml'); |
| 29 | 29 | } |