mirror of
https://github.com/laravel/valet.git
synced 2026-02-06 00:40:06 +01:00
Use strict comparisons (#74)
This commit is contained in:
committed by
Taylor Otwell
parent
05b870b484
commit
2497122810
@@ -39,7 +39,7 @@ public function currentTunnelUrl()
|
||||
public function findHttpTunnelUrl(array $tunnels)
|
||||
{
|
||||
foreach ($tunnels as $tunnel) {
|
||||
if ($tunnel->proto == 'http') {
|
||||
if ($tunnel->proto === 'http') {
|
||||
return $tunnel->public_url;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ function __construct(Configuration $config, CommandLine $cli, Filesystem $files)
|
||||
function host($path)
|
||||
{
|
||||
foreach ($this->files->scandir($this->sitesPath()) as $link) {
|
||||
if ($resolved = realpath($this->sitesPath().'/'.$link) == $path) {
|
||||
if ($resolved = realpath($this->sitesPath().'/'.$link) === $path) {
|
||||
return $link;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public function isStaticFile($sitePath, $siteName, $uri)
|
||||
*/
|
||||
public function frontControllerPath($sitePath, $siteName, $uri)
|
||||
{
|
||||
if ($uri == '/install.php') {
|
||||
if ($uri === '/install.php') {
|
||||
return $sitePath.'/web/install.php';
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
$inTestingEnvironment = strpos($_SERVER['SCRIPT_NAME'], 'phpunit') !== false;
|
||||
|
||||
if (PHP_OS != 'Darwin' && ! $inTestingEnvironment) {
|
||||
if (PHP_OS !== 'Darwin' && ! $inTestingEnvironment) {
|
||||
echo 'Valet only supports the Mac operating system.'.PHP_EOL;
|
||||
|
||||
exit(1);
|
||||
@@ -17,7 +17,7 @@
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (exec('which brew') != '/usr/local/bin/brew' && ! $inTestingEnvironment) {
|
||||
if (exec('which brew') !== '/usr/local/bin/brew' && ! $inTestingEnvironment) {
|
||||
echo 'Valet requires Brew to be installed on your Mac.';
|
||||
|
||||
exit(1);
|
||||
|
||||
@@ -38,7 +38,7 @@ function warning($output)
|
||||
*/
|
||||
function output($output)
|
||||
{
|
||||
if (isset($_ENV['APP_ENV']) && $_ENV['APP_ENV'] == 'testing') {
|
||||
if (isset($_ENV['APP_ENV']) && $_ENV['APP_ENV'] === 'testing') {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user