diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2019-03-02 20:17:25 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2019-03-02 20:26:26 +0000 |
| commit | 866d5c65fe408db2e4f6bb5f599abdfea335b606 (patch) | |
| tree | a2b6ba223e49d5c373e2f8b65f19506b3de75217 /vendor/illuminate/support/Facades | |
| parent | 3a5741c77b2ea4760331809fde5791f2f6ea0452 (diff) | |
| download | webtrees-866d5c65fe408db2e4f6bb5f599abdfea335b606.tar.gz webtrees-866d5c65fe408db2e4f6bb5f599abdfea335b606.tar.bz2 webtrees-866d5c65fe408db2e4f6bb5f599abdfea335b606.zip | |
Update vendor dependencies
Diffstat (limited to 'vendor/illuminate/support/Facades')
| -rw-r--r-- | vendor/illuminate/support/Facades/Bus.php | 6 | ||||
| -rwxr-xr-x | vendor/illuminate/support/Facades/Event.php | 4 | ||||
| -rwxr-xr-x | vendor/illuminate/support/Facades/Facade.php | 6 | ||||
| -rwxr-xr-x | vendor/illuminate/support/Facades/Mail.php | 6 | ||||
| -rwxr-xr-x | vendor/illuminate/support/Facades/Queue.php | 6 | ||||
| -rwxr-xr-x | vendor/illuminate/support/Facades/Schema.php | 6 | ||||
| -rw-r--r-- | vendor/illuminate/support/Facades/Storage.php | 12 |
7 files changed, 31 insertions, 15 deletions
diff --git a/vendor/illuminate/support/Facades/Bus.php b/vendor/illuminate/support/Facades/Bus.php index 9bbd4901ee..611358afff 100644 --- a/vendor/illuminate/support/Facades/Bus.php +++ b/vendor/illuminate/support/Facades/Bus.php @@ -20,11 +20,13 @@ class Bus extends Facade /** * Replace the bound instance with a fake. * - * @return void + * @return \Illuminate\Support\Testing\Fakes\BusFake */ public static function fake() { - static::swap(new BusFake); + static::swap($fake = new BusFake); + + return $fake; } /** diff --git a/vendor/illuminate/support/Facades/Event.php b/vendor/illuminate/support/Facades/Event.php index aefc49bb79..73b65981cf 100755 --- a/vendor/illuminate/support/Facades/Event.php +++ b/vendor/illuminate/support/Facades/Event.php @@ -24,13 +24,15 @@ class Event extends Facade * Replace the bound instance with a fake. * * @param array|string $eventsToFake - * @return void + * @return \Illuminate\Support\Testing\Fakes\EventFake */ public static function fake($eventsToFake = []) { static::swap($fake = new EventFake(static::getFacadeRoot(), $eventsToFake)); Model::setEventDispatcher($fake); + + return $fake; } /** diff --git a/vendor/illuminate/support/Facades/Facade.php b/vendor/illuminate/support/Facades/Facade.php index 2a335fd4b7..97286b9b0f 100755 --- a/vendor/illuminate/support/Facades/Facade.php +++ b/vendor/illuminate/support/Facades/Facade.php @@ -159,11 +159,15 @@ abstract class Facade /** * Resolve the facade root instance from the container. * - * @param string $name + * @param object|string $name * @return mixed */ protected static function resolveFacadeInstance($name) { + if (is_object($name)) { + return $name; + } + if (isset(static::$resolvedInstance[$name])) { return static::$resolvedInstance[$name]; } diff --git a/vendor/illuminate/support/Facades/Mail.php b/vendor/illuminate/support/Facades/Mail.php index bee470c7f8..00fc76f730 100755 --- a/vendor/illuminate/support/Facades/Mail.php +++ b/vendor/illuminate/support/Facades/Mail.php @@ -31,11 +31,13 @@ class Mail extends Facade /** * Replace the bound instance with a fake. * - * @return void + * @return \Illuminate\Support\Testing\Fakes\MailFake */ public static function fake() { - static::swap(new MailFake); + static::swap($fake = new MailFake); + + return $fake; } /** diff --git a/vendor/illuminate/support/Facades/Queue.php b/vendor/illuminate/support/Facades/Queue.php index 1f57ba0fec..521d2eb214 100755 --- a/vendor/illuminate/support/Facades/Queue.php +++ b/vendor/illuminate/support/Facades/Queue.php @@ -24,11 +24,13 @@ class Queue extends Facade /** * Replace the bound instance with a fake. * - * @return void + * @return \Illuminate\Support\Testing\Fakes\QueueFake */ public static function fake() { - static::swap(new QueueFake(static::getFacadeApplication())); + static::swap($fake = new QueueFake(static::getFacadeApplication())); + + return $fake; } /** diff --git a/vendor/illuminate/support/Facades/Schema.php b/vendor/illuminate/support/Facades/Schema.php index d3a924811b..31748e1502 100755 --- a/vendor/illuminate/support/Facades/Schema.php +++ b/vendor/illuminate/support/Facades/Schema.php @@ -25,12 +25,12 @@ class Schema extends Facade } /** - * Get the registered name of the component. + * Get a schema builder instance for the default connection. * - * @return string + * @return \Illuminate\Database\Schema\Builder */ protected static function getFacadeAccessor() { - return 'db.schema'; + return static::$app['db']->connection()->getSchemaBuilder(); } } diff --git a/vendor/illuminate/support/Facades/Storage.php b/vendor/illuminate/support/Facades/Storage.php index 5bcbfd6546..97426a1004 100644 --- a/vendor/illuminate/support/Facades/Storage.php +++ b/vendor/illuminate/support/Facades/Storage.php @@ -16,7 +16,7 @@ class Storage extends Facade * * @param string|null $disk * - * @return void + * @return \Illuminate\Filesystem\Filesystem */ public static function fake($disk = null) { @@ -26,22 +26,26 @@ class Storage extends Facade $root = storage_path('framework/testing/disks/'.$disk) ); - static::set($disk, self::createLocalDriver(['root' => $root])); + static::set($disk, $fake = self::createLocalDriver(['root' => $root])); + + return $fake; } /** * Replace the given disk with a persistent local testing disk. * * @param string|null $disk - * @return void + * @return \Illuminate\Filesystem\Filesystem */ public static function persistentFake($disk = null) { $disk = $disk ?: self::$app['config']->get('filesystems.default'); - static::set($disk, self::createLocalDriver([ + static::set($disk, $fake = self::createLocalDriver([ 'root' => storage_path('framework/testing/disks/'.$disk), ])); + + return $fake; } /** |
