Passed
Push — 3.0 ( 6a2c92...106529 )
by Axel
06:21
created
Zikula/CoreInstallerBundle/EventListener/InstallUpgradeCheckListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
         $containsInstall = 'install' === $routeInfo['_route'];
78 78
         $containsUpgrade = 'upgrade' === $routeInfo['_route'];
79 79
         $containsLogin = 'Zikula\\UsersModule\\Controller\\AccessController::loginAction' === $routeInfo['_controller'];
80
-        $containsWdt =  '_wdt' === $routeInfo['_route'];
80
+        $containsWdt = '_wdt' === $routeInfo['_route'];
81 81
         $containsProfiler = false !== mb_strpos($routeInfo['_route'], '_profiler');
82 82
         $containsRouter = 'fos_js_routing_js' === $routeInfo['_route'];
83 83
         $doNotRedirect = $containsProfiler || $containsWdt || $containsRouter || $request->isXmlHttpRequest();
Please login to merge, or discard this patch.
src/system/RoutesModule/Base/AbstractRoutesModuleInstaller.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,8 @@
 block discarded – undo
49 49
         RequestStack $requestStack,
50 50
         TranslatorInterface $translator,
51 51
         VariableApiInterface $variableApi,
52
-        LoggerInterface $logger) {
52
+        LoggerInterface $logger)
53
+    {
53 54
         parent::__construct($extension, $managerRegistry, $schemaTool, $requestStack, $translator, $variableApi);
54 55
         $this->logger = $logger;
55 56
     }
Please login to merge, or discard this patch.
src/system/ZAuthModule/Api/PasswordApi.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -179,8 +179,8 @@
 block discarded – undo
179 179
         if (1 === mb_strlen($saltDelimiter) && false !== mb_strpos($saltedHash, $saltDelimiter)) {
180 180
             [$hashMethod, $saltStr, $correctHash] = explode($saltDelimiter, $saltedHash);
181 181
 
182
-            if (is_numeric($hashMethod) && ((int)$hashMethod === $hashMethod)) {
183
-                $hashMethod = (int)$hashMethod;
182
+            if (is_numeric($hashMethod) && ((int) $hashMethod === $hashMethod)) {
183
+                $hashMethod = (int) $hashMethod;
184 184
             }
185 185
             $hashMethodName = $hashMethodCodeToName[$hashMethod] ?? $hashMethod;
186 186
 
Please login to merge, or discard this patch.
src/system/ZAuthModule/Controller/AccountController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -307,7 +307,7 @@
 block discarded – undo
307 307
             $data = $form->getData();
308 308
             $code = bin2hex(random_bytes(8));
309 309
             $hashedCode = $encoderFactory->getEncoder(AuthenticationMappingEntity::class)->encodePassword($code, null);
310
-            $currentUserId = (int)$currentUserApi->get('uid');
310
+            $currentUserId = (int) $currentUserApi->get('uid');
311 311
             $userVerificationRepository->setVerificationCode($currentUserId, ZAuthConstant::VERIFYCHGTYPE_EMAIL, $hashedCode, $data['email']);
312 312
             $templateArgs = [
313 313
                 'uname'    => $currentUserApi->get('uname'),
Please login to merge, or discard this patch.
src/system/ExtensionsModule/Controller/HelpController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
         // rewrite local links
76 76
         $content = preg_replace_callback(
77 77
             '/\[(.*?)\]\((.*?)\)/',
78
-            function ($match) use ($router, $moduleName, $raw) {
78
+            function($match) use ($router, $moduleName, $raw) {
79 79
                 if (false === mb_strpos($match[2], '.md')) {
80 80
                     return $match[0];
81 81
                 }
Please login to merge, or discard this patch.
Validator/Constraints/AuthenticateAdminLoginValidator.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,8 @@  discard block
 block discarded – undo
77 77
 
78 78
         $passwordEncoder = $this->encoderFactory->getEncoder(AuthenticationMappingEntity::class);
79 79
 
80
-        if (empty($user) || $user['uid'] <= 1) { // || !$passwordEncoder->isPasswordValid($user['pass'], $object['password'], null)) {
80
+        if (empty($user) || $user['uid'] <= 1) {
81
+// || !$passwordEncoder->isPasswordValid($user['pass'], $object['password'], null)) {
81 82
             $this->context
82 83
                 ->buildViolation($this->trans('Error! Could not login because the user could not be found. Please try again.'))
83 84
                 ->addViolation();
@@ -92,7 +93,8 @@  discard block
 block discarded – undo
92 93
                 // new way
93 94
                 $passwordEncoder->isPasswordValid($user['pass'], $object['password'], null)) {
94 95
                 $validPassword = true;
95
-                if ($passwordEncoder->needsRehash($user['pass'])) { // check to update hash to newer algo
96
+                if ($passwordEncoder->needsRehash($user['pass'])) {
97
+// check to update hash to newer algo
96 98
                     $this->setPassword((int) $user['uid'], $object['password']);
97 99
                 }
98 100
             }
Please login to merge, or discard this patch.
src/system/PermissionsModule/Api/PermissionApi.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     public function hasPermission(string $component = null, string $instance = null, int $level = ACCESS_NONE, int $user = null): bool
91 91
     {
92 92
         if (!isset($user)) {
93
-            $user = (int)$this->currentUserApi->get('uid');
93
+            $user = (int) $this->currentUserApi->get('uid');
94 94
         }
95 95
         $user = !$user ? Constant::USER_ID_ANONYMOUS : $user;
96 96
         if (!isset($this->groupPermsByUser[$user]) || false === $this->groupPermsByUser[$user]) {
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         foreach ($permsByGroup as $perm) {
133 133
             $component = $this->normalizeRegexString($perm['component']);
134 134
             $instance = $this->normalizeRegexString($perm['instance']);
135
-            $level = (int)$perm['level']; // this string must be a numeric and not normalized.
135
+            $level = (int) $perm['level']; // this string must be a numeric and not normalized.
136 136
             $groupPerms[] = [
137 137
                 'component' => $component,
138 138
                 'instance' => $instance,
Please login to merge, or discard this patch.
src/system/PermissionsModule/Tests/Api/PermissionApiTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
         $this->currentUserApi
68 68
             ->method('get')
69 69
             ->with($this->equalTo('uid'))
70
-            ->willReturnCallback(static function () use ($userId) {
70
+            ->willReturnCallback(static function() use ($userId) {
71 71
                 return $userId ?? Constant::USER_ID_ANONYMOUS;
72 72
             });
73 73
         $api = new PermissionApi($this->permRepo, $this->userRepo, $this->currentUserApi, $this->translator);
Please login to merge, or discard this patch.
src/system/PermissionsModule/Tests/Api/AbstractPermissionTestCase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
         $this->userRepo
75 75
             ->method('findByUids')
76 76
             ->with($this->anything())
77
-            ->willReturnCallback(function (array $uids) {
77
+            ->willReturnCallback(function(array $uids) {
78 78
                 $groups = new ArrayCollection();
79 79
                 // getGroups returns [gid => $group, gid => $group, ...]
80 80
                 if (in_array(self::RANDOM_USER_ID, $uids, true)) {
Please login to merge, or discard this patch.