- Issue created by @mondrake
- 🇦🇺Australia alex.skrypnyk Melbourne
I'm experiencing the same on this simple example
/** * Get fields from the form without hidden fields. * * @param array $form * Form array. * * @return array<string, mixed> * Array of fields. * * @SuppressWarnings(PHPMD.StaticAccess) */
---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 236 | ERROR | Return type "array<string, mixed>" must not contain | | spaces ----------------------------------------------------------------------
When spaces removed, I'm getting another error:
---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 236 | ERROR | [x] Expected "arraystringmixed" but found | | "array<string,mixed>" for function return type ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------
- Status changed to Postponed: needs info
8 months ago 10:57am 6 March 2024 - 🇳🇱Netherlands kingdutch
I'm unable to reproduce this against the latest version of PHPCS.
class SniffTest { /** * Kitchen sink test. * * @return array<string, mixed> * Array of results. */ public function kitchenSink() : array { return ["result" => "foo"]; } }
- Status changed to Closed: outdated
6 months ago 11:46am 31 May 2024