Skip to content

Commit

Permalink
Countable return types (#38226)
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored Aug 3, 2021
1 parent 1fd1bb1 commit 3236599
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Illuminate/Collections/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,7 @@ public function getIterator()
*
* @return int
*/
#[\ReturnTypeWillChange]
public function count()
{
return count($this->items);
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Collections/LazyCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,7 @@ public function getIterator()
*
* @return int
*/
#[\ReturnTypeWillChange]
public function count()
{
if (is_array($this->source)) {
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Pagination/AbstractCursorPaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ public function isNotEmpty()
*
* @return int
*/
#[\ReturnTypeWillChange]
public function count()
{
return $this->items->count();
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Pagination/AbstractPaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ public function isNotEmpty()
*
* @return int
*/
#[\ReturnTypeWillChange]
public function count()
{
return $this->items->count();
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Routing/AbstractRouteCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ public function getIterator()
*
* @return int
*/
#[\ReturnTypeWillChange]
public function count()
{
return count($this->getRoutes());
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Support/ViewErrorBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public function any()
*
* @return int
*/
#[\ReturnTypeWillChange]
public function count()
{
return $this->getBag('default')->count();
Expand Down

0 comments on commit 3236599

Please sign in to comment.