Completed
Pull Request — master (#4224)
by Craig
04:52
created
src/system/PrinterTheme/ZikulaPrinterTheme.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     {
45 45
         $text = preg_replace_callback(
46 46
             '/<a [^>]*href\s*=\s*\"?([^>\"]*)\"?[^>]*>(.*?)<\/a.*?>/i',
47
-            function ($matches) {
47
+            function($matches) {
48 48
                 $this->links[] = html_entity_decode($matches[1]);
49 49
                 // return the replaced link
50 50
                 return '<strong><em>' . $matches[2] . '</em></strong> <small>[' . count($this->links) . ']</small>';
Please login to merge, or discard this patch.
build/BuildPackageCommand.php 1 patch
Upper-Lower-Casing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -47,23 +47,23 @@  discard block
 block discarded – undo
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}/public/uploads",
64
+            "${builddir}/${name}/var/cache",
65
+            "${builddir}/${name}/var/log",
66
+            "${builddir}/${name}/public/uploads",
67 67
         ];
68 68
         $filesystem->chmod($writableArray, 0777);
69 69
         $progress->advance();
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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,17 +117,17 @@  discard block
 block discarded – undo
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
         return 0;
133 133
     }
Please login to merge, or discard this patch.
config/bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.');
32 32
 } else {
33 33
     // load all the .env files
34
-    (new Dotenv(false))->loadEnv(dirname(__DIR__).'/.env');
34
+    (new Dotenv(false))->loadEnv(dirname(__DIR__) . '/.env');
35 35
 }
36 36
 
37 37
 $_SERVER += $_ENV;
Please login to merge, or discard this patch.
src/system/GroupsModule/Entity/Repository/GroupRepository.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 
55 55
         $query = $qb->getQuery();
56 56
 
57
-        return (int)$query->getSingleScalarResult();
57
+        return (int) $query->getSingleScalarResult();
58 58
     }
59 59
 
60 60
     public function getGroups(
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,12 +45,12 @@  discard block
 block discarded – undo
45 45
 
46 46
         if (null !== $groupType) {
47 47
             $qb->where('g.gtype = :gtype')
48
-               ->setParameter('gtype', $groupType);
48
+                ->setParameter('gtype', $groupType);
49 49
         }
50 50
 
51 51
         if (null !== $excludedState) {
52 52
             $qb->andWhere('g.state != :state')
53
-               ->setParameter('state', $excludedState);
53
+                ->setParameter('state', $excludedState);
54 54
         }
55 55
 
56 56
         $query = $qb->getQuery();
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         // already another group by that name.
140 140
         if (is_numeric($excludedGroupId) && $excludedGroupId > 0) {
141 141
             $qb->andWhere($qb->expr()->neq('g.gid', ':ggid'))
142
-               ->setParameter('ggid', $excludedGroupId);
142
+                ->setParameter('ggid', $excludedGroupId);
143 143
         }
144 144
 
145 145
         $query = $qb->getQuery();
Please login to merge, or discard this patch.
src/system/GroupsModule/GroupsModuleInstaller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,8 @@
 block discarded – undo
59 59
         switch ($oldVersion) {
60 60
             case '2.3.2':
61 61
             case '2.4.0':
62
-                $this->setVar('mailwarning', (bool)$this->getVar('mailwarning'));
63
-                $this->setVar('hideclosed', (bool)$this->getVar('hideclosed'));
62
+                $this->setVar('mailwarning', (bool) $this->getVar('mailwarning'));
63
+                $this->setVar('hideclosed', (bool) $this->getVar('hideclosed'));
64 64
                 $this->setVar('hidePrivate', false);
65 65
             case '2.4.1':
66 66
                 /** @var UserEntity $anonymousUser */
Please login to merge, or discard this patch.
src/system/UsersModule/Validator/Constraints/ValidUserFieldsValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
                 ->setParameter('excludedUid', $data['uid']);
53 53
         }
54 54
 
55
-        if ((int)$qb->getQuery()->getSingleScalarResult() > 0) {
55
+        if ((int) $qb->getQuery()->getSingleScalarResult() > 0) {
56 56
             $this->context->buildViolation($this->translator->trans('The user name you entered (%userName%) has already been registered.', ['%userName%' => $data['uname']], 'validators'))
57 57
                 ->atPath('uname')
58 58
                 ->addViolation();
Please login to merge, or discard this patch.
src/system/UsersModule/Twig/Extension/OnlineExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,6 +68,6 @@
 block discarded – undo
68 68
             ->andWhere(Criteria::expr()->gt('lastused', $since));
69 69
         $online = $this->sessionRepository->matching($c)->count();
70 70
 
71
-        return (bool)$online;
71
+        return (bool) $online;
72 72
     }
73 73
 }
Please login to merge, or discard this patch.
src/system/UsersModule/Twig/Extension/ProfileExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
         string $title = ''
95 95
     ): string {
96 96
         if (empty($userId) || $userId < 1) {
97
-            return (string)$userId;
97
+            return (string) $userId;
98 98
         }
99 99
 
100 100
         return $this->determineProfileLink($userId, null, $class, $image, $maxLength, $title);
Please login to merge, or discard this patch.
src/system/UsersModule/Helper/RegistrationHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
      */
133 133
     public function approve(UserEntity $user): void
134 134
     {
135
-        $user->setApprovedBy((int)$this->currentUserApi->get('uid'));
135
+        $user->setApprovedBy((int) $this->currentUserApi->get('uid'));
136 136
         $user->setApprovedDate(new DateTime());
137 137
 
138 138
         $user->setActivated(UsersConstant::ACTIVATED_ACTIVE);
Please login to merge, or discard this patch.