1 | <?php |
||
20 | class BasePublisherCommand extends Command |
||
21 | { |
||
22 | /** |
||
23 | * The name and signature of the console command. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $signature = 'rabbitmq:publish {publisher} {message}'; |
||
28 | |||
29 | /** |
||
30 | * The console command description. |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $description = 'Publish one message'; |
||
35 | |||
36 | /** |
||
37 | * @var null|Container |
||
38 | */ |
||
39 | private $container = null; |
||
40 | |||
41 | /** |
||
42 | * BasePublisherCommand constructor. |
||
43 | * |
||
44 | * @param Container $container |
||
45 | */ |
||
46 | 1 | public function __construct(Container $container) |
|
50 | |||
51 | /** |
||
52 | * @param string $publisherAliasName |
||
53 | * @return PublisherInterface |
||
54 | */ |
||
55 | 1 | protected function getPublisher(string $publisherAliasName): PublisherInterface |
|
59 | |||
60 | /** |
||
61 | * Execute the console command. |
||
62 | * @return int |
||
|
|||
63 | */ |
||
64 | 1 | public function handle() |
|
69 | } |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.