Skip to content

Commit

Permalink
Use short array syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
malarzm committed Feb 27, 2020
1 parent f25617a commit d36d337
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Resources/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -423,12 +423,12 @@ to easily fetch objects based on multiple conditions:
.. code-block:: php
// query for one product matching be name and price
$product = $repository->findOneBy(array('name' => 'foo', 'price' => 19.99));
$product = $repository->findOneBy(['name' => 'foo', 'price' => 19.99]);
// query for all products matching the name, ordered by price
$product = $repository->findBy(
array('name' => 'foo'),
array('price' => 'ASC'),
['name' => 'foo'],
['price' => 'ASC'],
);
Updating an Object
Expand Down

0 comments on commit d36d337

Please sign in to comment.