Skip to content

Commit

Permalink
formatting. add proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 5, 2018
1 parent eb6ea2d commit 8f7e647
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/Illuminate/Support/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate
protected static $proxies = [
'average', 'avg', 'contains', 'each', 'every', 'filter', 'first',
'flatMap', 'groupBy', 'keyBy', 'map', 'max', 'min', 'partition',
'reject', 'sortBy', 'sortByDesc', 'sum', 'unique',
'reject', 'some', 'sortBy', 'sortByDesc', 'sum', 'unique',
];

/**
Expand Down Expand Up @@ -238,6 +238,19 @@ public function collapse()
return new static(Arr::collapse($this->items));
}

/**
* Alias for the "contains" method.
*
* @param mixed $key
* @param mixed $operator
* @param mixed $value
* @return bool
*/
public function some($key, $operator = null, $value = null)
{
return $this->contains($key, $operator, $value);
}

/**
* Determine if an item exists in the collection.
*
Expand All @@ -261,19 +274,6 @@ public function contains($key, $operator = null, $value = null)
return $this->contains($this->operatorForWhere(...func_get_args()));
}

/**
* Alias for the "contains" method.
*
* @param mixed $key
* @param mixed $operator
* @param mixed $value
* @return bool
*/
public function some($key, $operator = null, $value = null)
{
return $this->contains($key, $operator, $value);
}

/**
* Determine if an item exists in the collection using strict comparison.
*
Expand Down

0 comments on commit 8f7e647

Please sign in to comment.