Skip to content

Commit 2497122

Browse files
lucasmichottaylorotwell
authored andcommitted
Use strict comparisons (#74)
1 parent 05b870b commit 2497122

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

cli/Valet/Ngrok.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function currentTunnelUrl()
3939
public function findHttpTunnelUrl(array $tunnels)
4040
{
4141
foreach ($tunnels as $tunnel) {
42-
if ($tunnel->proto == 'http') {
42+
if ($tunnel->proto === 'http') {
4343
return $tunnel->public_url;
4444
}
4545
}

cli/Valet/Site.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function __construct(Configuration $config, CommandLine $cli, Filesystem $files)
3131
function host($path)
3232
{
3333
foreach ($this->files->scandir($this->sitesPath()) as $link) {
34-
if ($resolved = realpath($this->sitesPath().'/'.$link) == $path) {
34+
if ($resolved = realpath($this->sitesPath().'/'.$link) === $path) {
3535
return $link;
3636
}
3737
}

cli/drivers/ContaoValetDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function isStaticFile($sitePath, $siteName, $uri)
4242
*/
4343
public function frontControllerPath($sitePath, $siteName, $uri)
4444
{
45-
if ($uri == '/install.php') {
45+
if ($uri === '/install.php') {
4646
return $sitePath.'/web/install.php';
4747
}
4848

cli/includes/compatibility.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
$inTestingEnvironment = strpos($_SERVER['SCRIPT_NAME'], 'phpunit') !== false;
77

8-
if (PHP_OS != 'Darwin' && ! $inTestingEnvironment) {
8+
if (PHP_OS !== 'Darwin' && ! $inTestingEnvironment) {
99
echo 'Valet only supports the Mac operating system.'.PHP_EOL;
1010

1111
exit(1);
@@ -17,7 +17,7 @@
1717
exit(1);
1818
}
1919

20-
if (exec('which brew') != '/usr/local/bin/brew' && ! $inTestingEnvironment) {
20+
if (exec('which brew') !== '/usr/local/bin/brew' && ! $inTestingEnvironment) {
2121
echo 'Valet requires Brew to be installed on your Mac.';
2222

2323
exit(1);

cli/includes/helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function warning($output)
3838
*/
3939
function output($output)
4040
{
41-
if (isset($_ENV['APP_ENV']) && $_ENV['APP_ENV'] == 'testing') {
41+
if (isset($_ENV['APP_ENV']) && $_ENV['APP_ENV'] === 'testing') {
4242
return;
4343
}
4444

0 commit comments

Comments
 (0)