mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 08:30:07 +01:00
Fix code styling
This commit is contained in:
committed by
github-actions[bot]
parent
b5103d15bb
commit
c1ef300469
@@ -207,7 +207,7 @@ public function getProxyHostForSite(string $site, string $configContents = null)
|
||||
/**
|
||||
* Get the contents of the configuration for the given site.
|
||||
*/
|
||||
public function getSiteConfigFileContents(string $site, ?string $suffix = null): ?string
|
||||
public function getSiteConfigFileContents(string $site, string $suffix = null): ?string
|
||||
{
|
||||
$config = $this->config->read();
|
||||
$suffix = $suffix ?: '.'.$config['tld'];
|
||||
@@ -219,7 +219,7 @@ public function getSiteConfigFileContents(string $site, ?string $suffix = null):
|
||||
/**
|
||||
* Get all certificates from config folder.
|
||||
*/
|
||||
public function getCertificates(?string $path = null): Collection
|
||||
public function getCertificates(string $path = null): Collection
|
||||
{
|
||||
$path = $path ?: $this->certificatesPath();
|
||||
|
||||
@@ -283,7 +283,7 @@ public function getSites(string $path, Collection $certs): Collection
|
||||
/**
|
||||
* Unlink the given symbolic link.
|
||||
*/
|
||||
public function unlink(?string $name = null): string
|
||||
public function unlink(string $name = null): string
|
||||
{
|
||||
$name = $this->getSiteLinkName($name);
|
||||
|
||||
@@ -452,7 +452,7 @@ public function isSecured(string $site): bool
|
||||
*
|
||||
* @see https://github.com/cabforum/servercert/blob/main/docs/BR.md
|
||||
*/
|
||||
public function secure(string $url, ?string $siteConf = null, int $certificateExpireInDays = 396, int $caExpireInYears = 20): void
|
||||
public function secure(string $url, string $siteConf = null, int $certificateExpireInDays = 396, int $caExpireInYears = 20): void
|
||||
{
|
||||
// Extract in order to later preserve custom PHP version config when securing
|
||||
$phpVersion = $this->customPhpVersion($url);
|
||||
@@ -628,7 +628,7 @@ public function buildCertificateConf(string $path, string $url): void
|
||||
/**
|
||||
* Build the TLS secured Nginx server for the given URL.
|
||||
*/
|
||||
public function buildSecureNginxServer(string $url, ?string $siteConf = null): string
|
||||
public function buildSecureNginxServer(string $url, string $siteConf = null): string
|
||||
{
|
||||
if ($siteConf === null) {
|
||||
$siteConf = $this->replaceOldLoopbackWithNew(
|
||||
@@ -937,7 +937,7 @@ public function plistPath(): string
|
||||
/**
|
||||
* Get the path to Nginx site configuration files.
|
||||
*/
|
||||
public function nginxPath(?string $additionalPath = null): string
|
||||
public function nginxPath(string $additionalPath = null): string
|
||||
{
|
||||
return $this->valetHomePath().'/Nginx'.($additionalPath ? '/'.$additionalPath : '');
|
||||
}
|
||||
@@ -945,7 +945,7 @@ public function nginxPath(?string $additionalPath = null): string
|
||||
/**
|
||||
* Get the path to the linked Valet sites.
|
||||
*/
|
||||
public function sitesPath(?string $link = null): string
|
||||
public function sitesPath(string $link = null): string
|
||||
{
|
||||
return $this->valetHomePath().'/Sites'.($link ? '/'.$link : '');
|
||||
}
|
||||
@@ -953,7 +953,7 @@ public function sitesPath(?string $link = null): string
|
||||
/**
|
||||
* Get the path to the Valet CA certificates.
|
||||
*/
|
||||
public function caPath(?string $caFile = null): string
|
||||
public function caPath(string $caFile = null): string
|
||||
{
|
||||
return $this->valetHomePath().'/CA'.($caFile ? '/'.$caFile : '');
|
||||
}
|
||||
@@ -961,7 +961,7 @@ public function caPath(?string $caFile = null): string
|
||||
/**
|
||||
* Get the path to the Valet TLS certificates.
|
||||
*/
|
||||
public function certificatesPath(?string $url = null, ?string $extension = null): string
|
||||
public function certificatesPath(string $url = null, string $extension = null): string
|
||||
{
|
||||
$url = $url ? '/'.$url : '';
|
||||
$extension = $extension ? '.'.$extension : '';
|
||||
@@ -1045,7 +1045,7 @@ public function replaceSockFile(string $siteConf, string $phpVersion): string
|
||||
/**
|
||||
* Get configuration items defined in .valetrc for a site.
|
||||
*/
|
||||
public function valetRc(string $siteName, ?string $cwd = null): array
|
||||
public function valetRc(string $siteName, string $cwd = null): array
|
||||
{
|
||||
if ($cwd) {
|
||||
$path = $cwd.'/.valetrc';
|
||||
@@ -1071,7 +1071,7 @@ public function valetRc(string $siteName, ?string $cwd = null): array
|
||||
/**
|
||||
* Get PHP version from .valetrc or .valetphprc for a site.
|
||||
*/
|
||||
public function phpRcVersion(string $siteName, ?string $cwd = null): ?string
|
||||
public function phpRcVersion(string $siteName, string $cwd = null): ?string
|
||||
{
|
||||
if ($cwd) {
|
||||
$oldPath = $cwd.'/.valetphprc';
|
||||
|
||||
Reference in New Issue
Block a user