Skip to content

Commit

Permalink
Merge pull request #7844 from cakephp/4.next-ellipsis-copy-pasta
Browse files Browse the repository at this point in the history
[4.next] Comment out ellipsis for better copy-paste-ability
  • Loading branch information
markstory committed May 6, 2024
2 parents a80c031 + 2827cbf commit bab7d24
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion en/contributing/cakephp-coding-conventions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ Try to avoid unnecessary nesting by bailing early::
{
...
if (!$success) {
throw new RuntimeException(...);
throw new RuntimeException(/* ... */);
}

...
Expand Down
16 changes: 8 additions & 8 deletions en/core-libraries/httpclient.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ Doing POST and PUT requests is equally simple::
]);

// Other methods as well.
$http->delete(...);
$http->head(...);
$http->patch(...);
$http->delete(/* ... */);
$http->head(/* ... */);
$http->patch(/* ... */);

If you have created a PSR-7 request object you can send it using
``sendRequest()``::
Expand Down Expand Up @@ -508,11 +508,11 @@ is making::

There are methods to mock the most commonly used HTTP methods::

$this->mockClientGet(...);
$this->mockClientPatch(...);
$this->mockClientPost(...);
$this->mockClientPut(...);
$this->mockClientDelete(...);
$this->mockClientGet(/* ... */);
$this->mockClientPatch(/* ... */);
$this->mockClientPost(/* ... */);
$this->mockClientPut(/* ... */);
$this->mockClientDelete(/* ... */);

.. php:method:: newClientResponse(int $code = 200, array $headers = [], string $body = '')
Expand Down
2 changes: 1 addition & 1 deletion en/orm/query-builder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ complex expressions::
To build complex order clauses, use a Closure to build order expressions::

$query->orderAsc(function (QueryExpression $exp, Query $query) {
return $exp->addCase(...);
return $exp->addCase(/* ... */);
});


Expand Down
2 changes: 1 addition & 1 deletion en/orm/retrieving-data-and-resultsets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ Use the ``queryBuilder`` option to customize the query when using an array::
'Authors' => [
'foreignKey' => false,
'queryBuilder' => function (Query $q) {
return $q->where(...); // Full conditions for filtering
return $q->where(/* ... */); // Full conditions for filtering
}
]
]);
Expand Down
2 changes: 1 addition & 1 deletion en/orm/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ those rules into re-usable classes::
// Add the custom rule
use App\Model\Rule\CustomRule;

$rules->add(new CustomRule(...), 'ruleName');
$rules->add(new CustomRule(/* ... */), 'ruleName');

By creating custom rule classes you can keep your code DRY and test your domain
rules in isolation.
Expand Down
16 changes: 8 additions & 8 deletions fr/core-libraries/httpclient.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ Faire des requêtes POST et PUT est tout aussi simple::
]);

// Autres méthodes.
$http->delete(...);
$http->head(...);
$http->patch(...);
$http->delete(/* ... */);
$http->head(/* ... */);
$http->patch(/* ... */);

Si vous avez créé un objet de requêtes PSR-7, vous pouvez l'envoyer avec
``sendRequest()``::
Expand Down Expand Up @@ -521,11 +521,11 @@ requêtes faites par votre application::

Il existe des méthodes pour mocker les méthodes HTTP les plus courantes::

$this->mockClientGet(...);
$this->mockClientPatch(...);
$this->mockClientPost(...);
$this->mockClientPut(...);
$this->mockClientDelete(...);
$this->mockClientGet(/* ... */);
$this->mockClientPatch(/* ... */);
$this->mockClientPost(/* ... */);
$this->mockClientPut(/* ... */);
$this->mockClientDelete(/* ... */);

.. php:method:: newClientResponse(int $code = 200, array $headers = [], string $body = '')
Expand Down
2 changes: 1 addition & 1 deletion fr/orm/query-builder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ des expressions complexes::
Pour construire des clauses de tri complexes, utilisez une Closure::

$query->orderAsc(function (QueryExpression $exp, Query $query) {
return $exp->addCase(...);
return $exp->addCase(/* ... */);
});

Limiter les Résultats
Expand Down
2 changes: 1 addition & 1 deletion fr/orm/retrieving-data-and-resultsets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ passez un tableau::
'Authors' => [
'foreignKey' => false,
'queryBuilder' => function (Query $q) {
return $q->where(...); // Conditions complètes pour le filtrage
return $q->where(/* ... */); // Conditions complètes pour le filtrage
}
]
]);
Expand Down
2 changes: 1 addition & 1 deletion fr/orm/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ utile de packager ces règles dans des classes réutilisables::
// Ajouter la règle personnalisée
use App\Model\Rule\CustomRule;

$rules->add(new CustomRule(...), 'ruleName');
$rules->add(new CustomRule(/* ... */), 'ruleName');

En ajoutant des classes de règles personnalisées, vous pouvez garder votre code
DRY et tester vos règles de domaine isolément.
Expand Down
2 changes: 1 addition & 1 deletion ja/contributing/cakephp-coding-conventions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ false を、関数呼び出しが成功したかどうかを判定できるよ
{
...
if (!$success) {
throw new RuntimeException(...);
throw new RuntimeException(/* ... */);
}

...
Expand Down
16 changes: 8 additions & 8 deletions ja/core-libraries/httpclient.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ POST や PUT のリクエストを実行することは、同様に簡単です
]);

// 他のメソッドも同様に、
$http->delete(...);
$http->head(...);
$http->patch(...);
$http->delete(/* ... */);
$http->head(/* ... */);
$http->patch(/* ... */);

If you have created a PSR-7 request object you can send it using
``sendRequest()``::
Expand Down Expand Up @@ -515,11 +515,11 @@ is making::

There are methods to mock the most commonly used HTTP methods::

$this->mockClientGet(...);
$this->mockClientPatch(...);
$this->mockClientPost(...);
$this->mockClientPut(...);
$this->mockClientDelete(...);
$this->mockClientGet(/* ... */);
$this->mockClientPatch(/* ... */);
$this->mockClientPost(/* ... */);
$this->mockClientPut(/* ... */);
$this->mockClientDelete(/* ... */);

.. php:method:: newClientResponse(int $code = 200, array $headers = [], string $body = '')
Expand Down
2 changes: 1 addition & 1 deletion ja/orm/retrieving-data-and-resultsets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ contain に条件を渡す
'Authors' => [
'foreignKey' => false,
'queryBuilder' => function (Query $q) {
return $q->where(...); // フィルターのための完全な条件
return $q->where(/* ... */); // フィルターのための完全な条件
}
]
]);
Expand Down
4 changes: 2 additions & 2 deletions ja/orm/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ CakePHP は、エンティティーが保存される前に適用される「ル
// カスタムルールの追加
use App\Model\Rule\CustomRule;

$rules->add(new CustomRule(...), 'ruleName');
$rules->add(new CustomRule(/* ... */), 'ruleName');

カスタムルールクラスを作ることでコードを *重複がない状態*
(訳注:DRY = Don't Repeat Yourself の訳)
Expand Down Expand Up @@ -612,7 +612,7 @@ CakePHP の ORM は検証に二層のアプローチを使う点がユニーク

public function validationCustomName($validator)
{
$validator->add(...);
$validator->add(/* ... */);
return $validator;
}

Expand Down
6 changes: 3 additions & 3 deletions pt/core-libraries/httpclient.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ Fazer solicitações POST e PUT é igualmente simples::
]);

// Outros métodos também.
$http->delete(...);
$http->head(...);
$http->patch(...);
$http->delete(/* ... */);
$http->head(/* ... */);
$http->patch(/* ... */);

Se você criou um objeto de solicitação PSR-7, pode enviá-lo usando
``sendRequest()``::
Expand Down
2 changes: 1 addition & 1 deletion pt/orm/query-builder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ criam novos objetos de expressão que mudam **como** as condições são combina
segundo tipo de métodos são **condições**. As condições são adicionadas a uma expressão
em que são alinhadas com o combinador atual.

Por exemplo, chamar ``$exp->and_(...)`` criará um novo objeto ``Expression`` que
Por exemplo, chamar ``$exp->and_(/* ... */)`` criará um novo objeto ``Expression`` que
combina todas as condições que ele contém com ``AND``. Enquanto ``$exp->or_()`` criará
um novo objeto ``Expression`` que combina todas as condições adicionadas a ele
com ``OR``. Um exemplo de adição de condições com um objeto ``Expression`` seria::
Expand Down
2 changes: 1 addition & 1 deletion pt/orm/retrieving-data-and-resultsets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ case you should use an array passing ``foreignKey`` and ``queryBuilder``::
'Authors' => [
'foreignKey' => false,
'queryBuilder' => function ($q) {
return $q->where(...); // Full conditions for filtering
return $q->where(/* ... */); // Full conditions for filtering
}
]
]);
Expand Down

0 comments on commit bab7d24

Please sign in to comment.