Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / console / Tests / Fixtures / FooLockCommand.php
1 <?php
2
3 use Symfony\Component\Console\Command\Command;
4 use Symfony\Component\Console\Command\LockableTrait;
5 use Symfony\Component\Console\Input\InputInterface;
6 use Symfony\Component\Console\Output\OutputInterface;
7
8 class FooLockCommand extends Command
9 {
10     use LockableTrait;
11
12     protected function configure()
13     {
14         $this->setName('foo:lock');
15     }
16
17     protected function execute(InputInterface $input, OutputInterface $output)
18     {
19         if (!$this->lock()) {
20             return 1;
21         }
22
23         $this->release();
24
25         return 2;
26     }
27 }