Skip to content

Commit 87b0d48

Browse files
committed
remove default value
1 parent d2c75f0 commit 87b0d48

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Query/Builder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ public function decrementEach(array $columns, array $extra = [], array $options
897897
* @param float|int $amount
898898
* @return int
899899
*/
900-
public function multiply($column, $amount = 1, array $extra = [], array $options = [])
900+
public function multiply($column, $amount, array $extra = [], array $options = [])
901901
{
902902
$query = ['$mul' => [(string) $column => $amount]];
903903

@@ -924,7 +924,7 @@ public function multiply($column, $amount = 1, array $extra = [], array $options
924924
* @param float|int $amount
925925
* @return int
926926
*/
927-
public function divide($column, $amount = 1, array $extra = [], array $options = [])
927+
public function divide($column, $amount, array $extra = [], array $options = [])
928928
{
929929
return $this->multiply($column, 1 / $amount, $extra, $options);
930930
}

tests/QueryBuilderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,11 +1064,11 @@ public function testMultiplyAndDivide()
10641064
$user = DB::table('users')->where('name', 'John Doe')->first();
10651065
$this->assertEquals(88000, $user->salary);
10661066

1067-
DB::table('users')->where('name', 'John Doe')->multiply('salary');
1067+
DB::table('users')->where('name', 'John Doe')->multiply('salary', 1);
10681068
$user = DB::table('users')->where('name', 'John Doe')->first();
10691069
$this->assertEquals(88000, $user->salary);
10701070

1071-
DB::table('users')->where('name', 'John Doe')->divide('salary');
1071+
DB::table('users')->where('name', 'John Doe')->divide('salary', 1);
10721072
$user = DB::table('users')->where('name', 'John Doe')->first();
10731073
$this->assertEquals(88000, $user->salary);
10741074

@@ -1090,7 +1090,7 @@ public function testMultiplyAndDivide()
10901090
$this->assertEquals(44000, $user->salary);
10911091
$this->assertEquals('junior', $user->note);
10921092

1093-
DB::table('users')->multiply('salary');
1093+
DB::table('users')->multiply('salary', 1);
10941094
$user = DB::table('users')->where('name', 'John Doe')->first();
10951095
$this->assertEquals(44000, $user->salary);
10961096
$user = DB::table('users')->where('name', 'Jane Doe')->first();

0 commit comments

Comments
 (0)