Completed
Pull Request — master (#4143)
by Craig
10:27
created
src/system/BlocksModule/Controller/PlacementController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
         $query->getResult();
100 100
 
101 101
         // add new block positions
102
-        foreach ((array)$blockorder as $order => $bid) {
102
+        foreach ((array) $blockorder as $order => $bid) {
103 103
             $placement = new BlockPlacementEntity();
104 104
             $placement->setPosition($em->getReference('ZikulaBlocksModule:BlockPositionEntity', $position));
105 105
             $placement->setBlock($em->getReference('ZikulaBlocksModule:BlockEntity', $bid));
Please login to merge, or discard this patch.
src/system/ThemeModule/EventListener/AddJSConfigListener.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,10 +97,10 @@
 block discarded – undo
97 97
             'entrypoint' => ZikulaKernel::FRONT_CONTROLLER,
98 98
             'baseURL' => $event->getRequest()->getSchemeAndHttpHost() . '/',
99 99
             'baseURI' => $event->getRequest()->getBasePath(),
100
-            'ajaxtimeout' => (int)$this->variableApi->getSystemVar('ajaxtimeout', 5000),
100
+            'ajaxtimeout' => (int) $this->variableApi->getSystemVar('ajaxtimeout', 5000),
101 101
             'lang' => $event->getRequest()->getLocale(),
102 102
             'sessionName' => isset($session) ? $session->getName() : $this->defaultSessionName,
103
-            'uid' => (int)$this->currentUserApi->get('uid')
103
+            'uid' => (int) $this->currentUserApi->get('uid')
104 104
         ];
105 105
 
106 106
         $config = array_map('htmlspecialchars', $config);
Please login to merge, or discard this patch.
src/system/ThemeModule/Engine/Asset/Merger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
             $this->lifetime,
114 114
             $this->kernel->getCacheDir() . '/assets/' . $type
115 115
         );
116
-        $key = md5(serialize($assets)) . (int)$this->minify . (int)$this->compress . $this->lifetime . '.combined.' . $type;
116
+        $key = md5(serialize($assets)) . (int) $this->minify . (int) $this->compress . $this->lifetime . '.combined.' . $type;
117 117
         $data = $cacheService->get($key, function() use ($cachedFiles, $type) {
118 118
             $data = [];
119 119
             foreach ($cachedFiles as $k => $file) {
Please login to merge, or discard this patch.
src/system/ExtensionsModule/Entity/Repository/ExtensionVarRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             ->getQuery();
48 48
         $result = $query->execute();
49 49
 
50
-        return (bool)$result;
50
+        return (bool) $result;
51 51
     }
52 52
 
53 53
     public function deleteByExtension(string $extensionName): bool
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             ->getQuery();
60 60
         $result = $query->execute();
61 61
 
62
-        return (bool)$result;
62
+        return (bool) $result;
63 63
     }
64 64
 
65 65
     public function updateName(string $oldName, string $newName): bool
@@ -73,6 +73,6 @@  discard block
 block discarded – undo
73 73
             ->getQuery();
74 74
         $result = $query->execute();
75 75
 
76
-        return (bool)$result;
76
+        return (bool) $result;
77 77
     }
78 78
 }
Please login to merge, or discard this patch.
src/system/ExtensionsModule/Helper/BundleSyncHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -258,7 +258,7 @@
 block discarded – undo
258 258
     ): void {
259 259
         foreach ($extensionsFromFile as $name => $extensionFromFile) {
260 260
             foreach ($extensionsFromDB as $dbname => $extensionFromDB) {
261
-                if (isset($extensionFromDB['name']) && in_array($extensionFromDB['name'], (array)$extensionFromFile['oldnames'], true)) {
261
+                if (isset($extensionFromDB['name']) && in_array($extensionFromDB['name'], (array) $extensionFromFile['oldnames'], true)) {
262 262
                     // migrate its modvars
263 263
                     $this->extensionVarRepository->updateName($dbname, $name);
264 264
                     // rename the extension register
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[] = ['component' => $component, 'instance' => $instance, 'level' => $level];
137 137
         }
138 138
 
Please login to merge, or discard this patch.
src/system/PermissionsModule/Controller/ConfigController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
         }
49 49
 
50 50
         $modVars = $variableApi->getAll('ZikulaPermissionsModule');
51
-        $modVars['lockadmin'] = (bool)$modVars['lockadmin'];
52
-        $modVars['filter'] = (bool)$modVars['filter'];
51
+        $modVars['lockadmin'] = (bool) $modVars['lockadmin'];
52
+        $modVars['filter'] = (bool) $modVars['filter'];
53 53
 
54 54
         $form = $this->createForm(ConfigType::class, $modVars);
55 55
         $form->handleRequest($request);
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
 
60 60
                 $error = false;
61 61
 
62
-                $lockadmin = isset($formData['lockadmin']) ? (bool)$formData['lockadmin'] : false;
62
+                $lockadmin = isset($formData['lockadmin']) ? (bool) $formData['lockadmin'] : false;
63 63
                 $variableApi->set('ZikulaPermissionsModule', 'lockadmin', $lockadmin);
64 64
 
65
-                $adminId = isset($formData['adminid']) ? (int)$formData['adminid'] : 1;
65
+                $adminId = isset($formData['adminid']) ? (int) $formData['adminid'] : 1;
66 66
                 if (0 !== $adminId) {
67 67
                     $perm = $permissionRepository->find($adminId);
68 68
                     if (!$perm) {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                 }
73 73
                 $variableApi->set('ZikulaPermissionsModule', 'adminid', $adminId);
74 74
 
75
-                $filter = isset($formData['filter']) ? (bool)$formData['filter'] : false;
75
+                $filter = isset($formData['filter']) ? (bool) $formData['filter'] : false;
76 76
                 $variableApi->set('ZikulaPermissionsModule', 'filter', $filter);
77 77
 
78 78
                 if (true === $error) {
Please login to merge, or discard this patch.
src/system/PermissionsModule/Controller/PermissionController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
             'lockadmin' => $this->getVar('lockadmin', 1) ? 1 : 0,
77 77
             'adminId' => $this->getVar('adminid', 1),
78 78
             'schema' => $schemaHelper->getAllSchema(),
79
-            'enableFilter' => (bool)$this->getVar('filter', 1)
79
+            'enableFilter' => (bool) $this->getVar('filter', 1)
80 80
         ];
81 81
     }
82 82
 
Please login to merge, or discard this patch.
src/system/PermissionsModule/Entity/Repository/PermissionRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
         $query = $qb->select($qb->expr()->max('p.sequence'))
96 96
             ->getQuery();
97 97
 
98
-        return (int)$query->getSingleScalarResult();
98
+        return (int) $query->getSingleScalarResult();
99 99
     }
100 100
 
101 101
     public function updateSequencesFrom(int $value, int $amount = 1): void
Please login to merge, or discard this patch.