From 48246da2320c95a17bfae922d36264105a917906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Fri, 12 Apr 2024 15:53:34 +0200 Subject: [PATCH] Fix more typos (#51039) * Fix more typos * Fix more typos --- .../Configuration/ApplicationBuilder.php | 2 +- .../Providers/EventServiceProvider.php | 2 +- tests/Database/DatabaseQueryBuilderTest.php | 18 ++++++++--------- .../Foundation/FoundationDocsCommandTest.php | 2 +- .../ShouldDispatchAfterCommitEventTest.php | 2 +- .../Foundation/RoutingServiceProviderTest.php | 20 +++++++++---------- .../Integration/Http/ThrottleRequestsTest.php | 4 ++-- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/Illuminate/Foundation/Configuration/ApplicationBuilder.php b/src/Illuminate/Foundation/Configuration/ApplicationBuilder.php index 756055ca527e..642830bbe743 100644 --- a/src/Illuminate/Foundation/Configuration/ApplicationBuilder.php +++ b/src/Illuminate/Foundation/Configuration/ApplicationBuilder.php @@ -108,7 +108,7 @@ public function withEvents(array|bool $discover = []) } /** - * Register the braodcasting services for the application. + * Register the broadcasting services for the application. * * @param string $channels * @param array $attributes diff --git a/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php b/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php index ef568c10ee8b..6259c0bf7704 100644 --- a/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php +++ b/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php @@ -33,7 +33,7 @@ class EventServiceProvider extends ServiceProvider protected $observers = []; /** - * Indiates if events should be discovered. + * Indicates if events should be discovered. * * @var bool */ diff --git a/tests/Database/DatabaseQueryBuilderTest.php b/tests/Database/DatabaseQueryBuilderTest.php index 1583efb63b7d..cd5227c92b1c 100755 --- a/tests/Database/DatabaseQueryBuilderTest.php +++ b/tests/Database/DatabaseQueryBuilderTest.php @@ -2479,19 +2479,19 @@ public function testJoinsWithNestedJoins() public function testJoinsWithMultipleNestedJoins() { $builder = $this->getBuilder(); - $builder->select('users.id', 'contacts.id', 'contact_types.id', 'countrys.id', 'planets.id')->from('users')->leftJoin('contacts', function ($j) { + $builder->select('users.id', 'contacts.id', 'contact_types.id', 'countries.id', 'planets.id')->from('users')->leftJoin('contacts', function ($j) { $j->on('users.id', 'contacts.id') ->join('contact_types', 'contacts.contact_type_id', '=', 'contact_types.id') - ->leftJoin('countrys', function ($q) { - $q->on('contacts.country', '=', 'countrys.country') + ->leftJoin('countries', function ($q) { + $q->on('contacts.country', '=', 'countries.country') ->join('planets', function ($q) { - $q->on('countrys.planet_id', '=', 'planet.id') + $q->on('countries.planet_id', '=', 'planet.id') ->where('planet.is_settled', '=', 1) ->where('planet.population', '>=', 10000); }); }); }); - $this->assertSame('select "users"."id", "contacts"."id", "contact_types"."id", "countrys"."id", "planets"."id" from "users" left join ("contacts" inner join "contact_types" on "contacts"."contact_type_id" = "contact_types"."id" left join ("countrys" inner join "planets" on "countrys"."planet_id" = "planet"."id" and "planet"."is_settled" = ? and "planet"."population" >= ?) on "contacts"."country" = "countrys"."country") on "users"."id" = "contacts"."id"', $builder->toSql()); + $this->assertSame('select "users"."id", "contacts"."id", "contact_types"."id", "countries"."id", "planets"."id" from "users" left join ("contacts" inner join "contact_types" on "contacts"."contact_type_id" = "contact_types"."id" left join ("countries" inner join "planets" on "countries"."planet_id" = "planet"."id" and "planet"."is_settled" = ? and "planet"."population" >= ?) on "contacts"."country" = "countries"."country") on "users"."id" = "contacts"."id"', $builder->toSql()); $this->assertEquals(['1', 10000], $builder->getBindings()); } @@ -2502,16 +2502,16 @@ public function testJoinsWithNestedJoinWithAdvancedSubqueryCondition() $j->on('users.id', 'contacts.id') ->join('contact_types', 'contacts.contact_type_id', '=', 'contact_types.id') ->whereExists(function ($q) { - $q->select('*')->from('countrys') - ->whereColumn('contacts.country', '=', 'countrys.country') + $q->select('*')->from('countries') + ->whereColumn('contacts.country', '=', 'countries.country') ->join('planets', function ($q) { - $q->on('countrys.planet_id', '=', 'planet.id') + $q->on('countries.planet_id', '=', 'planet.id') ->where('planet.is_settled', '=', 1); }) ->where('planet.population', '>=', 10000); }); }); - $this->assertSame('select "users"."id", "contacts"."id", "contact_types"."id" from "users" left join ("contacts" inner join "contact_types" on "contacts"."contact_type_id" = "contact_types"."id") on "users"."id" = "contacts"."id" and exists (select * from "countrys" inner join "planets" on "countrys"."planet_id" = "planet"."id" and "planet"."is_settled" = ? where "contacts"."country" = "countrys"."country" and "planet"."population" >= ?)', $builder->toSql()); + $this->assertSame('select "users"."id", "contacts"."id", "contact_types"."id" from "users" left join ("contacts" inner join "contact_types" on "contacts"."contact_type_id" = "contact_types"."id") on "users"."id" = "contacts"."id" and exists (select * from "countries" inner join "planets" on "countries"."planet_id" = "planet"."id" and "planet"."is_settled" = ? where "contacts"."country" = "countries"."country" and "planet"."population" >= ?)', $builder->toSql()); $this->assertEquals(['1', 10000], $builder->getBindings()); } diff --git a/tests/Foundation/FoundationDocsCommandTest.php b/tests/Foundation/FoundationDocsCommandTest.php index 86d6755874ee..360d0f4eff3c 100644 --- a/tests/Foundation/FoundationDocsCommandTest.php +++ b/tests/Foundation/FoundationDocsCommandTest.php @@ -180,7 +180,7 @@ public function testItBubblesUpAskStrategyExceptions() $this->artisan('docs'); } - public function testItBubblesUpNonProcessInterruptExceptionsInAskStratgies() + public function testItBubblesUpNonProcessInterruptExceptionsInAskStrategies() { putenv('ARTISAN_DOCS_ASK_STRATEGY='.__DIR__.'/fixtures/process-failure-strategy.php'); diff --git a/tests/Integration/Events/ShouldDispatchAfterCommitEventTest.php b/tests/Integration/Events/ShouldDispatchAfterCommitEventTest.php index 5ec65c1ed338..bfc1da3bbe1a 100644 --- a/tests/Integration/Events/ShouldDispatchAfterCommitEventTest.php +++ b/tests/Integration/Events/ShouldDispatchAfterCommitEventTest.php @@ -105,7 +105,7 @@ public function testItOnlyDispatchesNestedTransactionsEventsAfterTheRootTransact $this->assertTrue(AnotherShouldDispatchAfterCommitTestEvent::$ran); } - public function testItOnlyDispatchesNestedTransactionsEventsAfterTheRootTransactionIsCommitedDifferentOrder() + public function testItOnlyDispatchesNestedTransactionsEventsAfterTheRootTransactionIsCommittedDifferentOrder() { Event::listen(ShouldDispatchAfterCommitTestEvent::class, ShouldDispatchAfterCommitListener::class); Event::listen(AnotherShouldDispatchAfterCommitTestEvent::class, AnotherShouldDispatchAfterCommitListener::class); diff --git a/tests/Integration/Foundation/RoutingServiceProviderTest.php b/tests/Integration/Foundation/RoutingServiceProviderTest.php index 5825bbd626eb..8d7f2fe52a49 100644 --- a/tests/Integration/Foundation/RoutingServiceProviderTest.php +++ b/tests/Integration/Foundation/RoutingServiceProviderTest.php @@ -17,7 +17,7 @@ public function testItIncludesMergedDataInServerRequestInterfaceInstancesUsingGe $response = $this->withoutExceptionHandling()->get('test-route?'.http_build_query([ 'sent' => 'sent-data', - 'overridden' => 'overriden-sent-data', + 'overridden' => 'overridden-sent-data', ])); $response->assertOk(); @@ -48,7 +48,7 @@ public function testItIncludesMergedDataInServerRequestInterfaceInstancesUsingGe $response = $this->getJson('test-route?'.http_build_query([ 'sent' => 'sent-data', - 'overridden' => 'overriden-sent-data', + 'overridden' => 'overridden-sent-data', ]), [ 'content-type' => 'application/json', ]); @@ -57,7 +57,7 @@ public function testItIncludesMergedDataInServerRequestInterfaceInstancesUsingGe $response->assertExactJson([ 'json-data' => 'json-data', 'merged' => 'replaced-merged-data', - 'overridden' => 'overriden-merged-data', + 'overridden' => 'overridden-merged-data', 'request-data' => 'request-data', ]); } @@ -70,14 +70,14 @@ public function testItIncludesMergedDataInServerRequestInterfaceInstancesUsingGe $response = $this->getJson('test-route?'.http_build_query([ 'sent' => 'sent-data', - 'overridden' => 'overriden-sent-data', + 'overridden' => 'overridden-sent-data', ])); $response->assertOk(); $response->assertExactJson([ 'json-data' => 'json-data', 'merged' => 'replaced-merged-data', - 'overridden' => 'overriden-merged-data', + 'overridden' => 'overridden-merged-data', 'request-data' => 'request-data', ]); } @@ -90,14 +90,14 @@ public function testItIncludesMergedDataInServerRequestInterfaceInstancesUsingPo $response = $this->post('test-route', [ 'sent' => 'sent-data', - 'overridden' => 'overriden-sent-data', + 'overridden' => 'overridden-sent-data', ]); $response->assertOk(); $response->assertExactJson([ 'sent' => 'sent-data', 'merged' => 'replaced-merged-data', - 'overridden' => 'overriden-merged-data', + 'overridden' => 'overridden-merged-data', 'request-data' => 'request-data', ]); } @@ -110,7 +110,7 @@ public function testItIncludesMergedDataInServerRequestInterfaceInstancesUsingPo $response = $this->postJson('test-route', [ 'sent' => 'sent-data', - 'overridden' => 'overriden-sent-data', + 'overridden' => 'overridden-sent-data', ]); $response->assertOk(); @@ -118,7 +118,7 @@ public function testItIncludesMergedDataInServerRequestInterfaceInstancesUsingPo 'json-data' => 'json-data', 'sent' => 'sent-data', 'merged' => 'replaced-merged-data', - 'overridden' => 'overriden-merged-data', + 'overridden' => 'overridden-merged-data', 'request-data' => 'request-data', ]); } @@ -144,7 +144,7 @@ public function handle(Request $request, $next) $request->merge(['merged' => 'replaced-merged-data']); - $request->merge(['overridden' => 'overriden-merged-data']); + $request->merge(['overridden' => 'overridden-merged-data']); $request->request->set('request-data', 'request-data'); diff --git a/tests/Integration/Http/ThrottleRequestsTest.php b/tests/Integration/Http/ThrottleRequestsTest.php index 91c57581b9fe..4d4547642353 100644 --- a/tests/Integration/Http/ThrottleRequestsTest.php +++ b/tests/Integration/Http/ThrottleRequestsTest.php @@ -305,7 +305,7 @@ public function testItFallbacksToUserPropertyWhenThereIsNoNamedLimiterWhenAuthen public function testItFallbacksToUserAccessorWhenThereIsNoNamedLimiterWhenAuthenticated() { - $user = UserWithAcessor::make(); + $user = UserWithAccessor::make(); Carbon::setTestNow(Carbon::create(2018, 1, 1, 0, 0, 0)); @@ -333,7 +333,7 @@ public function testItFallbacksToUserAccessorWhenThereIsNoNamedLimiterWhenAuthen } } -class UserWithAcessor extends User +class UserWithAccessor extends User { public function getRateLimitingAttribute(): int {