@@ -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\EventSubscriber; |
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 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $this->repository = $repository; |
49 | 49 | $this->project = $project; |
50 | 50 | $this->user = $user; |
51 | - $this->categories = array_map(function ($category) { |
|
51 | + $this->categories = array_map(function($category) { |
|
52 | 52 | return str_replace(' ', '_', $category); |
53 | 53 | }, $categories); |
54 | 54 | $this->start = $start; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | */ |
81 | 81 | public function getCategoriesNormalized(): array |
82 | 82 | { |
83 | - return array_map(function ($category) { |
|
83 | + return array_map(function($category) { |
|
84 | 84 | return str_replace('_', ' ', $category); |
85 | 85 | }, $this->categories); |
86 | 86 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | string $centralAuthProject |
67 | 67 | ): RedirectResponse { |
68 | 68 | try { |
69 | - [ $next, $token ] = $this->getOauthClient($request, $projectRepo, $centralAuthProject)->initiate(); |
|
69 | + [$next, $token] = $this->getOauthClient($request, $projectRepo, $centralAuthProject)->initiate(); |
|
70 | 70 | } catch (Exception $oauthException) { |
71 | 71 | throw $oauthException; |
72 | 72 | // @TODO Make this work. |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | . '?title=Special:OAuth'; |
156 | 156 | $conf = new ClientConfig($endpoint); |
157 | 157 | $consumerKey = $this->getParameter('oauth_key'); |
158 | - $consumerSecret = $this->getParameter('oauth_secret'); |
|
158 | + $consumerSecret = $this->getParameter('oauth_secret'); |
|
159 | 159 | $conf->setConsumer(new Consumer($consumerKey, $consumerSecret)); |
160 | 160 | $this->oauthClient = new Client($conf); |
161 | 161 |
@@ -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. |