mirror of
https://github.com/laravel/valet.git
synced 2026-02-07 09:10:03 +01:00
Add doc blocks
This commit is contained in:
@@ -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.
|
* Get the custom driver class from the site path, if one exists.
|
||||||
*
|
*
|
||||||
* @param string $sitePath
|
* @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')) {
|
if (! file_exists($sitePath.'/LocalValetDriver.php')) {
|
||||||
return;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once $sitePath.'/LocalValetDriver.php';
|
require_once $sitePath.'/LocalValetDriver.php';
|
||||||
@@ -119,6 +119,11 @@ public static function driversIn(string $path): array
|
|||||||
return $drivers;
|
return $drivers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all of the specific drivers shipped with Valet.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public static function specificDrivers(): array
|
public static function specificDrivers(): array
|
||||||
{
|
{
|
||||||
return array_map(function ($item) {
|
return array_map(function ($item) {
|
||||||
@@ -126,6 +131,11 @@ public static function specificDrivers(): array
|
|||||||
}, static::driversIn(__DIR__.'/Specific'));
|
}, static::driversIn(__DIR__.'/Specific'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all of the custom drivers defined by the user locally.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public static function customDrivers(): array
|
public static function customDrivers(): array
|
||||||
{
|
{
|
||||||
return array_map(function ($item) {
|
return array_map(function ($item) {
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ public function setUp(): void
|
|||||||
$this->setNullWriter();
|
$this->setNullWriter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepare a test to run using the full application.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function prepTestConfig()
|
public function prepTestConfig()
|
||||||
{
|
{
|
||||||
require_once __DIR__.'/../cli/includes/helpers.php';
|
require_once __DIR__.'/../cli/includes/helpers.php';
|
||||||
@@ -25,7 +30,12 @@ public function prepTestConfig()
|
|||||||
Configuration::writeBaseConfiguration();
|
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 = require __DIR__.'/../cli/app.php';
|
||||||
$app->setAutoExit(false);
|
$app->setAutoExit(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user