mirror of
https://github.com/Ne-Lexa/php-zip.git
synced 2025-08-29 17:59:55 +02:00
cs fix
This commit is contained in:
@@ -25,14 +25,14 @@ class ZipNewFileEntry extends ZipAbstractEntry
|
||||
public function __construct($file)
|
||||
{
|
||||
parent::__construct();
|
||||
if ($file === null){
|
||||
if ($file === null) {
|
||||
throw new InvalidArgumentException("file is null");
|
||||
}
|
||||
$file = (string)$file;
|
||||
if (!is_file($file)){
|
||||
if (!is_file($file)) {
|
||||
throw new ZipException("File $file does not exist.");
|
||||
}
|
||||
if (!is_readable($file)){
|
||||
if (!is_readable($file)) {
|
||||
throw new ZipException("The '$file' file could not be read. Check permissions.");
|
||||
}
|
||||
$this->file = $file;
|
||||
@@ -45,9 +45,9 @@ class ZipNewFileEntry extends ZipAbstractEntry
|
||||
*/
|
||||
public function getEntryContent()
|
||||
{
|
||||
if (!is_file($this->file)){
|
||||
if (!is_file($this->file)) {
|
||||
throw new RuntimeException("File {$this->file} does not exist.");
|
||||
}
|
||||
return file_get_contents($this->file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -562,7 +562,7 @@ class ZipFile implements ZipFileInterface
|
||||
throw new InvalidArgumentException('The input directory is not specified');
|
||||
}
|
||||
if (!is_dir($inputDir)) {
|
||||
throw new InvalidArgumentException(sprintf('The "%s" directory does not exist.', $inputDir));
|
||||
throw new InvalidArgumentException(sprintf('The "%s" directory does not exist.', $inputDir));
|
||||
}
|
||||
$inputDir = rtrim($inputDir, '/\\') . DIRECTORY_SEPARATOR;
|
||||
|
||||
@@ -594,7 +594,7 @@ class ZipFile implements ZipFileInterface
|
||||
throw new InvalidArgumentException('The input directory is not specified');
|
||||
}
|
||||
if (!is_dir($inputDir)) {
|
||||
throw new InvalidArgumentException(sprintf('The "%s" directory does not exist.', $inputDir));
|
||||
throw new InvalidArgumentException(sprintf('The "%s" directory does not exist.', $inputDir));
|
||||
}
|
||||
$inputDir = rtrim($inputDir, '/\\') . DIRECTORY_SEPARATOR;
|
||||
|
||||
@@ -713,7 +713,7 @@ class ZipFile implements ZipFileInterface
|
||||
throw new InvalidArgumentException('The input directory is not specified');
|
||||
}
|
||||
if (!is_dir($inputDir)) {
|
||||
throw new InvalidArgumentException(sprintf('The "%s" directory does not exist.', $inputDir));
|
||||
throw new InvalidArgumentException(sprintf('The "%s" directory does not exist.', $inputDir));
|
||||
}
|
||||
$globPattern = (string)$globPattern;
|
||||
if (empty($globPattern)) {
|
||||
@@ -813,7 +813,7 @@ class ZipFile implements ZipFileInterface
|
||||
throw new InvalidArgumentException('The input directory is not specified');
|
||||
}
|
||||
if (!is_dir($inputDir)) {
|
||||
throw new InvalidArgumentException(sprintf('The "%s" directory does not exist.', $inputDir));
|
||||
throw new InvalidArgumentException(sprintf('The "%s" directory does not exist.', $inputDir));
|
||||
}
|
||||
$inputDir = rtrim($inputDir, '/\\') . DIRECTORY_SEPARATOR;
|
||||
|
||||
|
Reference in New Issue
Block a user