Skip to content

Commit

Permalink
rename to any filled
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Mar 12, 2018
1 parent 5403d02 commit 896d817
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Http/Concerns/InteractsWithInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function filled($key)
* @param string|array $keys
* @return bool
*/
public function filledAny($keys)
public function anyFilled($keys)
{
$keys = is_array($keys) ? $keys : func_get_args();

Expand Down
28 changes: 14 additions & 14 deletions tests/Http/HttpRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,26 +301,26 @@ public function testFilledAnyMethod()
{
$request = Request::create('/', 'GET', ['name' => 'Taylor', 'age' => '', 'city' => null]);

$this->assertTrue($request->filledAny(['name']));
$this->assertTrue($request->filledAny('name'));
$this->assertTrue($request->anyFilled(['name']));
$this->assertTrue($request->anyFilled('name'));

$this->assertFalse($request->filledAny(['age']));
$this->assertFalse($request->filledAny('age'));
$this->assertFalse($request->anyFilled(['age']));
$this->assertFalse($request->anyFilled('age'));

$this->assertFalse($request->filledAny(['foo']));
$this->assertFalse($request->filledAny('foo'));
$this->assertFalse($request->anyFilled(['foo']));
$this->assertFalse($request->anyFilled('foo'));

$this->assertTrue($request->filledAny(['age', 'name']));
$this->assertTrue($request->filledAny('age', 'name'));
$this->assertTrue($request->anyFilled(['age', 'name']));
$this->assertTrue($request->anyFilled('age', 'name'));

$this->assertTrue($request->filledAny(['foo', 'name']));
$this->assertTrue($request->filledAny('foo', 'name'));
$this->assertTrue($request->anyFilled(['foo', 'name']));
$this->assertTrue($request->anyFilled('foo', 'name'));

$this->assertFalse($request->filledAny('age', 'city'));
$this->assertFalse($request->filledAny('age', 'city'));
$this->assertFalse($request->anyFilled('age', 'city'));
$this->assertFalse($request->anyFilled('age', 'city'));

$this->assertFalse($request->filledAny('foo', 'bar'));
$this->assertFalse($request->filledAny('foo', 'bar'));
$this->assertFalse($request->anyFilled('foo', 'bar'));
$this->assertFalse($request->anyFilled('foo', 'bar'));
}

public function testInputMethod()
Expand Down

0 comments on commit 896d817

Please sign in to comment.