Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / console / Tests / Fixtures / FooLock2Command.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 FooLock2Command extends Command
9 {
10     use LockableTrait;
11
12     protected function configure()
13     {
14         $this->setName('foo:lock2');
15     }
16
17     protected function execute(InputInterface $input, OutputInterface $output)
18     {
19         try {
20             $this->lock();
21             $this->lock();
22         } catch (LogicException $e) {
23             return 1;
24         }
25
26         return 2;
27     }
28 }