Skip to content

Commit 8dfc3d4

Browse files
authored
Correct misspellings (#55218)
* Correct misspellings * Add BC method
1 parent 1409a7b commit 8dfc3d4

7 files changed

+19
-11
lines changed

src/Illuminate/Database/Query/Grammars/PostgresGrammar.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -831,8 +831,16 @@ public static function customOperators(array $operators)
831831
* @param bool $value
832832
* @return void
833833
*/
834-
public static function cascadeOnTrucate(bool $value = true)
834+
public static function cascadeOnTruncate(bool $value = true)
835835
{
836836
static::$cascadeTruncate = $value;
837837
}
838+
839+
/**
840+
* @deprecated use cascadeOnTruncate
841+
*/
842+
public static function cascadeOnTrucate(bool $value = true)
843+
{
844+
self::cascadeOnTruncate($value);
845+
}
838846
}

tests/Database/DatabaseEloquentHasOneOrManyWithAttributesPendingTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function testMorphOneAddsAttributes(): void
9898
$this->assertSame($value, $relatedModel->$key);
9999
}
100100

101-
public function testPendingAttributesCanBeOverriden(): void
101+
public function testPendingAttributesCanBeOverridden(): void
102102
{
103103
$key = 'a key';
104104
$defaultValue = 'a value';

tests/Database/DatabaseEloquentHasOneOrManyWithAttributesTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function testMorphOneAddsAttributes(): void
9898
$this->assertSame($value, $relatedModel->$key);
9999
}
100100

101-
public function testWithAttributesCanBeOverriden(): void
101+
public function testWithAttributesCanBeOverridden(): void
102102
{
103103
$key = 'a key';
104104
$defaultValue = 'a value';

tests/Database/DatabasePostgresQueryGrammarTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ public function testCompileTruncate()
6060
'truncate "users" restart identity cascade' => [],
6161
], $postgres->compileTruncate($builder));
6262

63-
PostgresGrammar::cascadeOnTrucate(false);
63+
PostgresGrammar::cascadeOnTruncate(false);
6464

6565
$this->assertEquals([
6666
'truncate "users" restart identity' => [],
6767
], $postgres->compileTruncate($builder));
6868

69-
PostgresGrammar::cascadeOnTrucate();
69+
PostgresGrammar::cascadeOnTruncate();
7070

7171
$this->assertEquals([
7272
'truncate "users" restart identity cascade' => [],

tests/Integration/Database/DatabaseEloquentModelAttributeCastingTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public function testSettingRawAttributesClearsTheCastCache()
184184
$this->assertSame('117 Spencer St.', $model->address->lineOne);
185185
}
186186

187-
public function testCastsThatOnlyHaveGetterDoNotPeristAnythingToModelOnSave()
187+
public function testCastsThatOnlyHaveGetterDoNotPersistAnythingToModelOnSave()
188188
{
189189
$model = new TestEloquentModelWithAttributeCast;
190190

tests/Integration/Database/EloquentNamedScopeAttibuteTest.php tests/Integration/Database/EloquentNamedScopeAttributeTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Orchestra\Testbench\TestCase;
77

88
#[WithMigration]
9-
class EloquentNamedScopeAttibuteTest extends TestCase
9+
class EloquentNamedScopeAttributeTest extends TestCase
1010
{
1111
protected $query = 'select * from "named_scope_users" where "email_verified_at" is not null';
1212

tests/Validation/ValidationImageFileRuleTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function testDimensionsWithCustomImageSizeMethod()
4444
);
4545
}
4646

47-
public function testDimentionWithTheRatioMethod()
47+
public function testDimensionWithTheRatioMethod()
4848
{
4949
$this->fails(
5050
File::image()->dimensions(Rule::dimensions()->ratio(1)),
@@ -58,7 +58,7 @@ public function testDimentionWithTheRatioMethod()
5858
);
5959
}
6060

61-
public function testDimentionWithTheMinRatioMethod()
61+
public function testDimensionWithTheMinRatioMethod()
6262
{
6363
$this->fails(
6464
File::image()->dimensions(Rule::dimensions()->minRatio(1 / 2)),
@@ -72,7 +72,7 @@ public function testDimentionWithTheMinRatioMethod()
7272
);
7373
}
7474

75-
public function testDimentionWithTheMaxRatioMethod()
75+
public function testDimensionWithTheMaxRatioMethod()
7676
{
7777
$this->fails(
7878
File::image()->dimensions(Rule::dimensions()->maxRatio(1 / 2)),
@@ -86,7 +86,7 @@ public function testDimentionWithTheMaxRatioMethod()
8686
);
8787
}
8888

89-
public function testDimentionWithTheRatioBetweenMethod()
89+
public function testDimensionWithTheRatioBetweenMethod()
9090
{
9191
$this->fails(
9292
File::image()->dimensions(Rule::dimensions()->ratioBetween(1 / 2, 1 / 3)),

0 commit comments

Comments
 (0)