Skip to content

Commit 388029c

Browse files
authored
Merge pull request #7657 from kenjis/fix-doc-comments
docs: fix doc comments
2 parents 6e8c0d7 + eb22231 commit 388029c

14 files changed

+28
-28
lines changed

system/CLI/CLI.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ public static function wait(int $seconds, bool $countdown = false)
520520
/**
521521
* if operating system === windows
522522
*
523-
* @deprecated v4.3 Use `is_windows()` instead
523+
* @deprecated 4.3.0 Use `is_windows()` instead
524524
*/
525525
public static function isWindows(): bool
526526
{

system/Database/OCI8/Connection.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class Connection extends BaseConnection
9898
public $lastInsertedTableName;
9999

100100
/**
101-
* confirm DNS format.
101+
* confirm DSN format.
102102
*/
103103
private function isValidDSN(): bool
104104
{

system/Filters/FilterInterface.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ interface FilterInterface
3131
*
3232
* @param array|null $arguments
3333
*
34-
* @return mixed
34+
* @return RequestInterface|ResponseInterface|string|void
3535
*/
3636
public function before(RequestInterface $request, $arguments = null);
3737

@@ -43,7 +43,7 @@ public function before(RequestInterface $request, $arguments = null);
4343
*
4444
* @param array|null $arguments
4545
*
46-
* @return mixed
46+
* @return ResponseInterface|void
4747
*/
4848
public function after(RequestInterface $request, ResponseInterface $response, $arguments = null);
4949
}

system/HTTP/CLIRequest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public function isCLI(): bool
221221
*
222222
* @param array|string|null $index Index for item to fetch from $_GET.
223223
* @param int|null $filter A filter name to apply.
224-
* @param mixed|null $flags
224+
* @param array|int|null $flags
225225
*
226226
* @return array|null
227227
*/
@@ -235,7 +235,7 @@ public function getGet($index = null, $filter = null, $flags = null)
235235
*
236236
* @param array|string|null $index Index for item to fetch from $_POST.
237237
* @param int|null $filter A filter name to apply
238-
* @param mixed $flags
238+
* @param array|int|null $flags
239239
*
240240
* @return array|null
241241
*/
@@ -249,7 +249,7 @@ public function getPost($index = null, $filter = null, $flags = null)
249249
*
250250
* @param array|string|null $index Index for item to fetch from $_POST or $_GET
251251
* @param int|null $filter A filter name to apply
252-
* @param mixed $flags
252+
* @param array|int|null $flags
253253
*
254254
* @return array|null
255255
*/
@@ -263,7 +263,7 @@ public function getPostGet($index = null, $filter = null, $flags = null)
263263
*
264264
* @param array|string|null $index Index for item to be fetched from $_GET or $_POST
265265
* @param int|null $filter A filter name to apply
266-
* @param mixed $flags
266+
* @param array|int|null $flags
267267
*
268268
* @return array|null
269269
*/

system/HTTP/CURLRequest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ public function setForm(array $params, bool $multipart = false)
263263
/**
264264
* Set JSON data to be sent.
265265
*
266-
* @param mixed $data
266+
* @param array|bool|float|int|object|string|null $data
267267
*
268268
* @return $this
269269
*/

system/HTTP/Files/FileCollection.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ protected function populateFiles()
159159
* Given a file array, will create UploadedFile instances. Will
160160
* loop over an array and create objects for each.
161161
*
162-
* @return array|UploadedFile
162+
* @return UploadedFile|UploadedFile[]
163163
*/
164164
protected function createFileObject(array $array)
165165
{
@@ -240,7 +240,7 @@ protected function fixFilesArray(array $data): array
240240
* @param array $index The index sequence we are navigating down
241241
* @param array $value The portion of the array to process
242242
*
243-
* @return mixed
243+
* @return UploadedFile|null
244244
*/
245245
protected function getValueDotNotationSyntax(array $index, array $value)
246246
{

system/HTTP/MessageInterface.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function getProtocolVersion(): string;
3030
/**
3131
* Sets the body of the current message.
3232
*
33-
* @param mixed $data
33+
* @param string $data
3434
*
3535
* @return $this
3636
*/
@@ -48,7 +48,7 @@ public function getBody();
4848
/**
4949
* Appends data to the body of the current message.
5050
*
51-
* @param mixed $data
51+
* @param string $data
5252
*
5353
* @return $this
5454
*/

system/HTTP/MessageTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function setBody($data): self
5959
/**
6060
* Appends data to the body of the current message.
6161
*
62-
* @param mixed $data
62+
* @param string $data
6363
*
6464
* @return $this
6565
*/

system/HTTP/ResponseTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public function getXML()
307307
* @param array|object|string $body
308308
* @param string $format Valid: json, xml
309309
*
310-
* @return mixed
310+
* @return false|string
311311
*
312312
* @throws InvalidArgumentException If the body property is not string or array.
313313
*/

system/HTTP/URI.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ public function getSegment(int $number, string $default = ''): string
557557
* Set the value of a specific segment of the URI path.
558558
* Allows to set only existing segments or add new one.
559559
*
560-
* @param mixed $value (string or int)
560+
* @param int|string $value (string or int)
561561
*
562562
* @return $this
563563
*/
@@ -844,7 +844,7 @@ public function setQueryArray(array $query)
844844
/**
845845
* Adds a single new element to the query vars.
846846
*
847-
* @param mixed $value
847+
* @param int|string $value
848848
*
849849
* @return $this
850850
*/

system/HTTP/UserAgent.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class UserAgent
9191
/**
9292
* HTTP Referer
9393
*
94-
* @var mixed
94+
* @var bool|string|null
9595
*/
9696
protected $referrer;
9797

system/Model.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ private function checkBuilderMethod(string $name): void
866866
*
867867
* @codeCoverageIgnore
868868
*
869-
* @deprecated since 4.1
869+
* @deprecated 4.1.0
870870
*/
871871
public static function classToArray($data, $primaryKey = null, string $dateFormat = 'datetime', bool $onlyChanged = true): array
872872
{

system/Router/RouteCollection.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ public function setAutoRoute(bool $value): RouteCollectionInterface
409409
*
410410
* This setting is passed to the Router class and handled there.
411411
*
412-
* @param callable|null $callable
412+
* @param callable|string|null $callable
413413
*/
414414
public function set404Override($callable = null): RouteCollectionInterface
415415
{

system/Validation/Validation.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -462,14 +462,14 @@ public function withRequest(RequestInterface $request): ValidationInterface
462462
}
463463

464464
/**
465-
* Sets an individual rule and custom error messages for a single field.
465+
* Sets (or adds) an individual rule and custom error messages for a single
466+
* field.
466467
*
467468
* The custom error message should be just the messages that apply to
468469
* this field, like so:
469-
*
470470
* [
471-
* 'rule' => 'message',
472-
* 'rule' => 'message',
471+
* 'rule1' => 'message1',
472+
* 'rule2' => 'message2',
473473
* ]
474474
*
475475
* @param array|string $rules
@@ -502,21 +502,21 @@ public function setRule(string $field, ?string $label, $rules, array $errors = [
502502

503503
/**
504504
* Stores the rules that should be used to validate the items.
505-
* Rules should be an array formatted like:
506505
*
506+
* Rules should be an array formatted like:
507507
* [
508508
* 'field' => 'rule1|rule2'
509509
* ]
510510
*
511511
* The $errors array should be formatted like:
512512
* [
513513
* 'field' => [
514-
* 'rule' => 'message',
515-
* 'rule' => 'message
514+
* 'rule1' => 'message1',
515+
* 'rule2' => 'message2',
516516
* ],
517517
* ]
518518
*
519-
* @param array $errors // An array of custom error messages
519+
* @param array $errors An array of custom error messages
520520
*/
521521
public function setRules(array $rules, array $errors = []): ValidationInterface
522522
{

0 commit comments

Comments
 (0)