From af375530a9482b7a509ce2852fda830835ce8270 Mon Sep 17 00:00:00 2001 From: Vasiliy-Makogon <1030328+Vasiliy-Makogon@users.noreply.github.com> Date: Thu, 5 Oct 2023 16:00:46 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 9d2fc40..5f6f8da 100644 --- a/README.md +++ b/README.md @@ -182,18 +182,30 @@ string(75) "O:33:"Krugozor\Cover\Tests\NewTypeArray":2:{i:0;s:3:"PHP";i:1;s:5:"M Пример: ```php -foreach ($data->get('langs') as $stack => $values) { - echo sprintf( - "\n", - $stack, - $values->count(), - $values->map(fn(string $value): string => "
  • $value
  • ")->implode('') +$value = $data->get('langs')->mapAssociative(function (string $key, CoverArray $langs) { + return sprintf( + "\n", + $key, + $langs->count(), + $langs->map(fn(string $lang): string => "
  • $lang
  • ")->implode(PHP_EOL) ); -} +})->implode(''); ``` Результат: ``` - - +string(190) " + +" ```