Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/6.x' into 6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
TBlindaruk committed Jun 23, 2021
2 parents 5c79528 + 00fa9c0 commit 09feffb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
*
* @var string
*/
const VERSION = '6.20.28';
const VERSION = '6.20.29';

/**
* The base path for the Laravel installation.
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Validation/Rules/RequiredIf.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class RequiredIf
*/
public function __construct($condition)
{
if (! is_string($condition) && (is_bool($condition) || is_callable($condition))) {
if (! is_string($condition)) {
$this->condition = $condition;
} else {
throw new InvalidArgumentException('The provided condition must be a callable or boolean.');
Expand Down
6 changes: 0 additions & 6 deletions tests/Validation/ValidationRequiredIfTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ public function testItOnlyCallableAndBooleanAreAcceptableArgumentsOfTheRule()
$this->expectException(\InvalidArgumentException::class);

$rule = new RequiredIf('phpinfo');

$rule = new RequiredIf(12.3);

$rule = new RequiredIf(new stdClass());
}

public function testItReturnedRuleIsNotSerializable()
Expand All @@ -52,7 +48,5 @@ public function testItReturnedRuleIsNotSerializable()
$rule = serialize(new RequiredIf(function () {
return true;
}));

$rule = serialize(new RequiredIf());
}
}

0 comments on commit 09feffb

Please sign in to comment.