@@ -47,22 +47,22 @@ 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); |
|
| 60 | + PurgeVendorsCommand::cleanVendors("${builddir}/${name}/vendor", $progress); |
|
| 61 | 61 | |
| 62 | 62 | $writableArray = [ |
| 63 | - "${buildDir}/${name}/var/cache", |
|
| 64 | - "${buildDir}/${name}/var/log", |
|
| 65 | - "${buildDir}/${name}/public/uploads", |
|
| 63 | + "${builddir}/${name}/var/cache", |
|
| 64 | + "${builddir}/${name}/var/log", |
|
| 65 | + "${builddir}/${name}/public/uploads", |
|
| 66 | 66 | ]; |
| 67 | 67 | $filesystem->chmod($writableArray, 0777); |
| 68 | 68 | $progress->advance(); |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $zip = new ZipArchive(); |
| 86 | 86 | $fileName = "${name}.zip"; |
| 87 | 87 | if (true !== $zip->open($fileName, ZipArchive::CREATE)) { |
| 88 | - $output->writeln("<error>Error creating ${fileName}</error>"); |
|
| 88 | + $output->writeln("<error>Error creating ${filename}</error>"); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | foreach ($allFiles as $file) { |
@@ -98,9 +98,9 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | // build tar |
| 100 | 100 | $fileName = "${name}.tar"; |
| 101 | - system("tar cp ${name} > ${fileName}"); |
|
| 101 | + system("tar cp ${name} > ${filename}"); |
|
| 102 | 102 | $progress->advance(); |
| 103 | - system("gzip ${fileName}"); |
|
| 103 | + system("gzip ${filename}"); |
|
| 104 | 104 | $progress->advance(); |
| 105 | 105 | |
| 106 | 106 | // checksums |
@@ -116,17 +116,17 @@ discard block |
||
| 116 | 116 | -----------------sha1sums----------------- |
| 117 | 117 | ${zipSha1} ${name}.zip |
| 118 | 118 | ${tarSha1} ${name}.tar.gz |
| 119 | -CHECKSUM; |
|
| 119 | +checksum; |
|
| 120 | 120 | file_put_contents("${name}-checksum.txt", $checksum); |
| 121 | 121 | $progress->advance(); |
| 122 | 122 | |
| 123 | 123 | // cleanup |
| 124 | - system("rm -rf ${buildDir} ${name}"); |
|
| 124 | + system("rm -rf ${builddir} ${name}"); |
|
| 125 | 125 | chdir($pwd); |
| 126 | 126 | $progress->advance(); |
| 127 | 127 | $progress->finish(); |
| 128 | 128 | |
| 129 | - $output->writeln("<info>Artifacts built in ${buildDir}/ folder</info>"); |
|
| 129 | + $output->writeln("<info>Artifacts built in ${builddir}/ folder</info>"); |
|
| 130 | 130 | |
| 131 | 131 | return 0; |
| 132 | 132 | } |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | 'symfony-messenger-bridge' => 'Symfony Messenger Bridge', |
| 47 | 47 | ]; |
| 48 | 48 | $types = array_keys($typeOrder); |
| 49 | - usort($packages, function ($a, $b) use ($types) { |
|
| 49 | + usort($packages, function($a, $b) use ($types) { |
|
| 50 | 50 | $typeOrder = array_search($a['type'], $types) - array_search($b['type'], $types); |
| 51 | 51 | if (0 !== $typeOrder) { |
| 52 | 52 | return $typeOrder; |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | } |
| 99 | 99 | $tmp[] = $author['name']; |
| 100 | 100 | } |
| 101 | - usort($authors, function ($a, $b) { |
|
| 101 | + usort($authors, function($a, $b) { |
|
| 102 | 102 | return strcmp($a['name'], $b['name']); |
| 103 | 103 | }); |
| 104 | 104 | foreach ($authors as $author) { |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | if ($form->get('download')->isClicked()) { |
| 48 | 48 | $data = $form->getData(); |
| 49 | 49 | $response = new StreamedResponse(); |
| 50 | - $response->setCallback(function () use ($data, $userRepository) { |
|
| 50 | + $response->setCallback(function() use ($data, $userRepository) { |
|
| 51 | 51 | $fields = ['uid', 'uname', 'activated', 'email', 'registrationDate', 'lastLogin', 'groups']; |
| 52 | 52 | foreach ($fields as $k => $field) { |
| 53 | 53 | if (isset($data[$field]) && !$data[$field]) { |
@@ -122,7 +122,8 @@ |
||
| 122 | 122 | $form = $this->createForm(DefaultLoginType::class, ['uid' => $uid]); |
| 123 | 123 | $loginFormEvent = new LoginFormPostCreatedEvent($form); |
| 124 | 124 | $eventDispatcher->dispatch($loginFormEvent); |
| 125 | - if ($form->count() > 3) { // count > 3 means that the LoginFormPostCreatedEvent event added some form children |
|
| 125 | + if ($form->count() > 3) { |
|
| 126 | +// count > 3 means that the LoginFormPostCreatedEvent event added some form children |
|
| 126 | 127 | $form->handleRequest($request); |
| 127 | 128 | if ($form->isSubmitted() && $form->isValid()) { |
| 128 | 129 | $uid = $form->get('uid')->getData(); |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | * @throws InvalidAuthenticationMethodRegistrationFormException |
| 62 | 62 | * @throws Exception |
| 63 | 63 | */ |
| 64 | - #[Route('/register', name: 'zikulausersbundle_registration_register', methods: ['GET', 'POST'])] |
|
| 64 | + #[Route('/register', name : 'zikulausersbundle_registration_register', methods : ['GET', 'POST'])] |
|
| 65 | 65 | public function register( |
| 66 | 66 | Request $request, |
| 67 | 67 | CurrentUserApiInterface $currentUserApi, |
@@ -51,8 +51,8 @@ |
||
| 51 | 51 | // the following process should be unnecessary because cascade = all but MySQL 5.7 not working with that (#3726) |
| 52 | 52 | $qb = $this->_em->createQueryBuilder(); |
| 53 | 53 | $qb->delete(UserAttributeEntity::class, 'a') |
| 54 | - ->where('a.user = :userId') |
|
| 55 | - ->setParameter('userId', $user->getUid()); |
|
| 54 | + ->where('a.user = :userId') |
|
| 55 | + ->setParameter('userId', $user->getUid()); |
|
| 56 | 56 | $query = $qb->getQuery(); |
| 57 | 57 | $query->execute(); |
| 58 | 58 | // end of theoretically unrequired process |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | return $this->approvedDate; |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | - public function setApprovedDate(string|DateTimeInterface $approvedDate): self |
|
| 230 | + public function setApprovedDate(string | DateTimeInterface $approvedDate): self |
|
| 231 | 231 | { |
| 232 | 232 | if ($approvedDate instanceof DateTimeInterface) { |
| 233 | 233 | $this->approvedDate = $approvedDate; |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | return $this->registrationDate; |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | - public function setRegistrationDate(string|DateTimeInterface $registrationDate): self |
|
| 263 | + public function setRegistrationDate(string | DateTimeInterface $registrationDate): self |
|
| 264 | 264 | { |
| 265 | 265 | if ($registrationDate instanceof DateTimeInterface) { |
| 266 | 266 | $this->registrationDate = $registrationDate; |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | return $this->lastLogin; |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | - public function setLastLogin(string|DateTimeInterface $lastLogin): self |
|
| 279 | + public function setLastLogin(string | DateTimeInterface $lastLogin): self |
|
| 280 | 280 | { |
| 281 | 281 | if ($lastLogin instanceof DateTimeInterface) { |
| 282 | 282 | $this->lastLogin = $lastLogin; |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | ->info('E-mail address to notify of registrations (leave blank for no notifications).') |
| 56 | 56 | ->defaultNull() |
| 57 | 57 | ->validate() |
| 58 | - ->ifTrue(static function ($v) { |
|
| 58 | + ->ifTrue(static function($v) { |
|
| 59 | 59 | return null !== $v && !filter_var($v, FILTER_VALIDATE_EMAIL); |
| 60 | 60 | }) |
| 61 | 61 | ->thenInvalid('Please enter a valid mail address.') |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | ->info('Reserved user names. Separate each user name with a comma. Each user name on this list is not allowed to be chosen by someone registering for a new account.') |
| 74 | 74 | ->defaultValue('root, webmaster, admin, administrator, nobody, anonymous, username') |
| 75 | 75 | ->validate() |
| 76 | - ->ifTrue(static function ($v) { |
|
| 76 | + ->ifTrue(static function($v) { |
|
| 77 | 77 | $pattern = '/^(?:' . UsersConstant::UNAME_VALIDATION_PATTERN . '(?:\s*,\s*' . UsersConstant::UNAME_VALIDATION_PATTERN . ')*)?$/uD'; |
| 78 | 78 | |
| 79 | 79 | return null !== $v && !preg_match($pattern, $v); |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | ->info('Banned user agents. Separate each user agent string with a comma. Each item on this list is a browser user agent identification string. If a user attempts to register a new account using a browser whose user agent string begins with one on this list, then the user is not allowed to begin the registration process.') |
| 86 | 86 | ->defaultNull() |
| 87 | 87 | ->validate() |
| 88 | - ->ifTrue(static function ($v) { |
|
| 88 | + ->ifTrue(static function($v) { |
|
| 89 | 89 | $pattern = '/^(?:[^\s,][^,]*(?:,\s?[^\s,][^,]*)*)?$/'; |
| 90 | 90 | |
| 91 | 91 | return null !== $v && !preg_match($pattern, $v); |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | ->info('Banned e-mail address domains. Separate each domain with a comma. Each item on this list is an e-mail address domain (the part after the \'@\'). E-mail addresses on new registrations or on an existing user\'s change of e-mail address requests are not allowed to have any domain on this list.') |
| 98 | 98 | ->defaultNull() |
| 99 | 99 | ->validate() |
| 100 | - ->ifTrue(static function ($v) { |
|
| 100 | + ->ifTrue(static function($v) { |
|
| 101 | 101 | $pattern = '/^(?:' . UsersConstant::EMAIL_DOMAIN_VALIDATION_PATTERN . '(?:\s*,\s*' . UsersConstant::EMAIL_DOMAIN_VALIDATION_PATTERN . ')*)?$/Ui'; |
| 102 | 102 | |
| 103 | 103 | return null !== $v && !preg_match($pattern, $v); |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | { |
| 28 | 28 | $builder |
| 29 | 29 | ->add('users', EntityType::class, [ |
| 30 | - 'choice_attr' => static function () { |
|
| 30 | + 'choice_attr' => static function() { |
|
| 31 | 31 | return ['class' => 'user-checkboxes']; |
| 32 | 32 | }, |
| 33 | 33 | 'class' => UserEntity::class, |