mirror of
https://github.com/danog/file.git
synced 2024-11-26 11:54:54 +01:00
Do not use ternary operator when not needed
This commit is contained in:
parent
5a69fca406
commit
1fb69a836a
@ -372,10 +372,9 @@ class BlockingDriver implements Driver
|
||||
if ($error = \error_get_last()) {
|
||||
$message .= \sprintf(" Errno: %d; %s", $error["type"], $error["message"]);
|
||||
}
|
||||
return new Failure(new FilesystemException($message));
|
||||
}
|
||||
return ($result === false)
|
||||
? new Failure(new FilesystemException($message))
|
||||
: new Success($result);
|
||||
return new Success($result);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -389,10 +388,8 @@ class BlockingDriver implements Driver
|
||||
if ($error = \error_get_last()) {
|
||||
$message .= \sprintf(" Errno: %d; %s", $error["type"], $error["message"]);
|
||||
}
|
||||
return new Failure(new FilesystemException($message));
|
||||
}
|
||||
|
||||
return ($result === false)
|
||||
? new Failure(new FilesystemException($message))
|
||||
: new Success($result);
|
||||
return new Success($result);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user