This commit is contained in:
2022-01-09 03:50:38 +08:00
parent 08dc3e262b
commit 5e02a79bf0
113 changed files with 12713 additions and 12703 deletions
+46 -46
View File
@@ -1,46 +1,46 @@
<?php
namespace Kiri;
use JetBrains\PhpStorm\Pure;
/**
* Class Environmental
* @package Kiri
*/
class Environmental
{
/**
* @return bool
*/
public function isMac(): bool
{
$output = strtolower(PHP_OS | PHP_OS_FAMILY);
if (str_contains('mac', $output)) {
return true;
} else if (str_contains('darwin', $output)) {
return true;
} else {
return false;
}
}
/**
* @return bool
*/
#[Pure] public function isLinux(): bool
{
if (!static::isMac()) {
return true;
} else {
return false;
}
}
}
<?php
namespace Kiri;
use JetBrains\PhpStorm\Pure;
/**
* Class Environmental
* @package Kiri
*/
class Environmental
{
/**
* @return bool
*/
public function isMac(): bool
{
$output = strtolower(PHP_OS | PHP_OS_FAMILY);
if (str_contains('mac', $output)) {
return true;
} else if (str_contains('darwin', $output)) {
return true;
} else {
return false;
}
}
/**
* @return bool
*/
#[Pure] public function isLinux(): bool
{
if (!static::isMac()) {
return true;
} else {
return false;
}
}
}