| 1 | <?php |
||
| 7 | class TranslationLocalesSelectorTool extends AbstractTool |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Position where should tool be placed. |
||
| 11 | */ |
||
| 12 | 1 | public function position() |
|
| 16 | |||
| 17 | /** |
||
| 18 | * Unique tool identifier. |
||
| 19 | */ |
||
| 20 | 2 | public function identifier(): string |
|
| 24 | |||
| 25 | /** |
||
| 26 | * Tool's view. |
||
| 27 | */ |
||
| 28 | 1 | public function render() |
|
| 35 | |||
| 36 | /** |
||
| 37 | * Handle tool execution. |
||
| 38 | * @param Request $request |
||
| 39 | */ |
||
| 40 | 1 | public function handle(Request $request) |
|
| 48 | |||
| 49 | /** |
||
| 50 | * Check allowance to show and process tool. |
||
| 51 | */ |
||
| 52 | 1 | public function check(): bool |
|
| 56 | |||
| 57 | 1 | public function isCurrentLocale($locale) |
|
| 61 | } |
||
| 62 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: