Skip to content

Commit

Permalink
Allowed passing validation flag to Space::file()
Browse files Browse the repository at this point in the history
  • Loading branch information
David Wakelin committed Nov 11, 2022
1 parent 3a32727 commit c52d22a
Show file tree
Hide file tree
Showing 4 changed files with 194 additions and 235 deletions.
5 changes: 3 additions & 2 deletions SpacesAPI/Space.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,13 +325,14 @@ public function uploadFile(string $filepath, ?string $filename = null, ?string $
* Get an instance of \SpacesAPI\File for a given filename
*
* @param string $filename
* @package bool $validate
*
* @return \SpacesAPI\File
* @throws \SpacesAPI\Exceptions\FileDoesntExistException Thrown if the file doesn't exist
*/
public function file(string $filename): File
public function file(string $filename, bool $validate = true): File
{
return new File($this, $filename);
return new File($this, $filename, [], $validate);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sociallydev/spaces-api",
"description": "Library for accessing Digital Ocean spaces",
"version":"3.5.0",
"version":"3.6.0",
"type": "library",
"license": "MIT",
"authors": [
Expand Down
Loading

0 comments on commit c52d22a

Please sign in to comment.