1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-04 16:10:08 +01:00

Fix code styling

This commit is contained in:
driesvints
2023-09-28 14:24:39 +00:00
committed by github-actions[bot]
parent 108bbf75b0
commit 0fef72b64b

View File

@@ -7,7 +7,7 @@
class Magento2ValetDriver extends ValetDriver
{
/**
* @inheritdoc
* {@inheritdoc}
*/
public function serves(string $sitePath, string $siteName, string $uri): bool
{
@@ -15,24 +15,24 @@ public function serves(string $sitePath, string $siteName, string $uri): bool
}
/**
* @inheritdoc
* {@inheritdoc}
*/
public function isStaticFile(string $sitePath, string $siteName, string $uri)/*: string|false */
{
$uri = preg_replace('/^\/static(\/version[\d]+)/', '/static', $uri);
if (file_exists($staticFilePath = $sitePath . '/pub' . $uri)) {
if (file_exists($staticFilePath = $sitePath.'/pub'.$uri)) {
return $staticFilePath;
}
if (strpos($uri, '/static/') === 0) {
$_GET['resource'] = preg_replace('#static/#', '', $uri, 1);
include($sitePath . '/pub/static.php');
include $sitePath.'/pub/static.php';
exit;
}
if (strpos($uri, '/media/') === 0) {
include($sitePath . '/pub/get.php');
include $sitePath.'/pub/get.php';
exit;
}
@@ -40,11 +40,11 @@ public function isStaticFile(string $sitePath, string $siteName, string $uri)/*:
}
/**
* @inheritdoc
* {@inheritdoc}
*/
public function frontControllerPath(string $sitePath, string $siteName, string $uri): ?string
{
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];
$_SERVER['DOCUMENT_ROOT'] = $sitePath;
return $sitePath.'/pub/index.php';