Skip to content

Commit 95c783c

Browse files
committed
Fix method signature parameter names to match source code
- Log methods: $scope → $context (write, emergency, alert, critical, error, warning, notice, info, debug) - Security::hash(): $type → $algorithm - Configure methods: $key → $var/$config (write, read, readOrFail, check, delete, consume, consumeOrFail) - Hash::check(): remove incorrect = null default from required $path parameter - Hash::filter(): change callback default from ['Hash', 'filter'] to null
1 parent b68bf85 commit 95c783c

4 files changed

Lines changed: 20 additions & 20 deletions

File tree

docs/en/core-libraries/hash.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ $result = Hash::contains($b, $a);
406406

407407
### Hash::check()
408408

409-
`static` Cake\\Utility\\Hash::**check**(array $data, string $path = null): bool
409+
`static` Cake\\Utility\\Hash::**check**(array $data, string $path): bool
410410

411411
Checks if a particular path is set in an array:
412412

@@ -446,7 +446,7 @@ $result = Hash::check($set, 'My Index 1.First.Seconds.Third.Fourth');
446446

447447
### Hash::filter()
448448

449-
`static` Cake\\Utility\\Hash::**filter**(array $data, $callback = ['Hash', 'filter']): array
449+
`static` Cake\\Utility\\Hash::**filter**(array $data, $callback = null): array
450450

451451
Filters empty elements out of array, excluding '0'. You can also supply a
452452
custom `$callback` to filter the array elements. The callback should

docs/en/core-libraries/logging.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -482,12 +482,12 @@ messages.
482482

483483
### Log::write()
484484

485-
`static` Cake\\Log\\Log::**write**($level, $message, $scope = []): bool
485+
`static` Cake\\Log\\Log::**write**($level, $message, $context = []): bool
486486

487487
Write a message into all the configured loggers.
488488
`$level` indicates the level of log message being created.
489489
`$message` is the message of the log entry being written to.
490-
`$scope` is the scope(s) a log message is being created in.
490+
`$context` is the scope(s) a log message is being created in.
491491

492492
### Log::levels()
493493

@@ -503,35 +503,35 @@ appropriate log level.
503503

504504
#### Log::emergency()
505505

506-
`static` Cake\\Log\\Log::**emergency**($message, $scope = []): bool
506+
`static` Cake\\Log\\Log::**emergency**($message, $context = []): bool
507507

508508
#### Log::alert()
509509

510-
`static` Cake\\Log\\Log::**alert**($message, $scope = []): bool
510+
`static` Cake\\Log\\Log::**alert**($message, $context = []): bool
511511

512512
#### Log::critical()
513513

514-
`static` Cake\\Log\\Log::**critical**($message, $scope = []): bool
514+
`static` Cake\\Log\\Log::**critical**($message, $context = []): bool
515515

516516
#### Log::error()
517517

518-
`static` Cake\\Log\\Log::**error**($message, $scope = []): bool
518+
`static` Cake\\Log\\Log::**error**($message, $context = []): bool
519519

520520
#### Log::warning()
521521

522-
`static` Cake\\Log\\Log::**warning**($message, $scope = []): bool
522+
`static` Cake\\Log\\Log::**warning**($message, $context = []): bool
523523

524524
#### Log::notice()
525525

526-
`static` Cake\\Log\\Log::**notice**($message, $scope = []): bool
526+
`static` Cake\\Log\\Log::**notice**($message, $context = []): bool
527527

528528
#### Log::info()
529529

530-
`static` Cake\\Log\\Log::**info**($message, $scope = []): bool
530+
`static` Cake\\Log\\Log::**info**($message, $context = []): bool
531531

532532
#### Log::debug()
533533

534-
`static` Cake\\Log\\Log::**debug**($message, $scope = []): bool
534+
`static` Cake\\Log\\Log::**debug**($message, $context = []): bool
535535

536536
## Logging Trait
537537

docs/en/core-libraries/security.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ If the value cannot be decrypted due to changes in the key or HMAC salt
5757

5858
### Security::hash()
5959

60-
`static` Cake\\Utility\\Security::**hash**( $string, $type = NULL, $salt = false ): string
60+
`static` Cake\\Utility\\Security::**hash**($string, $algorithm = null, $salt = false): string
6161

6262
Create a hash from string using given method. Fallback on next
6363
available method. If `$salt` is set to `true`, the application's salt

docs/en/development/configuration.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ won't end up breaking the MVC structure CakePHP provides.
319319

320320
### Writing Configuration data
321321

322-
`static` Cake\\Core\\Configure::**write**($key, $value): void
322+
`static` Cake\\Core\\Configure::**write**($config, $value = null): void
323323

324324
Use `write()` to store data in the application's configuration:
325325

@@ -350,7 +350,7 @@ production modes on the fly.
350350
351351
### Reading Configuration Data
352352

353-
`static` Cake\\Core\\Configure::**read**($key = null, $default = null): mixed
353+
`static` Cake\\Core\\Configure::**read**($var = null, $default = null): mixed
354354

355355
Used to read configuration data from the application. If a key is supplied, the
356356
data is returned. Using our examples from write() above, we can read that data
@@ -373,7 +373,7 @@ Configure::read('Company.nope', 'fallback');
373373

374374
If `$key` is left null, all values in Configure will be returned.
375375

376-
`static` Cake\\Core\\Configure::**readOrFail**($key): mixed
376+
`static` Cake\\Core\\Configure::**readOrFail**($var): mixed
377377

378378
Reads configuration data just like `Cake\Core\Configure::read()`
379379
but expects to find a key/value pair. In case the requested pair does not
@@ -391,7 +391,7 @@ Configure::readOrFail('Company');
391391

392392
### Checking to see if Configuration Data is Defined
393393

394-
`static` Cake\\Core\\Configure::**check**($key): bool
394+
`static` Cake\\Core\\Configure::**check**($var): bool
395395

396396
Used to check if a key/path exists and has non-null value:
397397

@@ -401,7 +401,7 @@ $exists = Configure::check('Company.name');
401401

402402
### Deleting Configuration Data
403403

404-
`static` Cake\\Core\\Configure::**delete**($key): void
404+
`static` Cake\\Core\\Configure::**delete**($var): void
405405

406406
Used to delete information from the application's configuration:
407407

@@ -411,12 +411,12 @@ Configure::delete('Company.name');
411411

412412
### Reading & Deleting Configuration Data
413413

414-
`static` Cake\\Core\\Configure::**consume**($key): mixed
414+
`static` Cake\\Core\\Configure::**consume**($var): mixed
415415

416416
Read and delete a key from Configure. This is useful when you want to
417417
combine reading and deleting values in a single operation.
418418

419-
`static` Cake\\Core\\Configure::**consumeOrFail**($key): mixed
419+
`static` Cake\\Core\\Configure::**consumeOrFail**($var): mixed
420420

421421
Consumes configuration data just like `Cake\Core\Configure::consume()`
422422
but expects to find a key/value pair. In case the requested pair does not

0 commit comments

Comments
 (0)