Skip to content

Commit 579782d

Browse files
corazzitimgws
authored andcommitted
PSR-2 cleanup (#77)
Just a tiny bit of cleanup in readme to adhere to [PSR-2](http://www.php-fig.org/psr/psr-2/)
1 parent 72131f2 commit 579782d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

readme.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ When you search, instead of getting a plain array of search results, you instead
5656
Plus, you can still use all the Eloquent collection functionality:
5757

5858
```php
59-
$books = $books->filter(function($book)
60-
{
59+
$books = $books->filter(function ($book) {
6160
return $book->hasISBN();
6261
});
6362
```
@@ -99,10 +98,9 @@ Then add the Elasticquent trait to any Eloquent model that you want to be able t
9998
```php
10099
use Elasticquent\ElasticquentTrait;
101100

102-
class Book extends Eloquent {
103-
101+
class Book extends Eloquent
102+
{
104103
use ElasticquentTrait;
105-
106104
}
107105
```
108106

@@ -488,8 +486,8 @@ Be careful with this, as Elasticquent reads the document source into the Eloquen
488486
If you are using a custom collection with your Eloquent models, you just need to add the `ElasticquentCollectionTrait` to your collection so you can use `addToIndex`.
489487

490488
```php
491-
class MyCollection extends \Illuminate\Database\Eloquent\Collection {
492-
489+
class MyCollection extends \Illuminate\Database\Eloquent\Collection
490+
{
493491
use ElasticquentCollectionTrait;
494492
}
495493
```

0 commit comments

Comments
 (0)