@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php require __DIR__ . '/_header.php'; ?> |
|
| 1 | +<?php require __DIR__.'/_header.php'; ?> |
|
| 2 | 2 | <div class="row"> |
| 3 | 3 | <div class="column"> |
| 4 | 4 | <div class="bloc bloc-number"> |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | <tbody id="contentClassRank" class="clusterize-content"> |
| 96 | 96 | <?php |
| 97 | 97 | $classesS = $classes; |
| 98 | - usort($classesS, function ($a, $b) { |
|
| 98 | + usort($classesS, function($a, $b) { |
|
| 99 | 99 | return strcmp($b['pageRank'], $a['pageRank']); |
| 100 | 100 | }); |
| 101 | 101 | //$classesS = array_slice($classesS, 0, 10); |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | <tbody id="contentPackages" class="clusterize-content"> |
| 134 | 134 | <?php |
| 135 | 135 | $packages = isset($project['composer'], $project['composer']['packages']) ? $project['composer']['packages'] : []; |
| 136 | - usort($packages, function ($a, $b) { |
|
| 136 | + usort($packages, function($a, $b) { |
|
| 137 | 137 | return strcmp($a->name, $b->name); |
| 138 | 138 | }); |
| 139 | 139 | foreach ($packages as $package) { ?> |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | <?php } ?> |
| 147 | 147 | </tbody> |
| 148 | 148 | </table> |
| 149 | - <?php if(0 === sizeof($packages)) { ?> |
|
| 149 | + <?php if (0 === sizeof($packages)) { ?> |
|
| 150 | 150 | <div>No composer.json file found</div> |
| 151 | 151 | <?php } ?> |
| 152 | 152 | </div> |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | <div class="column"> |
| 158 | 158 | <div class="bloc bloc-number"> |
| 159 | 159 | <div class="label">Licences of Composer dependencies</div> |
| 160 | - <?php if(0 === sizeof($packages)) { ?> |
|
| 160 | + <?php if (0 === sizeof($packages)) { ?> |
|
| 161 | 161 | <div>No composer.json file found</div> |
| 162 | 162 | <?php } ?> |
| 163 | 163 | <div id="svg-licenses"></div> |
@@ -196,9 +196,9 @@ discard block |
||
| 196 | 196 | } |
| 197 | 197 | } |
| 198 | 198 | ?> |
| 199 | - chartLicenses(<?php echo json_encode(array_values($json));?>); |
|
| 199 | + chartLicenses(<?php echo json_encode(array_values($json)); ?>); |
|
| 200 | 200 | } |
| 201 | 201 | }; |
| 202 | 202 | </script> |
| 203 | 203 | |
| 204 | -<?php require __DIR__ . '/_footer.php'; ?> |
|
| 205 | 204 | \ No newline at end of file |
| 205 | +<?php require __DIR__.'/_footer.php'; ?> |
|
| 206 | 206 | \ No newline at end of file |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | |
| 37 | 37 | // get latest version |
| 38 | 38 | $latest = '0.0.0'; |
| 39 | - foreach ((array)$json->package->versions as $version => $datas) { |
|
| 39 | + foreach ((array) $json->package->versions as $version => $datas) { |
|
| 40 | 40 | $version = preg_replace('([^\.\d])', '', $version); |
| 41 | 41 | if (!preg_match('!\d+\.\d+\.\d+!', $version)) { |
| 42 | 42 | continue; |
@@ -48,13 +48,13 @@ discard block |
||
| 48 | 48 | if (!preg_match('/composer\.json|composer-dist\.json/', $filename)) { |
| 49 | 49 | continue; |
| 50 | 50 | } |
| 51 | - $datas = (object)json_decode(file_get_contents($filename)); |
|
| 51 | + $datas = (object) json_decode(file_get_contents($filename)); |
|
| 52 | 52 | |
| 53 | 53 | if (!isset($datas->require)) { |
| 54 | 54 | continue; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - $rawRequirements = array_merge($rawRequirements, (array)$datas->require); |
|
| 57 | + $rawRequirements = array_merge($rawRequirements, (array) $datas->require); |
|
| 58 | 58 | break; |
| 59 | 59 | } |
| 60 | 60 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | $package = $packagist->get($requirement); |
| 65 | 65 | |
| 66 | - $packages[$requirement] = (object)array( |
|
| 66 | + $packages[$requirement] = (object) array( |
|
| 67 | 67 | 'name' => $requirement, |
| 68 | 68 | 'required' => $version, |
| 69 | 69 | 'latest' => $package->latest, |