Skip to content

Commit 8d1dd36

Browse files
committed
single indent of multiline chains
continuation of laravel#10166
1 parent 83b872e commit 8d1dd36

26 files changed

+425
-424
lines changed

cashier-paddle.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1081,8 +1081,9 @@ If you would like to offer trial periods to your customers while still collectin
10811081
use Illuminate\Http\Request;
10821082

10831083
Route::get('/user/subscribe', function (Request $request) {
1084-
$checkout = $request->user()->subscribe('pri_monthly')
1085-
->returnTo(route('home'));
1084+
$checkout = $request->user()
1085+
->subscribe('pri_monthly')
1086+
->returnTo(route('home'));
10861087

10871088
return view('billing', ['checkout' => $checkout]);
10881089
});

console-tests.md

+20-20
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ You may test this command with the following test:
6363
```php tab=Pest
6464
test('console command', function () {
6565
$this->artisan('question')
66-
->expectsQuestion('What is your name?', 'Taylor Otwell')
67-
->expectsQuestion('Which language do you prefer?', 'PHP')
68-
->expectsOutput('Your name is Taylor Otwell and you prefer PHP.')
69-
->doesntExpectOutput('Your name is Taylor Otwell and you prefer Ruby.')
70-
->assertExitCode(0);
66+
->expectsQuestion('What is your name?', 'Taylor Otwell')
67+
->expectsQuestion('Which language do you prefer?', 'PHP')
68+
->expectsOutput('Your name is Taylor Otwell and you prefer PHP.')
69+
->doesntExpectOutput('Your name is Taylor Otwell and you prefer Ruby.')
70+
->assertExitCode(0);
7171
});
7272
```
7373

@@ -78,11 +78,11 @@ test('console command', function () {
7878
public function test_console_command(): void
7979
{
8080
$this->artisan('question')
81-
->expectsQuestion('What is your name?', 'Taylor Otwell')
82-
->expectsQuestion('Which language do you prefer?', 'PHP')
83-
->expectsOutput('Your name is Taylor Otwell and you prefer PHP.')
84-
->doesntExpectOutput('Your name is Taylor Otwell and you prefer Ruby.')
85-
->assertExitCode(0);
81+
->expectsQuestion('What is your name?', 'Taylor Otwell')
82+
->expectsQuestion('Which language do you prefer?', 'PHP')
83+
->expectsOutput('Your name is Taylor Otwell and you prefer PHP.')
84+
->doesntExpectOutput('Your name is Taylor Otwell and you prefer Ruby.')
85+
->assertExitCode(0);
8686
}
8787
```
8888

@@ -91,12 +91,12 @@ If you are utilizing the `search` or `multisearch` functions provided by [Larave
9191
```php tab=Pest
9292
test('console command', function () {
9393
$this->artisan('example')
94-
->expectsSearch('What is your name?', search: 'Tay', answers: [
94+
->expectsSearch('What is your name?', search: 'Tay', answers: [
9595
'Taylor Otwell',
9696
'Taylor Swift',
9797
'Darian Taylor'
98-
], answer: 'Taylor Otwell')
99-
->assertExitCode(0);
98+
], answer: 'Taylor Otwell')
99+
->assertExitCode(0);
100100
});
101101
```
102102

@@ -107,12 +107,12 @@ test('console command', function () {
107107
public function test_console_command(): void
108108
{
109109
$this->artisan('example')
110-
->expectsSearch('What is your name?', search: 'Tay', answers: [
110+
->expectsSearch('What is your name?', search: 'Tay', answers: [
111111
'Taylor Otwell',
112112
'Taylor Swift',
113113
'Darian Taylor'
114-
], answer: 'Taylor Otwell')
115-
->assertExitCode(0);
114+
], answer: 'Taylor Otwell')
115+
->assertExitCode(0);
116116
}
117117
```
118118

@@ -121,8 +121,8 @@ You may also assert that a console command does not generate any output using th
121121
```php tab=Pest
122122
test('console command', function () {
123123
$this->artisan('example')
124-
->doesntExpectOutput()
125-
->assertExitCode(0);
124+
->doesntExpectOutput()
125+
->assertExitCode(0);
126126
});
127127
```
128128

@@ -143,8 +143,8 @@ The `expectsOutputToContain` and `doesntExpectOutputToContain` methods may be us
143143
```php tab=Pest
144144
test('console command', function () {
145145
$this->artisan('example')
146-
->expectsOutputToContain('Taylor')
147-
->assertExitCode(0);
146+
->expectsOutputToContain('Taylor')
147+
->assertExitCode(0);
148148
});
149149
```
150150

container.md

+24-24
Original file line numberDiff line numberDiff line change
@@ -222,16 +222,16 @@ Sometimes you may have two classes that utilize the same interface, but you wish
222222
use Illuminate\Support\Facades\Storage;
223223

224224
$this->app->when(PhotoController::class)
225-
->needs(Filesystem::class)
226-
->give(function () {
227-
return Storage::disk('local');
228-
});
225+
->needs(Filesystem::class)
226+
->give(function () {
227+
return Storage::disk('local');
228+
});
229229

230230
$this->app->when([VideoController::class, UploadController::class])
231-
->needs(Filesystem::class)
232-
->give(function () {
233-
return Storage::disk('s3');
234-
});
231+
->needs(Filesystem::class)
232+
->give(function () {
233+
return Storage::disk('s3');
234+
});
235235

236236
<a name="contextual-attributes"></a>
237237
### Contextual Attributes
@@ -349,8 +349,8 @@ Sometimes you may have a class that receives some injected classes, but also nee
349349
use App\Http\Controllers\UserController;
350350

351351
$this->app->when(UserController::class)
352-
->needs('$variableName')
353-
->give($value);
352+
->needs('$variableName')
353+
->give($value);
354354

355355
Sometimes a class may depend on an array of [tagged](#tagging) instances. Using the `giveTagged` method, you may easily inject all of the container bindings with that tag:
356356

@@ -397,24 +397,24 @@ Occasionally, you may have a class that receives an array of typed objects using
397397
Using contextual binding, you may resolve this dependency by providing the `give` method with a closure that returns an array of resolved `Filter` instances:
398398

399399
$this->app->when(Firewall::class)
400-
->needs(Filter::class)
401-
->give(function (Application $app) {
402-
return [
403-
$app->make(NullFilter::class),
404-
$app->make(ProfanityFilter::class),
405-
$app->make(TooLongFilter::class),
406-
];
407-
});
400+
->needs(Filter::class)
401+
->give(function (Application $app) {
402+
return [
403+
$app->make(NullFilter::class),
404+
$app->make(ProfanityFilter::class),
405+
$app->make(TooLongFilter::class),
406+
];
407+
});
408408

409409
For convenience, you may also just provide an array of class names to be resolved by the container whenever `Firewall` needs `Filter` instances:
410410

411411
$this->app->when(Firewall::class)
412-
->needs(Filter::class)
413-
->give([
414-
NullFilter::class,
415-
ProfanityFilter::class,
416-
TooLongFilter::class,
417-
]);
412+
->needs(Filter::class)
413+
->give([
414+
NullFilter::class,
415+
ProfanityFilter::class,
416+
TooLongFilter::class,
417+
]);
418418

419419
<a name="variadic-tag-dependencies"></a>
420420
#### Variadic Tag Dependencies

controllers.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ Typically, a 404 HTTP response will be generated if an implicitly bound resource
208208
use Illuminate\Support\Facades\Redirect;
209209

210210
Route::resource('photos', PhotoController::class)
211-
->missing(function (Request $request) {
212-
return Redirect::route('photos.index');
213-
});
211+
->missing(function (Request $request) {
212+
return Redirect::route('photos.index');
213+
});
214214

215215
<a name="soft-deleted-models"></a>
216216
#### Soft Deleted Models

database.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -464,10 +464,10 @@ public function boot(): void
464464
{
465465
Event::listen(function (DatabaseBusy $event) {
466466
Notification::route('mail', 'dev@example.com')
467-
->notify(new DatabaseApproachingMaxConnections(
468-
$event->connectionName,
469-
$event->connections
470-
));
467+
->notify(new DatabaseApproachingMaxConnections(
468+
$event->connectionName,
469+
$event->connections
470+
));
471471
});
472472
}
473473
```

0 commit comments

Comments
 (0)