extract($message)); } public function provideExtract() { yield [ 'Symfony is great!', [], ]; yield [ 'Symfony is {what}!', ['what' => ['type' => 'string']], ]; yield [ '{framework} is {what}!', [ 'framework' => ['type' => 'string'], 'what' => ['type' => 'string'], ], ]; yield [ 'I have {numCats, number} cats.', ['numCats' => ['type' => 'number']], ]; yield [ 'Almost {pctBlack, number, ::percent} of my cats are black.', ['pctBlack' => ['type' => 'number']], ]; yield [ 'The price of this bagel is {num, number, ::sign-always compact-short currency/GBP}', ['num' => ['type' => 'number']], ]; yield [ 'Coupon expires at {expires, time, short}', ['expires' => ['type' => 'date']], ]; yield [ << ['type' => 'string', 'values' => ['male', 'female', 'other']], ], ]; yield [ << ['type' => 'string', 'values' => ['yes', 'other']], 'taxRate' => ['type' => 'number'], ], ]; yield [ << ['type' => 'string', 'values' => ['female', 'male', 'other']], 'num_guests' => ['type' => 'number'], 'host' => ['type' => 'string'], 'guest' => ['type' => 'string'], ], ]; } }