1 | <?php |
||
14 | trait Serve |
||
15 | { |
||
16 | /** |
||
17 | * Serve command. |
||
18 | * |
||
19 | * @param InputInterface $input |
||
20 | * @param OutputInterface $output |
||
21 | */ |
||
22 | protected function serve(InputInterface $input, OutputInterface $output) |
||
40 | |||
41 | /** |
||
42 | * Check if port is in use. |
||
43 | * |
||
44 | * @param int $port |
||
45 | * @param string $host |
||
46 | * @param int $timeout |
||
47 | * |
||
48 | * @return bool |
||
49 | */ |
||
50 | protected function check_port($port = 8000, $host = '127.0.0.1', $timeout = 3) |
||
61 | |||
62 | /** |
||
63 | * Configure command. |
||
64 | */ |
||
65 | public function configure() |
||
74 | |||
75 | /** |
||
76 | * Obtain port. |
||
77 | * |
||
78 | * @param InputInterface $input |
||
79 | * @return integer |
||
80 | */ |
||
81 | protected function port(InputInterface $input) { |
||
85 | |||
86 | /** |
||
87 | * Method provided from \Symfony\Component\Console\Command\Command. |
||
88 | * |
||
89 | * @param string $name The argument name |
||
90 | * @param int $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL |
||
91 | * @param string $description A description text |
||
92 | * @param mixed $default The default value (for InputArgument::OPTIONAL mode only) |
||
93 | * |
||
94 | * @return Command The current instance |
||
95 | */ |
||
96 | abstract public function addArgument($name, $mode = null, $description = '', $default = null); |
||
97 | } |
||
98 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.