Skip to content

Commit

Permalink
Apply recommended php-cs-fixer rules for PHP 8.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
demiankatz committed Jan 10, 2024
1 parent 2608ffc commit 49cafcf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions module/VuFind/src/VuFind/Cache/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ protected function createFileCache($cacheName, $dirName, $overrideOpts = [])
// convert umask from string
$umask = octdec($opts['umask']);
// validate
if ($umask & 0700) {
if ($umask & 0o700) {
throw new \Exception(
'Invalid umask: ' . $opts['umask']
. '; need permission to execute, read and write by owner'
Expand All @@ -308,7 +308,7 @@ protected function createFileCache($cacheName, $dirName, $overrideOpts = [])
$dir_perm = octdec($opts['dir_permission']);
} else {
// 0777 is chmod default, use if dir_permission is not explicitly set
$dir_perm = 0777;
$dir_perm = 0o777;
}
// Make sure cache parent directory and directory itself exist:
$parentDir = dirname($dirName);
Expand Down
2 changes: 1 addition & 1 deletion module/VuFind/src/VuFind/Sitemap/AbstractFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function write($file)
// if a subfolder was specified that does not exist, make one
$dirname = dirname($file);
if (!is_dir($dirname)) {
mkdir($dirname, 0755, true);
mkdir($dirname, 0o755, true);
}
return file_put_contents($file, $this->toString());
}
Expand Down
2 changes: 1 addition & 1 deletion module/VuFind/tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@
throw new \Exception('LOCAL_OVERRIDE_DIR must be defined');
}
if (!file_exists(LOCAL_OVERRIDE_DIR)) {
mkdir(LOCAL_OVERRIDE_DIR, 0777, true);
mkdir(LOCAL_OVERRIDE_DIR, 0o777, true);
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ protected static function makeFakeThemeStructure($ext)
$temp = sys_get_temp_dir();
$testDest = $temp . "/vufind_{$ext}_comp_test/";
// Create directory structure, recursively
mkdir($testDest . "themes/child/$ext", 0777, true);
mkdir($testDest . 'themes/empty', 0777, true);
mkdir($testDest . 'themes/parent/css', 0777, true);
mkdir($testDest . "themes/parent/$ext/relative", 0777, true);
mkdir($testDest . "themes/child/$ext", 0o777, true);
mkdir($testDest . 'themes/empty', 0o777, true);
mkdir($testDest . 'themes/parent/css', 0o777, true);
mkdir($testDest . "themes/parent/$ext/relative", 0o777, true);
file_put_contents(
$testDest . 'themes/empty/theme.config.php',
'<?php return array("extends"=>false);'
Expand Down

0 comments on commit 49cafcf

Please sign in to comment.