mirror of
https://github.com/MetaProvide/nextcloud-swarm-plugin.git
synced 2025-02-05 00:59:49 +00:00
f2501b13ea
* feat(cs): update cs config * feat(cs): update composer deps * feat(cs): gitignore * feat(cs): add pipeline * feat(cs): code style * perf(cs): update pipeline - refactor: changed name to Lint - add: auto commit action - add: fast fail - update: install only cs-fixer dep * Apply automatic changes * feat(cs): update auto commit - update: commit message * feat(cs): enable PSR12 and PhpCsFixer rules - add: extend NC rules - chore: lint new rules - fix: OC PSR4 detection - add: global imports - add: trailing comma in arrays and etc * refactor(file): find_exists return value * chore: fix code style * refactor(swarm): ref check and param arg type * refactor(swarm): param arg type * chore: fix code style --------- Co-authored-by: mahiarirani <mahiarirani@users.noreply.github.com> Co-authored-by: JoaoSRaposo <joaosraposo@gmail.com>
17 lines
347 B
PHP
17 lines
347 B
PHP
<?php
|
|
|
|
namespace OCA\Files_External_Ethswarm\Utils;
|
|
|
|
class Env {
|
|
public static function get(string $name): string {
|
|
return getenv($name);
|
|
}
|
|
|
|
public static function set(string $name, string $value): bool {
|
|
return putenv($name.'='.$value);
|
|
}
|
|
|
|
public static function isDevelopment(): bool {
|
|
return 'development' === self::get('ENV');
|
|
}
|
|
}
|