1 | <?php |
||
29 | class PreResolveEvent extends Event |
||
30 | { |
||
31 | /** |
||
32 | * @var RawArgs |
||
33 | */ |
||
34 | private $rawArgs; |
||
35 | |||
36 | /** |
||
37 | * @var Application |
||
38 | */ |
||
39 | private $application; |
||
40 | |||
41 | /** |
||
42 | * @var ResolvedCommand |
||
43 | */ |
||
44 | private $resolvedCommand; |
||
45 | |||
46 | /** |
||
47 | * Creates the event. |
||
48 | * |
||
49 | * @param RawArgs $rawArgs The raw console arguments. |
||
50 | * @param Application $application The application. |
||
51 | */ |
||
52 | 32 | public function __construct(RawArgs $rawArgs, Application $application) |
|
53 | { |
||
54 | 32 | $this->rawArgs = $rawArgs; |
|
55 | 32 | $this->application = $application; |
|
56 | 32 | } |
|
57 | |||
58 | /** |
||
59 | * Returns the raw console arguments. |
||
60 | * |
||
61 | * @return RawArgs The raw console arguments. |
||
62 | */ |
||
63 | 31 | public function getRawArgs() |
|
67 | |||
68 | /** |
||
69 | * Returns the application. |
||
70 | * |
||
71 | * @return Application The application. |
||
72 | */ |
||
73 | 8 | public function getApplication() |
|
77 | |||
78 | /** |
||
79 | * Returns the resolved command. |
||
80 | * |
||
81 | * @return ResolvedCommand Returns the resolved command or `null` if none |
||
82 | * was set. |
||
83 | */ |
||
84 | 32 | public function getResolvedCommand() |
|
88 | |||
89 | /** |
||
90 | * Sets the resolved command. |
||
91 | * |
||
92 | * @param ResolvedCommand $resolvedCommand The resolved command. Set to |
||
|
|||
93 | * `null` to let the configured |
||
94 | * resolver decide. |
||
95 | */ |
||
96 | 9 | public function setResolvedCommand(ResolvedCommand $resolvedCommand = null) |
|
100 | } |
||
101 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.