1
0
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:
Lucas Michot
2016-05-27 17:36:50 +02:00
committed by Taylor Otwell
parent 05b870b484
commit 2497122810
5 changed files with 6 additions and 6 deletions

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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';
}

View File

@@ -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);

View File

@@ -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;
}