Skip to content

Commit

Permalink
Examples updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Smoren committed Mar 13, 2024
1 parent cbfe4c9 commit 8a7c390
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Views/ArrayIndexListView.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
* @template T Type of array source elements.
*
* <code>
* <?php
*
* $source = [1, 2, 3, 4, 5];
*
* $view = ArrayView::toView($source)->subview(new IndexListSelector([0, 2, 4]));
*
* $view->toArray(); // [1, 3, 5]
*
* </code>
Expand Down
3 changes: 2 additions & 1 deletion src/Views/ArrayMaskView.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
* @template T
*
* <code>
* <?php
*
* $source = [1, 2, 3, 4, 5];
*
* $view = ArrayView::toView($source)->subview(new MaskSelector([true, false, true, false, true]));
*
* $view->toArray(); // [1, 3, 5]
*
* </code>
Expand Down
3 changes: 2 additions & 1 deletion src/Views/ArraySliceView.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
* @template T
*
* <code>
* <?php
*
* $source = [1, 2, 3, 4, 5];
*
* $view = ArrayView::toView($source)->subview(new SliceSelector('::2'));
*
* $view->toArray(); // [1, 3, 5]
*
* </code>
Expand Down

0 comments on commit 8a7c390

Please sign in to comment.