comparison vendor/psy/psysh/src/Command/ExitCommand.php @ 13:5fb285c0d0e3

Update Drupal core to 8.4.7 via Composer. Security update; I *think* we've been lucky to get away with this so far, as we don't support self-registration which seems to be used by the so-called "drupalgeddon 2" attack that 8.4.5 was vulnerable to.
author Chris Cannam
date Mon, 23 Apr 2018 09:33:26 +0100
parents
children
comparison
equal deleted inserted replaced
12:7a779792577d 13:5fb285c0d0e3
1 <?php
2
3 /*
4 * This file is part of Psy Shell.
5 *
6 * (c) 2012-2018 Justin Hileman
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Psy\Command;
13
14 use Psy\Exception\BreakException;
15 use Symfony\Component\Console\Input\InputInterface;
16 use Symfony\Component\Console\Output\OutputInterface;
17
18 /**
19 * Exit the Psy Shell.
20 *
21 * Just what it says on the tin.
22 */
23 class ExitCommand extends Command
24 {
25 /**
26 * {@inheritdoc}
27 */
28 protected function configure()
29 {
30 $this
31 ->setName('exit')
32 ->setAliases(['quit', 'q'])
33 ->setDefinition([])
34 ->setDescription('End the current session and return to caller.')
35 ->setHelp(
36 <<<'HELP'
37 End the current session and return to caller.
38
39 e.g.
40 <return>>>> exit</return>
41 HELP
42 );
43 }
44
45 /**
46 * {@inheritdoc}
47 */
48 protected function execute(InputInterface $input, OutputInterface $output)
49 {
50 throw new BreakException('Goodbye');
51 }
52 }