Skip to content

Commit

Permalink
CS Fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
loicsapone committed Aug 12, 2024
1 parent af1856b commit 2e5be75
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions src/Provider/LocalFilesystemProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function read(string $id): string
$contents = @file_get_contents($location);

if (false === $contents) {
throw new IOException(sprintf("Unable to read file '%s'", $location), 0, null, $location);
throw new IOException(\sprintf("Unable to read file '%s'", $location), 0, null, $location);
}

return $contents;
Expand All @@ -62,7 +62,7 @@ public function write(string $id, string $contents, int $flags = \LOCK_EX): void
$this->checkDirectoryExists(\dirname($location));

if (false === @file_put_contents($location, $contents, $flags)) {
throw new IOException(sprintf("Unable to write file '%s': ", $location).error_get_last()['message'], 0, null, $location);
throw new IOException(\sprintf("Unable to write file '%s': ", $location).error_get_last()['message'], 0, null, $location);
}
}

Expand All @@ -75,7 +75,7 @@ public function delete(string $id): void
}

if (!@unlink($location)) {
throw new IOException(sprintf("Unable to delete file '%s'", $location), 0, null, $location);
throw new IOException(\sprintf("Unable to delete file '%s'", $location), 0, null, $location);
}
}

Expand All @@ -87,7 +87,7 @@ public function move(string $id, string $destination): void
$this->checkDirectoryExists(\dirname($destinationPath));

if (!@rename($sourcePath, $destinationPath)) {
throw new IOException(sprintf("Unable to move file from '%s' to '%s'", $sourcePath, $destinationPath), 0, null, $sourcePath);
throw new IOException(\sprintf("Unable to move file from '%s' to '%s'", $sourcePath, $destinationPath), 0, null, $sourcePath);
}
}

Expand All @@ -99,7 +99,7 @@ public function copy(string $id, string $destination): void
$this->checkDirectoryExists(\dirname($destinationPath));

if (!@copy($sourcePath, $destinationPath)) {
throw new IOException(sprintf("Unable to copy file '%s' to '%s'", $sourcePath, $destinationPath), 0, null, $sourcePath);
throw new IOException(\sprintf("Unable to copy file '%s' to '%s'", $sourcePath, $destinationPath), 0, null, $sourcePath);
}
}

Expand Down Expand Up @@ -148,7 +148,7 @@ public function createDirectory(string $id, int $permissions = 0o777): void
}

if (!@mkdir($location, $permissions, true)) {
throw new IOException(sprintf("Unable to create directory '%s'", $location), 0, null, $location);
throw new IOException(\sprintf("Unable to create directory '%s'", $location), 0, null, $location);
}
}

Expand All @@ -170,7 +170,7 @@ public function deleteDirectory(string $id): void
unset($contents);

if (!@rmdir($location)) {
throw new IOException(sprintf("Unable to delete directory '%s'", $location), 0, null, $location);
throw new IOException(\sprintf("Unable to delete directory '%s'", $location), 0, null, $location);
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/Twig/Components/Modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function getTitle(): ?string
default => '',
};

return sprintf($title, $this->oldValue);
return \sprintf($title, $this->oldValue);
}

#[ExposeInTemplate]
Expand All @@ -91,7 +91,7 @@ public function getSubtitle(): ?string
default => '',
};

return sprintf($subtitle, $this->oldValue);
return \sprintf($subtitle, $this->oldValue);
}

#[ExposeInTemplate]
Expand Down Expand Up @@ -146,7 +146,7 @@ private function prefixPath(string $value): string
return $this->currentPath.$value;
}

return sprintf('/%s/%s', $this->currentPath, $value);
return \sprintf('/%s/%s', $this->currentPath, $value);
}

private function trans(string $message): string
Expand Down

0 comments on commit 2e5be75

Please sign in to comment.