Skip to content

Commit

Permalink
Merge pull request #576 from clement-michelet/bugfix/filesystem-map-s…
Browse files Browse the repository at this point in the history
…hould-use-interface

FilesystemMap::set() should expects FilesystemInterface instead of Filesystem
  • Loading branch information
nicolasmure committed Aug 30, 2018
2 parents dd0d2e9 + 7eb06fb commit a0627e9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Gaufrette/FilesystemMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ public function all()
* Register the given filesystem for the specified domain.
*
* @param string $domain
* @param Filesystem $filesystem
* @param FilesystemInterface $filesystem
*
* @throws InvalidArgumentException when the specified domain contains
* @throws \InvalidArgumentException when the specified domain contains
* forbidden characters
*/
public function set($domain, Filesystem $filesystem)
public function set($domain, FilesystemInterface $filesystem)
{
if (!preg_match('/^[-_a-zA-Z0-9]+$/', $domain)) {
throw new \InvalidArgumentException(sprintf(
Expand Down Expand Up @@ -61,9 +61,9 @@ public function has($domain)
*
* @param string $domain
*
* @return Filesystem
* @return FilesystemInterface
*
* @throw InvalidArgumentException when there is no filesystem registered
* @throw \InvalidArgumentException when there is no filesystem registered
* for the specified domain
*/
public function get($domain)
Expand Down

0 comments on commit a0627e9

Please sign in to comment.