@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | 'mapped' => false, |
| 106 | 106 | 'required' => false |
| 107 | 107 | ]) |
| 108 | - ->addEventListener(FormEvents::PRE_SET_DATA, static function (FormEvent $event) use ($translator, $options) { |
|
| 108 | + ->addEventListener(FormEvents::PRE_SET_DATA, static function(FormEvent $event) use ($translator, $options) { |
|
| 109 | 109 | // ensure all display name and description exist for all locales |
| 110 | 110 | /** @var CategoryEntity $category */ |
| 111 | 111 | $category = $event->getData(); |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | $event->setData($category); |
| 131 | 131 | }) |
| 132 | - ->addEventListener(FormEvents::SUBMIT, static function (FormEvent $event) use ($translator, $options) { |
|
| 132 | + ->addEventListener(FormEvents::SUBMIT, static function(FormEvent $event) use ($translator, $options) { |
|
| 133 | 133 | // ensure all locales have a display name |
| 134 | 134 | /** @var CategoryEntity $category */ |
| 135 | 135 | $category = $event->getData(); |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | { |
| 107 | 107 | $api = $this->getMockBuilder(PermissionApiInterface::class) |
| 108 | 108 | ->getMock(); |
| 109 | - $api->method('hasPermission')->willReturnCallback(static function ($component = null, $instance = null, $level = ACCESS_NONE, $user = null) { |
|
| 109 | + $api->method('hasPermission')->willReturnCallback(static function($component = null, $instance = null, $level = ACCESS_NONE, $user = null) { |
|
| 110 | 110 | list(/*$regId*/, $catId) = explode('::', $instance); |
| 111 | 111 | |
| 112 | 112 | return 0 === $catId % 2; |
@@ -155,7 +155,7 @@ |
||
| 155 | 155 | private function setGuestTimeZone(): void |
| 156 | 156 | { |
| 157 | 157 | $existingOffset = $this->getSystemVar('timezone_offset'); |
| 158 | - $actualOffset = (float) $existingOffset * 60; // express in minutes |
|
| 158 | + $actualOffset = (float)$existingOffset * 60; // express in minutes |
|
| 159 | 159 | $timezoneAbbreviations = DateTimeZone::listAbbreviations(); |
| 160 | 160 | $timeZone = date_default_timezone_get(); |
| 161 | 161 | foreach ($timezoneAbbreviations as $abbreviation => $zones) { |
@@ -163,17 +163,17 @@ discard block |
||
| 163 | 163 | if ((!is_numeric($v) && '' !== $v) || (is_numeric($v) && 0 < $v)) { |
| 164 | 164 | if ('workflowState' === $k && 0 === strpos($v, '!')) { |
| 165 | 165 | $qb->andWhere('tbl.' . $k . ' != :' . $k) |
| 166 | - ->setParameter($k, substr($v, 1)); |
|
| 166 | + ->setParameter($k, substr($v, 1)); |
|
| 167 | 167 | } elseif (0 === strpos($v, '%')) { |
| 168 | 168 | $qb->andWhere('tbl.' . $k . ' LIKE :' . $k) |
| 169 | - ->setParameter($k, '%' . substr($v, 1) . '%'); |
|
| 169 | + ->setParameter($k, '%' . substr($v, 1) . '%'); |
|
| 170 | 170 | } elseif (in_array($k, ['schemes', 'methods'], true)) { |
| 171 | 171 | // multi list filter |
| 172 | 172 | $qb->andWhere('tbl.' . $k . ' LIKE :' . $k) |
| 173 | - ->setParameter($k, '%' . $v . '%'); |
|
| 173 | + ->setParameter($k, '%' . $v . '%'); |
|
| 174 | 174 | } else { |
| 175 | 175 | $qb->andWhere('tbl.' . $k . ' = :' . $k) |
| 176 | - ->setParameter($k, $v); |
|
| 176 | + ->setParameter($k, $v); |
|
| 177 | 177 | } |
| 178 | 178 | } |
| 179 | 179 | } |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | // per default we show approved routes only |
| 207 | 207 | $onlineStates = ['approved']; |
| 208 | 208 | $qb->andWhere('tbl.workflowState IN (:onlineStates)') |
| 209 | - ->setParameter('onlineStates', $onlineStates); |
|
| 209 | + ->setParameter('onlineStates', $onlineStates); |
|
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | return $qb; |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | $qb->andWhere('tbl.createdBy = :userId') |
| 273 | - ->setParameter('userId', $userId); |
|
| 273 | + ->setParameter('userId', $userId); |
|
| 274 | 274 | |
| 275 | 275 | return $qb; |
| 276 | 276 | } |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | $this->setSystemVar('sessionauthkeyua', 0); |
| 52 | 52 | $this->setSystemVar('secure_domain'); |
| 53 | 53 | $this->setSystemVar('signcookies', 1); |
| 54 | - $this->setSystemVar('signingkey', sha1((string) (random_int(0, time())))); |
|
| 54 | + $this->setSystemVar('signingkey', sha1((string)(random_int(0, time())))); |
|
| 55 | 55 | $this->setSystemVar('seclevel', 'Medium'); |
| 56 | 56 | $this->setSystemVar('secmeddays', 7); |
| 57 | 57 | $this->setSystemVar('secinactivemins', 20); |
@@ -47,23 +47,23 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | $pwd = getcwd(); |
| 49 | 49 | if (is_dir($buildDir)) { |
| 50 | - system("rm -rf ${buildDir}"); |
|
| 50 | + system("rm -rf ${builddir}"); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | // build env |
| 54 | 54 | $filesystem->mkdir($buildDir, 0755); |
| 55 | 55 | $progress->advance(); |
| 56 | 56 | |
| 57 | - $filesystem->mirror($sourceDir, "${buildDir}/${name}"); |
|
| 57 | + $filesystem->mirror($sourceDir, "${builddir}/${name}"); |
|
| 58 | 58 | $progress->advance(); |
| 59 | 59 | |
| 60 | - PurgeVendorsCommand::cleanVendors("${buildDir}/${name}/vendor", $progress); |
|
| 61 | - FixAutoloaderCommand::fix("${buildDir}/${name}/vendor", $progress); |
|
| 60 | + PurgeVendorsCommand::cleanVendors("${builddir}/${name}/vendor", $progress); |
|
| 61 | + FixAutoloaderCommand::fix("${builddir}/${name}/vendor", $progress); |
|
| 62 | 62 | |
| 63 | 63 | $writableArray = [ |
| 64 | - "${buildDir}/${name}/var/cache", |
|
| 65 | - "${buildDir}/${name}/var/log", |
|
| 66 | - "${buildDir}/${name}/web/uploads", |
|
| 64 | + "${builddir}/${name}/var/cache", |
|
| 65 | + "${builddir}/${name}/var/log", |
|
| 66 | + "${builddir}/${name}/web/uploads", |
|
| 67 | 67 | ]; |
| 68 | 68 | $filesystem->chmod($writableArray, 0777); |
| 69 | 69 | $progress->advance(); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | $zip = new ZipArchive(); |
| 87 | 87 | $fileName = "${name}.zip"; |
| 88 | 88 | if (true !== $zip->open($fileName, ZipArchive::CREATE)) { |
| 89 | - $output->writeln("<error>Error creating ${fileName}</error>"); |
|
| 89 | + $output->writeln("<error>Error creating ${filename}</error>"); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | foreach ($allFiles as $file) { |
@@ -99,9 +99,9 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | // build tar |
| 101 | 101 | $fileName = "${name}.tar"; |
| 102 | - system("tar cp ${name} > ${fileName}"); |
|
| 102 | + system("tar cp ${name} > ${filename}"); |
|
| 103 | 103 | $progress->advance(); |
| 104 | - system("gzip ${fileName}"); |
|
| 104 | + system("gzip ${filename}"); |
|
| 105 | 105 | $progress->advance(); |
| 106 | 106 | |
| 107 | 107 | // checksums |
@@ -117,16 +117,16 @@ discard block |
||
| 117 | 117 | -----------------sha1sums----------------- |
| 118 | 118 | ${zipSha1} ${name}.zip |
| 119 | 119 | ${tarSha1} ${name}.tar.gz |
| 120 | -CHECKSUM; |
|
| 120 | +checksum; |
|
| 121 | 121 | file_put_contents("${name}-checksum.txt", $checksum); |
| 122 | 122 | $progress->advance(); |
| 123 | 123 | |
| 124 | 124 | // cleanup |
| 125 | - system("rm -rf ${buildDir} ${name}"); |
|
| 125 | + system("rm -rf ${builddir} ${name}"); |
|
| 126 | 126 | chdir($pwd); |
| 127 | 127 | $progress->advance(); |
| 128 | 128 | $progress->finish(); |
| 129 | 129 | |
| 130 | - $output->writeln("<info>Artifacts built in ${buildDir}/ folder</info>"); |
|
| 130 | + $output->writeln("<info>Artifacts built in ${builddir}/ folder</info>"); |
|
| 131 | 131 | } |
| 132 | 132 | } |
@@ -123,7 +123,8 @@ |
||
| 123 | 123 | $form = $this->createForm(DefaultLoginType::class, ['uid' => $uid]); |
| 124 | 124 | $loginFormEvent = new UserFormAwareEvent($form); |
| 125 | 125 | $eventDispatcher->dispatch($loginFormEvent, AccessEvents::AUTHENTICATION_FORM); |
| 126 | - if ($form->count() > 3) { // count > 3 means that the AUTHENTICATION_FORM event added some form children |
|
| 126 | + if ($form->count() > 3) { |
|
| 127 | +// count > 3 means that the AUTHENTICATION_FORM event added some form children |
|
| 127 | 128 | $form->handleRequest($request); |
| 128 | 129 | if ($form->isSubmitted() && $form->isValid()) { |
| 129 | 130 | $uid = $form->get('uid')->getData(); |
@@ -282,7 +282,7 @@ |
||
| 282 | 282 | return $this->router->generate($routePrefix . 'view'); |
| 283 | 283 | case 'userOwnView': |
| 284 | 284 | case 'adminOwnView': |
| 285 | - return $this->router->generate($routePrefix . 'view', [ 'own' => 1 ]); |
|
| 285 | + return $this->router->generate($routePrefix . 'view', ['own' => 1]); |
|
| 286 | 286 | case 'userDisplay': |
| 287 | 287 | case 'adminDisplay': |
| 288 | 288 | if ( |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | if ($route->getTranslatable()) { |
| 73 | 73 | $languages = $container->get(LocaleApi::class)->getSupportedLocales(); |
| 74 | 74 | // TODO migrate this legacy call |
| 75 | - $isRequiredLangParam = true;//ZLanguage::isRequiredLangParam(); |
|
| 75 | + $isRequiredLangParam = true; //ZLanguage::isRequiredLangParam(); |
|
| 76 | 76 | if (!$isRequiredLangParam) { |
| 77 | 77 | $defaultLanguage = $this->variableApi->getSystemVar('language_i18n'); |
| 78 | 78 | unset($languages[array_search($defaultLanguage, $languages, true)]); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | ->getPathWithBundlePrefix($route) |
| 89 | 89 | ); |
| 90 | 90 | |
| 91 | - $path = preg_replace_callback('#%(.*?)%#', static function ($matches) use ($container) { |
|
| 91 | + $path = preg_replace_callback('#%(.*?)%#', static function($matches) use ($container) { |
|
| 92 | 92 | return '<abbr title="' . htmlspecialchars($matches[0]) . '">' |
| 93 | 93 | . htmlspecialchars($container->getParameter($matches[1])) |
| 94 | 94 | . '</abbr>' |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | |
| 98 | 98 | $defaults = $route->getDefaults(); |
| 99 | 99 | $requirements = $route->getRequirements(); |
| 100 | - $path = preg_replace_callback('#{(.*?)}#', function ($matches) use ($defaults, $requirements) { |
|
| 100 | + $path = preg_replace_callback('#{(.*?)}#', function($matches) use ($defaults, $requirements) { |
|
| 101 | 101 | $title = ''; |
| 102 | 102 | if (isset($defaults[$matches[1]])) { |
| 103 | 103 | $title .= $this->__f('Default: %s', ['%s' => htmlspecialchars($defaults[$matches[1]])]); |