/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
src/Illuminate/Console/Prohibitable.php
43 строки
956 B
Quỳnh Nguyễn
Fix prohibit dockblock (#51916)
26 июн 2024, 18:00
Не верифицирован
26 июн 2024, 18:00
a2f2dc2
Код
Авторство
О чём код?
<?php namespace Illuminate\Console; trait Prohibitable { /** * Indicates if the command should be prohibited from running. * * @var bool */ protected static $prohibitedFromRunning = false; /** * Indicate whether the command should be prohibited from running. * * @param bool $prohibit * @return void */ public static function prohibit($prohibit = true) { static::$prohibitedFromRunning = $prohibit; } /** * Determine if the command is prohibited from running and display a warning if so. * * @param bool $quiet * @return bool */ protected function isProhibited(bool $quiet = false) { if (! static::$prohibitedFromRunning) { return false; } if (! $quiet) { $this->components->warn('This command is prohibited from running in this environment.'); } return true; } }