Skip to content

Commit dec9952

Browse files
committed
update stan
1 parent 99f97d0 commit dec9952

2 files changed

Lines changed: 13 additions & 11 deletions

File tree

.phive/phars.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3-
<phar name="phpstan" version="2.1.31" installed="2.1.31" location="./tools/phpstan" copy="false"/>
4-
<phar name="psalm" version="7.0.0-beta16" installed="7.0.0-beta16" location="./tools/psalm" copy="false"/>
3+
<phar name="phpstan" version="2.1.55" installed="2.1.55" location="./tools/phpstan" copy="false"/>
4+
<phar name="psalm" version="7.0.0-beta19" installed="7.0.0-beta19" location="./tools/psalm" copy="false"/>
55
</phive>

src/Controller/ComposerController.php

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,24 @@ public function checkDependencies(): void
5353

5454
$output = $this->executeComposerCommand($input);
5555
$dependencies = array_filter(explode("\n", $output->fetch()));
56-
$packages = [];
56+
$semverCompatible = [];
57+
$bcBreaks = [];
5758
foreach ($dependencies as $dependency) {
58-
if (strpos($dependency, 'php_network_getaddresses') !== false) {
59+
if (str_contains($dependency, 'php_network_getaddresses')) {
5960
throw new RuntimeException('You have to be connected to the internet');
6061
}
61-
if (strpos($dependency, '<highlight>') !== false) {
62-
$packages['semverCompatible'][] = $dependency;
62+
if (str_contains($dependency, '<highlight>')) {
63+
$semverCompatible[] = $dependency;
6364
continue;
6465
}
65-
$packages['bcBreaks'][] = $dependency;
66+
$bcBreaks[] = $dependency;
6667
}
67-
if (!empty($packages['semverCompatible'])) {
68-
$packages['semverCompatible'] = trim(implode("\n", $packages['semverCompatible']));
68+
$packages = [];
69+
if ($semverCompatible) {
70+
$packages['semverCompatible'] = trim(implode("\n", $semverCompatible));
6971
}
70-
if (!empty($packages['bcBreaks'])) {
71-
$packages['bcBreaks'] = trim(implode("\n", $packages['bcBreaks']));
72+
if ($bcBreaks) {
73+
$packages['bcBreaks'] = trim(implode("\n", $bcBreaks));
7274
}
7375

7476
$this->viewBuilder()->setOption('serialize', ['packages']);

0 commit comments

Comments
 (0)