mirror of
https://github.com/opdavies/gmail-filter-builder.git
synced 2025-09-06 05:25:33 +01:00
parent
db97fb8d60
commit
fbe1edf8f0
3 changed files with 18 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Opdavies\GmailFilterBuilder\Service;
|
||||
|
||||
use Opdavies\GmailFilterBuilder\Exception\PartialNotFoundException;
|
||||
use Tightenco\Collect\Support\Collection;
|
||||
|
||||
/**
|
||||
|
@ -26,11 +27,13 @@ class Addresses
|
|||
return file_exists($file);
|
||||
});
|
||||
|
||||
if ($file) {
|
||||
return include $file;
|
||||
if (!$file) {
|
||||
throw new PartialNotFoundException(vsprintf('%s does not exist.', [
|
||||
$filename,
|
||||
]));
|
||||
}
|
||||
|
||||
return [];
|
||||
return include $file;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue