1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-06 16:50:09 +01:00

Add doc blocks

This commit is contained in:
Matt Stauffer
2022-12-21 19:56:57 -05:00
parent 20f48f6eab
commit d44d23daed
2 changed files with 24 additions and 4 deletions

View File

@@ -79,12 +79,12 @@ public static function assign(string $sitePath, string $siteName, string $uri):
* Get the custom driver class from the site path, if one exists.
*
* @param string $sitePath
* @return string|null|void
* @return string|null
*/
public static function customSiteDriver(string $sitePath)
public static function customSiteDriver(string $sitePath): ?string
{
if (! file_exists($sitePath.'/LocalValetDriver.php')) {
return;
return null;
}
require_once $sitePath.'/LocalValetDriver.php';
@@ -119,6 +119,11 @@ public static function driversIn(string $path): array
return $drivers;
}
/**
* Get all of the specific drivers shipped with Valet.
*
* @return array
*/
public static function specificDrivers(): array
{
return array_map(function ($item) {
@@ -126,6 +131,11 @@ public static function specificDrivers(): array
}, static::driversIn(__DIR__.'/Specific'));
}
/**
* Get all of the custom drivers defined by the user locally.
*
* @return array
*/
public static function customDrivers(): array
{
return array_map(function ($item) {

View File

@@ -12,6 +12,11 @@ public function setUp(): void
$this->setNullWriter();
}
/**
* Prepare a test to run using the full application.
*
* @return void
*/
public function prepTestConfig()
{
require_once __DIR__.'/../cli/includes/helpers.php';
@@ -25,7 +30,12 @@ public function prepTestConfig()
Configuration::writeBaseConfiguration();
}
public function appAndTester()
/**
* Return an array with two items: the application instance and the ApplicationTester.
*
* @return array
*/
public function appAndTester(): array
{
$app = require __DIR__.'/../cli/app.php';
$app->setAutoExit(false);