Skip to content

Commit

Permalink
chore: update phive tools
Browse files Browse the repository at this point in the history
  • Loading branch information
sitepark-veltrup committed Jul 8, 2024
1 parent c164d76 commit 7bd617e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpstan" version="^1.10.22" location="./tools/phpstan" copy="false" installed="1.10.22"/>
<phar name="composer-normalize" version="^2.32.0" location="./tools/composer-normalize" copy="false" installed="2.32.0"/>
<phar name="phpunit" version="^10.4.0" location="./tools/phpunit.phar" copy="true" installed="10.4.1"/>
<phar name="overtrue/phplint" version="^9.0.4" location="./tools/phplint" copy="false" installed="9.0.4"/>
<phar name="php-cs-fixer" version="^3.58.1" installed="3.58.1" copy="false" location="./tools/php-cs-fixer"/>
<phar name="phpstan" version="^1.10.22" location="./tools/phpstan" copy="false" installed="1.11.7"/>
<phar name="composer-normalize" version="^2.32.0" location="./tools/composer-normalize" copy="false" installed="2.43.0"/>
<phar name="phpunit" version="^10.4.0" location="./tools/phpunit.phar" copy="true" installed="10.5.26"/>
<phar name="overtrue/phplint" version="^9.0.4" location="./tools/phplint" copy="false" installed="9.4.1"/>
<phar name="php-cs-fixer" version="^3.58.1" installed="3.59.3" copy="false" location="./tools/php-cs-fixer"/>
</phive>
2 changes: 1 addition & 1 deletion src/RealmPropertiesUserLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private function loadRealm(): array
'Realm properties file not found: ' . $this->realmPropertiesFile,
);
}
$content = file_get_contents($this->realmPropertiesFile);
$content = @file_get_contents($this->realmPropertiesFile);
if ($content === false) {
throw new RuntimeException(
'Unable to load ' . $this->realmPropertiesFile,
Expand Down
2 changes: 1 addition & 1 deletion src/SiteKit/Voter.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function voteOnAttribute(

$patterns = $this->accessMap->getPatterns($subject);

$roles = $patterns[0];
$roles = $patterns[0] ?? null;

if ($roles === null || count($roles) === 0) {
return true;
Expand Down
2 changes: 1 addition & 1 deletion test/RealmPropertiesUserLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function testLoadUnreadableFile()
$passwordHasher = $this->createStub(
UserPasswordHasherInterface::class,
);
mkdir('./var/test/');
@mkdir('./var/test/');
$unreadable = './var/test/unreadable';
touch($unreadable);
chmod($unreadable, 0000);
Expand Down

0 comments on commit 7bd617e

Please sign in to comment.