Skip to content

Commit

Permalink
[5.7] No need to set variables and just return them. (#26140)
Browse files Browse the repository at this point in the history
* No need to set variables and just return them.

* Fix CS.
  • Loading branch information
lucasmichot authored and taylorotwell committed Oct 17, 2018
1 parent cf28b75 commit b75c688
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,6 @@ protected function wrapJsonSelector($value)

$path = count($parts) > 1 ? ', '.$this->wrapJsonPath($parts[1]) : '';

$selector = 'json_extract('.$field.$path.')';

return $selector;
return 'json_extract('.$field.$path.')';
}
}
3 changes: 1 addition & 2 deletions tests/Validation/ValidationAddFailureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ public function makeValidator()
{
$mainTest = new ValidationValidatorTest;
$trans = $mainTest->getIlluminateArrayTranslator();
$validator = new Validator($trans, ['foo' => ['bar' => ['baz' => '']]], ['foo.bar.baz' => 'sometimes|required']);

return $validator;
return new Validator($trans, ['foo' => ['bar' => ['baz' => '']]], ['foo.bar.baz' => 'sometimes|required']);
}

public function testAddFailureExists()
Expand Down

0 comments on commit b75c688

Please sign in to comment.