Skip to content

Commit

Permalink
Merge pull request #15 from stevebauman/patch-3
Browse files Browse the repository at this point in the history
Fix doc example spacing
  • Loading branch information
freekmurze committed Jan 10, 2024
2 parents f0c1c45 + fd9af8d commit c73e0ab
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ You can create an OR combination of conditions like this:

```php
Discover::in(__DIR__)
->any(
ProfileCondition::classes(),
ProfileCondition::enums()
)
->any(
ProfileCondition::classes(),
ProfileCondition::enums()
)
->get();
```

Expand All @@ -199,31 +199,31 @@ You can also create more complex operations like an or of and's:

```php
Discover::in(__DIR__)
->any(
ProfileCondition::exact(
ProfileCondition::classes(),
ProfileCondition::implementing(Arrayble::class),
),
ProfileCondition::exact(
->any(
ProfileCondition::exact(
ProfileCondition::classes(),
ProfileCondition::implementing(Arrayble::class),
),
ProfileCondition::exact(
ProfileCondition::enums(),
ProfileCondition::implementing(Stringable::class),
)
)
ProfileCondition::implementing(Stringable::class),
)
)
->get();
```

This example can be written shorter like this:

```php
Discover::in(__DIR__)
->any(
ProfileCondition::exact(
ProfileCondition::classes()->implementing(Arrayble::class),
),
ProfileCondition::exact(
->any(
ProfileCondition::exact(
ProfileCondition::classes()->implementing(Arrayble::class),
),
ProfileCondition::exact(
ProfileCondition::enums()->implementing(Stringable::class),
)
)
)
)
->get();
```

Expand Down

0 comments on commit c73e0ab

Please sign in to comment.