@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace App\Repository; |
6 | 6 | |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | } |
165 | 165 | |
166 | 166 | if ($this->parameterBag->has("database_meta_table")) { |
167 | - $table = $this->parameterBag->get('database_meta_name') . '.' . |
|
167 | + $table = $this->parameterBag->get('database_meta_name').'.'. |
|
168 | 168 | $this->parameterBag->get('database_meta_table'); |
169 | 169 | } else { |
170 | 170 | $table = "meta_p.wiki"; |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | || $projMetadata['url'] == "https://$project" |
214 | 214 | || $projMetadata['url'] == "https://$project.org" |
215 | 215 | || $projMetadata['url'] == "https://www.$project") { |
216 | - $this->logger->debug(__METHOD__ . " Using cached data for $project"); |
|
216 | + $this->logger->debug(__METHOD__." Using cached data for $project"); |
|
217 | 217 | return $projMetadata; |
218 | 218 | } |
219 | 219 | } |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | ]])->getBody()->getContents(), true); |
410 | 410 | |
411 | 411 | $extensions = $res['query']['extensions'] ?? []; |
412 | - return array_map(function ($extension) { |
|
412 | + return array_map(function($extension) { |
|
413 | 413 | return $extension['name']; |
414 | 414 | }, $extensions); |
415 | 415 | } |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace App\Repository; |
5 | 5 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | if (file_exists(dirname(__DIR__).'/var/cache/prod/srcApp_KernelProdContainer.preload.php')) { |
6 | 6 | require dirname(__DIR__).'/var/cache/prod/srcApp_KernelProdContainer.preload.php'; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace DoctrineMigrations; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace DoctrineMigrations; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace DoctrineMigrations; |
6 | 6 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace App\Model; |
6 | 6 | |
@@ -126,14 +126,14 @@ discard block |
||
126 | 126 | $firstAddrUnpacked = unpack('H*', $firstAddrBin); |
127 | 127 | $firstAddrHex = reset($firstAddrUnpacked); |
128 | 128 | $range[0] = inet_ntop($firstAddrBin); |
129 | - $flexBits = 128 - $prefixLen; |
|
129 | + $flexBits = 128-$prefixLen; |
|
130 | 130 | $lastAddrHex = $firstAddrHex; |
131 | 131 | |
132 | 132 | $pos = 31; |
133 | 133 | while ($flexBits > 0) { |
134 | 134 | $orig = substr($lastAddrHex, $pos, 1); |
135 | 135 | $origVal = hexdec($orig); |
136 | - $newVal = $origVal | (pow(2, min(4, $flexBits)) - 1); |
|
136 | + $newVal = $origVal | (pow(2, min(4, $flexBits))-1); |
|
137 | 137 | $new = dechex($newVal); |
138 | 138 | $lastAddrHex = substr_replace($lastAddrHex, $new, $pos, 1); |
139 | 139 | $flexBits -= 4; |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | $range[1] = inet_ntop($lastAddrBin); |
145 | 145 | } else { |
146 | 146 | $cidr = explode('/', $this->username); |
147 | - $range[0] = long2ip(ip2long($cidr[0]) & -1 << (32 - (int)$cidr[1])); |
|
148 | - $range[1] = long2ip(ip2long($range[0]) + pow(2, (32 - (int)$cidr[1])) - 1); |
|
147 | + $range[0] = long2ip(ip2long($cidr[0]) & -1 << (32-(int)$cidr[1])); |
|
148 | + $range[1] = long2ip(ip2long($range[0])+pow(2, (32-(int)$cidr[1]))-1); |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | // Find the leftmost common characters between the two addresses. |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $timeline = []; |
105 | 105 | $startObj = new DateTime($start); |
106 | 106 | $endObj = new DateTime($end); |
107 | - $numDays = (int) $endObj->diff($startObj)->format("%a"); |
|
107 | + $numDays = (int)$endObj->diff($startObj)->format("%a"); |
|
108 | 108 | $grandSum = 0; |
109 | 109 | |
110 | 110 | // Generate array of date labels |
@@ -114,17 +114,17 @@ discard block |
||
114 | 114 | |
115 | 115 | foreach ($data as $entry) { |
116 | 116 | if (!isset($totals[$entry['tool']])) { |
117 | - $totals[$entry['tool']] = (int) $entry['count']; |
|
117 | + $totals[$entry['tool']] = (int)$entry['count']; |
|
118 | 118 | |
119 | 119 | // Create arrays for each tool, filled with zeros for each date in the timeline |
120 | 120 | $timeline[$entry['tool']] = array_fill(0, $numDays, 0); |
121 | 121 | } else { |
122 | - $totals[$entry['tool']] += (int) $entry['count']; |
|
122 | + $totals[$entry['tool']] += (int)$entry['count']; |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | $date = new DateTime($entry['date']); |
126 | - $dateIndex = (int) $date->diff($startObj)->format("%a"); |
|
127 | - $timeline[$entry['tool']][$dateIndex] = (int) $entry['count']; |
|
126 | + $dateIndex = (int)$date->diff($startObj)->format("%a"); |
|
127 | + $timeline[$entry['tool']][$dateIndex] = (int)$entry['count']; |
|
128 | 128 | |
129 | 129 | $grandSum += $entry['count']; |
130 | 130 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $timeline = []; |
160 | 160 | $startObj = new DateTime($start); |
161 | 161 | $endObj = new DateTime($end); |
162 | - $numDays = (int) $endObj->diff($startObj)->format("%a"); |
|
162 | + $numDays = (int)$endObj->diff($startObj)->format("%a"); |
|
163 | 163 | $grandSum = 0; |
164 | 164 | |
165 | 165 | // Generate array of date labels |
@@ -169,17 +169,17 @@ discard block |
||
169 | 169 | |
170 | 170 | foreach ($data as $entry) { |
171 | 171 | if (!isset($totals[$entry['endpoint']])) { |
172 | - $totals[$entry['endpoint']] = (int) $entry['count']; |
|
172 | + $totals[$entry['endpoint']] = (int)$entry['count']; |
|
173 | 173 | |
174 | 174 | // Create arrays for each endpoint, filled with zeros for each date in the timeline |
175 | 175 | $timeline[$entry['endpoint']] = array_fill(0, $numDays, 0); |
176 | 176 | } else { |
177 | - $totals[$entry['endpoint']] += (int) $entry['count']; |
|
177 | + $totals[$entry['endpoint']] += (int)$entry['count']; |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | $date = new DateTime($entry['date']); |
181 | - $dateIndex = (int) $date->diff($startObj)->format("%a"); |
|
182 | - $timeline[$entry['endpoint']][$dateIndex] = (int) $entry['count']; |
|
181 | + $dateIndex = (int)$date->diff($startObj)->format("%a"); |
|
182 | + $timeline[$entry['endpoint']][$dateIndex] = (int)$entry['count']; |
|
183 | 183 | |
184 | 184 | $grandSum += $entry['count']; |
185 | 185 | } |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | |
240 | 240 | /** @var Connection $conn */ |
241 | 241 | $conn = $managerRegistry->getConnection('default'); |
242 | - $date = date('Y-m-d'); |
|
242 | + $date = date('Y-m-d'); |
|
243 | 243 | |
244 | 244 | // Tool name needs to be lowercase. |
245 | 245 | $tool = strtolower($tool); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace App\Exception; |
6 | 6 |