Completed
Push — master ( 5442f7...aba4f0 )
by Tim
01:53
created
Classes/Service/Url/Typo3Route.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     {
45 45
         $parts = GeneralUtility::trimExplode('-', $value, true);
46 46
 
47
-        return (int) \array_pop($parts);
47
+        return (int)\array_pop($parts);
48 48
     }
49 49
 
50 50
     /**
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
      */
57 57
     protected function id2alias($value): string
58 58
     {
59
-        $alias = $this->getIndexBase((int) $value);
59
+        $alias = $this->getIndexBase((int)$value);
60 60
 
61 61
         $slugHelper = GeneralUtility::makeInstance(SlugHelper::class, 'pages', 'uid', []);
62 62
         $alias = $slugHelper->sanitize($alias);
63 63
 
64
-        return (string) $alias;
64
+        return (string)$alias;
65 65
     }
66 66
 }
Please login to merge, or discard this patch.
Classes/Service/Url/RealUrl.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             );
74 74
 
75 75
         foreach ($q->execute()->fetchAll() as $row) {
76
-            $removeIds[] = (int) $row['uid'];
76
+            $removeIds[] = (int)$row['uid'];
77 77
         }
78 78
 
79 79
         if (empty($removeIds)) {
@@ -112,12 +112,12 @@  discard block
 block discarded – undo
112 112
             ->fetch();
113 113
 
114 114
         if (isset($row['value_id'])) {
115
-            return (int) $row['value_id'];
115
+            return (int)$row['value_id'];
116 116
         }
117 117
 
118 118
         $matches = [];
119 119
         if (\preg_match('/^idx-([0-9]+)$/', $value, $matches)) {
120
-            return (int) $matches[1];
120
+            return (int)$matches[1];
121 121
         }
122 122
 
123 123
         return 0;
@@ -139,17 +139,17 @@  discard block
 block discarded – undo
139 139
             ->where(
140 140
                 $q->expr()->andX(
141 141
                     $q->expr()->eq('tablename', $q->expr()->literal(IndexerService::TABLE_NAME)),
142
-                    $q->expr()->eq('value_id', $q->createNamedParameter((int) $value, \PDO::PARAM_INT))
142
+                    $q->expr()->eq('value_id', $q->createNamedParameter((int)$value, \PDO::PARAM_INT))
143 143
                 )
144 144
             )
145 145
             ->execute()
146 146
             ->fetch();
147 147
 
148 148
         if (isset($row['value_alias'])) {
149
-            return (string) $row['value_alias'];
149
+            return (string)$row['value_alias'];
150 150
         }
151 151
 
152
-        $alias = $this->getIndexBase((int) $value);
152
+        $alias = $this->getIndexBase((int)$value);
153 153
         $alias = $this->prepareBase($alias);
154 154
         $alias = $this->cleanUrl($alias);
155 155
         $entry = [
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         }
165 165
 
166 166
         $aliasBase = $alias;
167
-        for ($i = 0;; ++$i) {
167
+        for ($i = 0; ; ++$i) {
168 168
             $alias = $i > 0 ? $aliasBase . '-' . $i : $aliasBase;
169 169
             if (!$this->aliasAlreadyExists($alias)) {
170 170
                 $entry['value_alias'] = $alias;
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         $q->resetQueryParts();
176 176
         $q->insert('tx_realurl_uniqalias')->values($entry)->execute();
177 177
 
178
-        return (string) $alias;
178
+        return (string)$alias;
179 179
     }
180 180
 
181 181
     /**
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         ->execute()
197 197
         ->fetchColumn(0);
198 198
 
199
-        return (bool) $count;
199
+        return (bool)$count;
200 200
     }
201 201
 
202 202
     /**
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
             $processedTitle = $utility->convertToSafeString($alias);
225 225
         }
226 226
 
227
-        return (string) $processedTitle;
227
+        return (string)$processedTitle;
228 228
     }
229 229
 
230 230
     /**
Please login to merge, or discard this patch.
Classes/Service/Url/AbstractUrl.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     protected function getIndexBase($indexUid): string
39 39
     {
40 40
         $indexRepository = HelperUtility::create(IndexRepository::class);
41
-        $index = $indexRepository->findByUid((int) $indexUid);
41
+        $index = $indexRepository->findByUid((int)$indexUid);
42 42
         if (!($index instanceof Index)) {
43 43
             return 'idx-' . $indexUid;
44 44
         }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         }
50 50
 
51 51
         $base = $originalObject->getRealUrlAliasBase();
52
-        if (!(bool) ConfigurationUtility::get('disableDateInSpeakingUrl')) {
52
+        if (!(bool)ConfigurationUtility::get('disableDateInSpeakingUrl')) {
53 53
             $datePart = $index->isAllDay() ? 'Y-m-d' : 'Y-m-d-' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'];
54 54
             $dateInfo = $index->getStartDateComplete()
55 55
                 ->format($datePart);
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
             $base .= '-' . $dateInfo;
58 58
         }
59 59
 
60
-        if ((bool) ConfigurationUtility::get('addIndexInSpeakingUrl') || \class_exists(PersistedAliasMapper::class)) {
60
+        if ((bool)ConfigurationUtility::get('addIndexInSpeakingUrl') || \class_exists(PersistedAliasMapper::class)) {
61 61
             $base .= '-' . $indexUid;
62 62
         }
63 63
 
64
-        return (string) $base;
64
+        return (string)$base;
65 65
     }
66 66
 
67 67
     /**
Please login to merge, or discard this patch.
Classes/Service/Url/CoolUri.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
      */
60 60
     public function coolUri($xml, $value)
61 61
     {
62
-        $alias = $this->getIndexBase((int) $value);
62
+        $alias = $this->getIndexBase((int)$value);
63 63
         $alias = $this->prepareBase($alias);
64 64
         $alias = Functions::URLize($alias);
65 65
         $alias = Functions::sanitize_title_with_dashes($alias);
Please login to merge, or discard this patch.