From 98549fb486b3f740832ca5ce262bd0132b595aaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F?= Date: Thu, 24 Jan 2019 08:09:42 +0200 Subject: [PATCH] Removed old arrays --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d3627d36..e0d89377 100644 --- a/README.md +++ b/README.md @@ -137,11 +137,11 @@ return [ Add Algolia to your `app/Kernel.php`: ```php -$bundles = array( +$bundles = [ new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), // ... Other bundles ... new Algolia\SearchBundle\AlgoliaSearchBundle(), -); +]; ``` ## Algolia credentials @@ -641,7 +641,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; class Post implements NormalizableInterface { - public function normalize(NormalizerInterface $serializer, $format = null, array $context = array()): array + public function normalize(NormalizerInterface $serializer, $format = null, array $context = []): array { return [ 'title' => $this->getTitle(), @@ -665,7 +665,7 @@ In case you are already using this method for something else, like encoding enti on the format to return different arrays. ```php -public function normalize(NormalizerInterface $serializer, $format = null, array $context = array()): array +public function normalize(NormalizerInterface $serializer, $format = null, array $context = []): array { if (\Algolia\SearchBundle\Searchable::NORMALIZATION_FORMAT === $format) { return [ @@ -699,7 +699,7 @@ class UserNormalizer implements NormalizerInterface /** * Normalize a user into a set of arrays/scalars. */ - public function normalize($object, $format = null, array $context = array()) + public function normalize($object, $format = null, array $context = []) { return [ 'id' => $object->getId(),