Skip to content

Commit cc5617d

Browse files
authored
Fix grammar, trailing whitespace, and add commas after 'By default'. (#8210)
Add missing comma after introductory 'By default' phrase across 60 instances in 35 files. Fix miscellaneous grammar issues and trailing whitespace in several docs files.
1 parent 4456d13 commit cc5617d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+102
-102
lines changed

docs/en/appendices/5-0-migration-guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ changes made:
2727

2828
- The `SECOND`, `MINUTE`, `HOUR`, `DAY`, `WEEK`, `MONTH`, `YEAR` constants were removed.
2929

30-
- Use of `#[\AllowDynamicProperties]` removed everywhere. It was used for the following classes:
30+
- Use of `#[\AllowDynamicProperties]` removed everywhere. It was used for the following classes:
3131
- `Command/Command`
3232
- `Console/Shell`
3333
- `Controller/Component`
@@ -37,7 +37,7 @@ changes made:
3737
- `View/Helper`
3838
- `View/View`
3939

40-
- The supported database engine versions were updated:
40+
- The supported database engine versions were updated:
4141
- MySQL (5.7 or higher)
4242
- MariaDB (10.1 or higher)
4343
- PostgreSQL (9.6 or higher)
@@ -114,7 +114,7 @@ changes made:
114114

115115
- The `DateTimeType` and `DateType` now always return immutable objects.
116116
Additionally the interface for `Date` objects reflects the `ChronosDate`
117-
interface which lacks all of the time related methods that were present in
117+
interface which lacks all the time related methods that were present in
118118
CakePHP 4.x.
119119
- `DateType::setLocaleFormat()` no longer accepts an array.
120120
- `Query` now accepts only `\Closure` parameters instead of `callable`. Callables can be converted

docs/en/console-commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ unambiguously reference a command.
4848

4949
## Console Applications
5050

51-
By default CakePHP will automatically discover all the commands in your
51+
By default, CakePHP will automatically discover all the commands in your
5252
application and its plugins. You may want to reduce the number of exposed
5353
commands, when building standalone console applications. You can use your
5454
`Application`'s `console()` hook to limit which commands are exposed and

docs/en/console-commands/commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ cake user [-h] [-q] [-v]
295295

296296
## Grouping Commands
297297

298-
By default in the help output CakePHP will group commands into core, app, and
298+
By default, in the help output CakePHP will group commands into core, app, and
299299
plugin groups. You can customize the grouping of commands by implementing
300300
`getGroup()`:
301301

docs/en/console-commands/input-output.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,6 @@ no styling is done at all. There are three modes you can use.
407407
This is a good mode to use if you are outputting XML or, want to debug why
408408
your styling isn't working.
409409

410-
By default on \*nix systems ConsoleOutput objects default to color output.
410+
By default, on \*nix systems ConsoleOutput objects default to color output.
411411
On Windows systems, plain output is the default unless the `ANSICON`
412412
environment variable is present.

docs/en/controllers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ When a request is made to a CakePHP application, CakePHP's
7979
`Cake\Routing\Router` and `Cake\Routing\Dispatcher`
8080
classes use [Routes Configuration](development/routing#routes-configuration) to find and create the correct
8181
controller instance. The request data is encapsulated in a request object.
82-
CakePHP puts all of the important request information into the `$this->request`
82+
CakePHP puts all the important request information into the `$this->request`
8383
property. See the section on [Cake Request](controllers/request-response#cake-request) for more information on the
8484
CakePHP request object.
8585

@@ -580,7 +580,7 @@ logic around the request life-cycle:
580580

581581
### Controller Callback Methods
582582

583-
By default the following callback methods are connected to related events if the
583+
By default, the following callback methods are connected to related events if the
584584
methods are implemented by your controllers
585585

586586
#### beforeFilter()

docs/en/controllers/components/form-protection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ in your `initialize()` method.
2525
2626
## Form tampering prevention
2727

28-
By default the `FormProtectionComponent` prevents users from tampering with
28+
By default, the `FormProtectionComponent` prevents users from tampering with
2929
forms in specific ways. It will prevent the following things:
3030

3131
- Form's action (URL) cannot be modified.

docs/en/controllers/pagination.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ This object contains the paginated records and the paging params.
123123

124124
## Simple Pagination
125125

126-
By default `Controller::paginate()` uses the `Cake\Datasource\Paging\NumericPaginator`
126+
By default, `Controller::paginate()` uses the `Cake\Datasource\Paging\NumericPaginator`
127127
class which does a `COUNT()` query to calculate the size of the result set so
128128
that page number links can be rendered. On very large datasets this count query
129129
can be very expensive. In situations where you only want to show 'Next' and 'Previous'
@@ -217,7 +217,7 @@ $unpublishedArticles = $this->paginate(
217217

218218
## Control which Fields Used for Ordering
219219

220-
By default sorting can be done on any non-virtual column a table has. This is
220+
By default, sorting can be done on any non-virtual column a table has. This is
221221
sometimes undesirable as it allows users to sort on un-indexed columns that can
222222
be expensive to order by. You can set the allowed list of fields that can be sorted
223223
using the `sortableFields` option. This option is required when you want to
@@ -347,7 +347,7 @@ protected array $paginate = [
347347
The number of results that are fetched per page is exposed to the user as the
348348
`limit` parameter. It is generally undesirable to allow users to fetch all
349349
rows in a paginated set. The `maxLimit` option asserts that no one can set
350-
this limit too high from the outside. By default CakePHP limits the maximum
350+
this limit too high from the outside. By default, CakePHP limits the maximum
351351
number of rows that can be fetched to 100. If this default is not appropriate
352352
for your application, you can adjust it as part of the pagination options, for
353353
example reducing it to `10`:

docs/en/controllers/request-response.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ responses from your controllers.
1414
`ServerRequest` is the default request object used in CakePHP. It centralizes a
1515
number of features for interrogating and interacting with request data.
1616
On each request one Request is created and then passed by reference to the
17-
various layers of an application that use request data. By default the request
17+
various layers of an application that use request data. By default, the request
1818
is assigned to `$this->request`, and is available in Controllers, Cells, Views
1919
and Helpers. You can also access it in Components using the controller
2020
reference.
@@ -182,7 +182,7 @@ be accessed like this:
182182
$attachment = $this->request->getData('attachment');
183183
```
184184

185-
By default file uploads are represented in the request data as objects that implement
185+
By default, file uploads are represented in the request data as objects that implement
186186
[\Psr\Http\Message\UploadedFileInterface](https://www.php-fig.org/psr/psr-7/#16-uploaded-files). In the current
187187
implementation, the `$attachment` variable in the above example would by default hold an instance of
188188
`\Laminas\Diactoros\UploadedFile`.
@@ -814,7 +814,7 @@ public function sendIcs()
814814
`method` Cake\\Http\\Response::**withHeader**(string $header, string $value): static
815815

816816
Setting headers is done with the `Cake\Http\Response::withHeader()`
817-
method. Like all of the PSR-7 interface methods, this method returns a *new*
817+
method. Like all the PSR-7 interface methods, this method returns a *new*
818818
instance with the new header:
819819

820820
``` php

docs/en/core-libraries/email.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ In your email templates you can use these with:
215215
```
216216

217217
You can use helpers in emails as well, much like you can in normal template files.
218-
By default only the `HtmlHelper` is loaded. You can load additional
218+
By default, only the `HtmlHelper` is loaded. You can load additional
219219
helpers using the `ViewBuilder::addHelpers()` method:
220220

221221
``` php
@@ -364,7 +364,7 @@ class UserMailer extends Mailer
364364
->setTo($user->email)
365365
->setSubject(sprintf('Welcome %s', $user->name))
366366
->viewBuilder()
367-
->setTemplate('welcome_mail'); // By default template with same name as method name is used.
367+
->setTemplate('welcome_mail'); // By default, template with same name as method name is used.
368368
}
369369

370370
public function resetPassword($user)

docs/en/core-libraries/global-constants-and-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ways to point to certain files or directories in your CakePHP application.
1414

1515
Here are CakePHP's globally available functions. Most of them are just
1616
convenience wrappers for other CakePHP functionality, such as debugging and
17-
translating content. By default only namespaced functions are autoloaded,
17+
translating content. By default, only namespaced functions are autoloaded,
1818
however you can optionally load global aliases by adding:
1919

2020
``` php

0 commit comments

Comments
 (0)