File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed
src/Illuminate/Collections Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -554,11 +554,11 @@ public function isEmpty()
554554 }
555555
556556 /**
557- * Determine if the collection contains a single element .
557+ * Determine if the collection contains a single item .
558558 *
559559 * @return bool
560560 */
561- public function isSingle ()
561+ public function containsOneItem ()
562562 {
563563 return $ this ->count () === 1 ;
564564 }
Original file line number Diff line number Diff line change @@ -557,11 +557,11 @@ public function isEmpty()
557557 }
558558
559559 /**
560- * Determine if the collection contains a single element .
560+ * Determine if the collection contains a single item .
561561 *
562562 * @return bool
563563 */
564- public function isSingle ()
564+ public function containsOneItem ()
565565 {
566566 return $ this ->take (2 )->count () === 1 ;
567567 }
Original file line number Diff line number Diff line change @@ -544,11 +544,11 @@ public function testCountableByWithCallback($collection)
544544 /**
545545 * @dataProvider collectionClassProvider
546546 */
547- public function testIsSingle ($ collection )
547+ public function testContainsOneItem ($ collection )
548548 {
549- $ this ->assertFalse ((new $ collection ([]))->isSingle ());
550- $ this ->assertTrue ((new $ collection ([1 ]))->isSingle ());
551- $ this ->assertFalse ((new $ collection ([1 , 2 ]))->isSingle ());
549+ $ this ->assertFalse ((new $ collection ([]))->containsOneItem ());
550+ $ this ->assertTrue ((new $ collection ([1 ]))->containsOneItem ());
551+ $ this ->assertFalse ((new $ collection ([1 , 2 ]))->containsOneItem ());
552552 }
553553
554554 public function testIterable ()
Original file line number Diff line number Diff line change @@ -484,10 +484,10 @@ public function testIsNotEmptyIsLazy()
484484 });
485485 }
486486
487- public function testIsSingleIsLazy ()
487+ public function testContainsOneItemIsLazy ()
488488 {
489489 $ this ->assertEnumerates (2 , function ($ collection ) {
490- $ collection ->isSingle ();
490+ $ collection ->containsOneItem ();
491491 });
492492 }
493493
You can’t perform that action at this time.
0 commit comments