Skip to content

Commit 653985a

Browse files
authored
replace first class callables with comments (#7951)
1 parent 7ef304f commit 653985a

File tree

11 files changed

+34
-34
lines changed

11 files changed

+34
-34
lines changed

broadcasting.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -748,9 +748,9 @@ If you would like to listen for events on a private channel, use the `private` m
748748

749749
```js
750750
Echo.private(`orders.${this.order.id}`)
751-
.listen(...)
752-
.listen(...)
753-
.listen(...);
751+
.listen(/* ... */)
752+
.listen(/* ... */)
753+
.listen(/* ... */);
754754
```
755755

756756
<a name="stop-listening-for-events"></a>
@@ -865,9 +865,9 @@ As typical of other types of events, you may listen for events sent to presence
865865

866866
```js
867867
Echo.join(`chat.${roomId}`)
868-
.here(...)
869-
.joining(...)
870-
.leaving(...)
868+
.here(/* ... */)
869+
.joining(/* ... */)
870+
.leaving(/* ... */)
871871
.listen('NewMessage', (e) => {
872872
//
873873
});

cache.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ The `Cache` facade's `get` method is used to retrieve items from the cache. If t
141141
You may even pass a closure as the default value. The result of the closure will be returned if the specified item does not exist in the cache. Passing a closure allows you to defer the retrieval of default values from a database or other external service:
142142

143143
$value = Cache::get('key', function () {
144-
return DB::table(...)->get();
144+
return DB::table(/* ... */)->get();
145145
});
146146

147147
<a name="checking-for-item-existence"></a>

database.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ If your application defines multiple connections in your `config/database.php` c
231231

232232
use Illuminate\Support\Facades\DB;
233233

234-
$users = DB::connection('sqlite')->select(...);
234+
$users = DB::connection('sqlite')->select(/* ... */);
235235

236236
You may access the raw, underlying PDO instance of a connection using the `getPdo` method on a connection instance:
237237

errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ Instead of type-checking exceptions in the exception handler's `register` method
229229
*/
230230
public function render($request)
231231
{
232-
return response(...);
232+
return response(/* ... */);
233233
}
234234
}
235235

http-client.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -148,43 +148,43 @@ For convenience, you may use the `acceptJson` method to quickly specify that you
148148
You may specify basic and digest authentication credentials using the `withBasicAuth` and `withDigestAuth` methods, respectively:
149149

150150
// Basic authentication...
151-
$response = Http::withBasicAuth('taylor@laravel.com', 'secret')->post(...);
151+
$response = Http::withBasicAuth('taylor@laravel.com', 'secret')->post(/* ... */);
152152

153153
// Digest authentication...
154-
$response = Http::withDigestAuth('taylor@laravel.com', 'secret')->post(...);
154+
$response = Http::withDigestAuth('taylor@laravel.com', 'secret')->post(/* ... */);
155155

156156
<a name="bearer-tokens"></a>
157157
#### Bearer Tokens
158158

159159
If you would like to quickly add a bearer token to the request's `Authorization` header, you may use the `withToken` method:
160160

161-
$response = Http::withToken('token')->post(...);
161+
$response = Http::withToken('token')->post(/* ... */);
162162

163163
<a name="timeout"></a>
164164
### Timeout
165165

166166
The `timeout` method may be used to specify the maximum number of seconds to wait for a response:
167167

168-
$response = Http::timeout(3)->get(...);
168+
$response = Http::timeout(3)->get(/* ... */);
169169

170170
If the given timeout is exceeded, an instance of `Illuminate\Http\Client\ConnectionException` will be thrown.
171171

172172
You may specify the maximum number of seconds to wait while trying to connect to a server using the `connectTimeout` method:
173173

174-
$response = Http::connectTimeout(3)->get(...);
174+
$response = Http::connectTimeout(3)->get(/* ... */);
175175

176176
<a name="retries"></a>
177177
### Retries
178178

179179
If you would like HTTP client to automatically retry the request if a client or server error occurs, you may use the `retry` method. The `retry` method accepts the maximum number of times the request should be attempted and the number of milliseconds that Laravel should wait in between attempts:
180180

181-
$response = Http::retry(3, 100)->post(...);
181+
$response = Http::retry(3, 100)->post(/* ... */);
182182

183183
If needed, you may pass a third argument to the `retry` method. The third argument should be a callable that determines if the retries should actually be attempted. For example, you may wish to only retry the request if the initial request encounters an `ConnectionException`:
184184

185185
$response = Http::retry(3, 100, function ($exception, $request) {
186186
return $exception instanceof ConnectionException;
187-
})->post(...);
187+
})->post(/* ... */);
188188

189189
If a request attempt fails, you may wish to make a change to the request before a new attempt is made. You can achieve this by modifying request argument provided to the callable you provided to the `retry` method. For example, you might want to retry the request with a new authorization token if the first attempt returned an authentication error:
190190

@@ -196,11 +196,11 @@ If a request attempt fails, you may wish to make a change to the request before
196196
$request->withToken($this->getNewToken());
197197

198198
return true;
199-
})->post(...);
199+
})->post(/* ... */);
200200

201201
If all of the requests fail, an instance of `Illuminate\Http\Client\RequestException` will be thrown. If you would like to disable this behavior, you may provide a `throw` argument with a value of `false`. When disabled, the last response received by the client will be returned after all retries have been attempted:
202202

203-
$response = Http::retry(3, 100, throw: false)->post(...);
203+
$response = Http::retry(3, 100, throw: false)->post(/* ... */);
204204

205205
> {note} If all of the requests fail because of a connection issue, a `Illuminate\Http\Client\ConnectionException` will still be thrown even when the `throw` argument is set to `false`.
206206
@@ -229,7 +229,7 @@ Unlike Guzzle's default behavior, Laravel's HTTP client wrapper does not throw e
229229

230230
If you have a response instance and would like to throw an instance of `Illuminate\Http\Client\RequestException` if the response status code indicates a client or server error, you may use the `throw` or `throwIf` methods:
231231

232-
$response = Http::post(...);
232+
$response = Http::post(/* ... */);
233233

234234
// Throw an exception if a client or server error occurred...
235235
$response->throw();
@@ -243,11 +243,11 @@ The `Illuminate\Http\Client\RequestException` instance has a public `$response`
243243

244244
The `throw` method returns the response instance if no error occurred, allowing you to chain other operations onto the `throw` method:
245245

246-
return Http::post(...)->throw()->json();
246+
return Http::post(/* ... */)->throw()->json();
247247

248248
If you would like to perform some additional logic before the exception is thrown, you may pass a closure to the `throw` method. The exception will be thrown automatically after the closure is invoked, so you do not need to re-throw the exception from within the closure:
249249

250-
return Http::post(...)->throw(function ($response, $e) {
250+
return Http::post(/* ... */)->throw(function ($response, $e) {
251251
//
252252
})->json();
253253

@@ -336,7 +336,7 @@ For example, to instruct the HTTP client to return empty, `200` status code resp
336336

337337
Http::fake();
338338

339-
$response = Http::post(...);
339+
$response = Http::post(/* ... */);
340340

341341
<a name="faking-specific-urls"></a>
342342
#### Faking Specific URLs

logging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,6 @@ Once you have configured the `custom` driver channel, you're ready to define the
406406
*/
407407
public function __invoke(array $config)
408408
{
409-
return new Logger(...);
409+
return new Logger(/* ... */);
410410
}
411411
}

mail.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ Once you've defined your custom transport, you may register it via the `extend`
987987
public function boot()
988988
{
989989
Mail::extend('mailchimp', function (array $config = []) {
990-
return new MailchimpTransport(...);
990+
return new MailchimpTransport(/* ... */);
991991
})
992992
}
993993

queries.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ Instead of using the `DB::raw` method, you may also use the following methods to
258258
<a name="selectraw"></a>
259259
#### `selectRaw`
260260

261-
The `selectRaw` method can be used in place of `addSelect(DB::raw(...))`. This method accepts an optional array of bindings as its second argument:
261+
The `selectRaw` method can be used in place of `addSelect(DB::raw(/* ... */))`. This method accepts an optional array of bindings as its second argument:
262262

263263
$orders = DB::table('orders')
264264
->selectRaw('price * ? as price_with_tax', [1.0825])
@@ -348,7 +348,7 @@ You may also specify more advanced join clauses. To get started, pass a closure
348348

349349
DB::table('users')
350350
->join('contacts', function ($join) {
351-
$join->on('users.id', '=', 'contacts.user_id')->orOn(...);
351+
$join->on('users.id', '=', 'contacts.user_id')->orOn(/* ... */);
352352
})
353353
->get();
354354

queues.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ Once you have written your job class, you may dispatch it using the `dispatch` m
622622
*/
623623
public function store(Request $request)
624624
{
625-
$podcast = Podcast::create(...);
625+
$podcast = Podcast::create(/* ... */);
626626

627627
// ...
628628

@@ -660,7 +660,7 @@ If you would like to specify that a job should not be immediately available for
660660
*/
661661
public function store(Request $request)
662662
{
663-
$podcast = Podcast::create(...);
663+
$podcast = Podcast::create(/* ... */);
664664

665665
// ...
666666

@@ -713,7 +713,7 @@ If you would like to dispatch a job immediately (synchronously), you may use the
713713
*/
714714
public function store(Request $request)
715715
{
716-
$podcast = Podcast::create(...);
716+
$podcast = Podcast::create(/* ... */);
717717

718718
// Create podcast...
719719

@@ -775,7 +775,7 @@ In addition to chaining job class instances, you may also chain closures:
775775
new ProcessPodcast,
776776
new OptimizePodcast,
777777
function () {
778-
Podcast::update(...);
778+
Podcast::update(/* ... */);
779779
},
780780
])->dispatch();
781781

@@ -835,7 +835,7 @@ By pushing jobs to different queues, you may "categorize" your queued jobs and e
835835
*/
836836
public function store(Request $request)
837837
{
838-
$podcast = Podcast::create(...);
838+
$podcast = Podcast::create(/* ... */);
839839

840840
// Create podcast...
841841

@@ -894,7 +894,7 @@ If your application interacts with multiple queue connections, you may specify w
894894
*/
895895
public function store(Request $request)
896896
{
897-
$podcast = Podcast::create(...);
897+
$podcast = Podcast::create(/* ... */);
898898

899899
// Create podcast...
900900

upgrade.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ The [HTTP client](/docs/{{version}}/http-client) now has a default timeout of 30
449449

450450
If you wish to specify a longer timeout for a given request, you may do so using the `timeout` method:
451451

452-
$response = Http::timeout(120)->get(...);
452+
$response = Http::timeout(120)->get(/* ... */);
453453

454454
#### HTTP Fake & Middleware
455455

0 commit comments

Comments
 (0)