[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 #!/usr/bin/env php 2 <?php 3 4 /* 5 * This file is part of the Symfony package. 6 * 7 * (c) Fabien Potencier <[email protected]> 8 * 9 * For the full copyright and license information, please view the LICENSE 10 * file that was distributed with this source code. 11 */ 12 13 /** 14 * Runs the Yaml lint command. 15 * 16 * @author Jan Schädlich <[email protected]> 17 */ 18 19 use Symfony\Component\Console\Application; 20 use Symfony\Component\Yaml\Command\LintCommand; 21 22 function includeIfExists(string $file): bool 23 { 24 return file_exists($file) && include $file; 25 } 26 27 if ( 28 !includeIfExists(__DIR__ . '/../../../../autoload.php') && 29 !includeIfExists(__DIR__ . '/../../vendor/autoload.php') && 30 !includeIfExists(__DIR__ . '/../../../../../../vendor/autoload.php') 31 ) { 32 fwrite(STDERR, 'Install dependencies using Composer.'.PHP_EOL); 33 exit(1); 34 } 35 36 if (!class_exists(Application::class)) { 37 fwrite(STDERR, 'You need the "symfony/console" component in order to run the Yaml linter.'.PHP_EOL); 38 exit(1); 39 } 40 41 (new Application())->add($command = new LintCommand()) 42 ->getApplication() 43 ->setDefaultCommand($command->getName(), true) 44 ->run() 45 ;
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |