Skip to content

Commit 3c0bfd3

Browse files
Fix hyphenation of closure-based for grammatical correctness and consistency (#10406)
1 parent 60ecc14 commit 3c0bfd3

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

‎artisan.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ $this->fail('Something went wrong.');
184184
<a name="closure-commands"></a>
185185
### Closure Commands
186186

187-
Closure based commands provide an alternative to defining console commands as classes. In the same way that route closures are an alternative to controllers, think of command closures as an alternative to command classes.
187+
Closure-based commands provide an alternative to defining console commands as classes. In the same way that route closures are an alternative to controllers, think of command closures as an alternative to command classes.
188188

189-
Even though the `routes/console.php` file does not define HTTP routes, it defines console based entry points (routes) into your application. Within this file, you may define all of your closure based console commands using the `Artisan::command` method. The `command` method accepts two arguments: the [command signature](#defining-input-expectations) and a closure which receives the command's arguments and options:
189+
Even though the `routes/console.php` file does not define HTTP routes, it defines console based entry points (routes) into your application. Within this file, you may define all of your closure-based console commands using the `Artisan::command` method. The `command` method accepts two arguments: the [command signature](#defining-input-expectations) and a closure which receives the command's arguments and options:
190190

191191
```php
192192
Artisan::command('mail:send {user}', function (string $user) {
@@ -213,7 +213,7 @@ Artisan::command('mail:send {user}', function (DripEmailer $drip, string $user)
213213
<a name="closure-command-descriptions"></a>
214214
#### Closure Command Descriptions
215215

216-
When defining a closure based command, you may use the `purpose` method to add a description to the command. This description will be displayed when you run the `php artisan list` or `php artisan help` commands:
216+
When defining a closure-based command, you may use the `purpose` method to add a description to the command. This description will be displayed when you run the `php artisan list` or `php artisan help` commands:
217217

218218
```php
219219
Artisan::command('mail:send {user}', function (string $user) {

‎eloquent-factories.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ $user = User::factory()
365365
->create();
366366
```
367367

368-
Of course, you may perform state manipulations on the related models. In addition, you may pass a closure based state transformation if your state change requires access to the parent model:
368+
Of course, you may perform state manipulations on the related models. In addition, you may pass a closure-based state transformation if your state change requires access to the parent model:
369369

370370
```php
371371
$user = User::factory()
@@ -400,7 +400,7 @@ $user = User::factory()
400400
->create();
401401
```
402402

403-
You may provide a closure based state transformation if your state change requires access to the parent model:
403+
You may provide a closure-based state transformation if your state change requires access to the parent model:
404404

405405
```php
406406
$user = User::factory()
@@ -483,7 +483,7 @@ $user = User::factory()
483483
->create();
484484
```
485485

486-
You may provide a closure based state transformation if your state change requires access to the related model:
486+
You may provide a closure-based state transformation if your state change requires access to the related model:
487487

488488
```php
489489
$user = User::factory()

‎events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public function boot(): void
160160
<a name="queuable-anonymous-event-listeners"></a>
161161
#### Queueable Anonymous Event Listeners
162162

163-
When registering closure based event listeners, you may wrap the listener closure within the `Illuminate\Events\queueable` function to instruct Laravel to execute the listener using the [queue](/docs/{{version}}/queues):
163+
When registering closure-based event listeners, you may wrap the listener closure within the `Illuminate\Events\queueable` function to instruct Laravel to execute the listener using the [queue](/docs/{{version}}/queues):
164164

165165
```php
166166
use App\Events\PodcastProcessed;

‎pennant.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ For convenience, if a feature definition only returns a lottery, you may omit th
112112
<a name="class-based-features"></a>
113113
### Class Based Features
114114

115-
Pennant also allows you to define class based features. Unlike closure based feature definitions, there is no need to register a class based feature in a service provider. To create a class based feature, you may invoke the `pennant:feature` Artisan command. By default the feature class will be placed in your application's `app/Features` directory:
115+
Pennant also allows you to define class based features. Unlike closure-based feature definitions, there is no need to register a class based feature in a service provider. To create a class based feature, you may invoke the `pennant:feature` Artisan command. By default the feature class will be placed in your application's `app/Features` directory:
116116

117117
```shell
118118
php artisan pennant:feature NewApi

‎structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The `routes` directory contains all of the route definitions for your applicatio
7272

7373
The `web.php` file contains routes that Laravel places in the `web` middleware group, which provides session state, CSRF protection, and cookie encryption. If your application does not offer a stateless, RESTful API then all your routes will most likely be defined in the `web.php` file.
7474

75-
The `console.php` file is where you may define all of your closure based console commands. Each closure is bound to a command instance allowing a simple approach to interacting with each command's IO methods. Even though this file does not define HTTP routes, it defines console based entry points (routes) into your application. You may also [schedule](/docs/{{version}}/scheduling) tasks in the `console.php` file.
75+
The `console.php` file is where you may define all of your closure-based console commands. Each closure is bound to a command instance allowing a simple approach to interacting with each command's IO methods. Even though this file does not define HTTP routes, it defines console based entry points (routes) into your application. You may also [schedule](/docs/{{version}}/scheduling) tasks in the `console.php` file.
7676

7777
Optionally, you may install additional route files for API routes (`api.php`) and broadcasting channels (`channels.php`), via the `install:api` and `install:broadcasting` Artisan commands.
7878

‎views.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class AppServiceProvider extends ServiceProvider
200200
// Using class based composers...
201201
Facades\View::composer('profile', ProfileComposer::class);
202202

203-
// Using closure based composers...
203+
// Using closure-based composers...
204204
Facades\View::composer('welcome', function (View $view) {
205205
// ...
206206
});

0 commit comments

Comments
 (0)