Skip to content

Commit dc4de9c

Browse files
authored
Fix bugs, typos and loose comparisons (#19199)
* Fix bugs, typos and loose comparisons Bugs: - PluginConfig: sprintf format "%ss" -> "%s" (extra 's') - ExceptionTrap: loose comparison == -> === for object comparison - Route: loose comparison != -> !== for value comparison Typos: - Router: "reverser routing" -> "reverse routing" - Router/functions: "can be name any" -> "can be any" (4 occurrences) - ValidatorAwareTrait: "does not exists" -> "does not exist" - Validation: "and and arrays" -> "and arrays" (2 occurrences) - Message: "no should more" -> "should not exceed", "no must more" -> "must not exceed" - Mailer: "Render instance" -> "Renderer instance" - TransportRegistry: "cache engine" -> "transport" (3 occurrences) - I18n: "based of" -> "based on" (2 occurrences), "configure" -> "configured" - ErrorHandlerMiddleware: "contructor" -> "constructor" - Log: "Cake Logs's" -> "Cake Log's" - HelperRegistry: "Sets The IO" -> "Sets the IO" - FileConfigTrait: "with ../" -> "with .." (matches actual check) - Hash: "file in" -> "find in" - CookieCryptTrait: "keep keys are" -> "keep keys in" * Fix Cache documentation errors - Cache.php: Remove non-existent XcacheEngine, fix "MemcacheEngine" -> "MemcachedEngine" - MemcachedEngine.php: Fix "MemcacheEngine" -> "MemcachedEngine" - ApcuEngine.php: Fix "APC" -> "APCu" * Fix inconsistent @return docblocks - ArrayLog/ConsoleLog: Remove contradictory "success of write" from @return void - ArrayEngine/ApcuEngine: Fix redundant "True Returns true" -> "True on success" * Update test to match corrected error message * Revert Route.php loose comparison change (intentional for type coercion)
1 parent 591587e commit dc4de9c

4 files changed

Lines changed: 6 additions & 7 deletions

File tree

Cache.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,9 @@
5656
* - `FileEngine` - Uses simple files to store content. Poor performance, but good for
5757
* storing large objects, or things that are not IO sensitive. Well suited to development
5858
* as it is an easy cache to inspect and manually flush.
59-
* - `MemcacheEngine` - Uses the PECL::Memcache extension and Memcached for storage.
60-
* Fast reads/writes, and benefits from memcache being distributed.
59+
* - `MemcachedEngine` - Uses the PECL::Memcached extension and Memcached for storage.
60+
* Fast reads/writes, and benefits from memcached being distributed.
6161
* - `RedisEngine` - Uses redis and php-redis extension to store cache data.
62-
* - `XcacheEngine` - Uses the Xcache extension, an alternative to APCu.
6362
*
6463
* See Cache engine documentation for expected configuration keys.
6564
*

Engine/ApcuEngine.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ public function delete(string $key): bool
192192
}
193193

194194
/**
195-
* Delete all keys from the cache. This will clear every cache config using APC.
195+
* Delete all keys from the cache. This will clear every cache config using APCu.
196196
*
197-
* @return bool True Returns true.
197+
* @return bool True on success.
198198
* @link https://secure.php.net/manual/en/function.apcu-cache-info.php
199199
* @link https://secure.php.net/manual/en/function.apcu-delete.php
200200
*/

Engine/ArrayEngine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public function delete(string $key): bool
196196
/**
197197
* Delete all keys from the cache.
198198
*
199-
* @return bool True Returns true.
199+
* @return bool True on success.
200200
*/
201201
public function clear(): bool
202202
{

Engine/MemcachedEngine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class MemcachedEngine extends CacheEngine
7272
* - `serialize` The serializer engine used to serialize data. Available engines are 'php',
7373
* 'igbinary' and 'json'. Besides 'php', the memcached extension must be compiled with the
7474
* appropriate serializer support.
75-
* - `servers` String or array of memcached servers. If an array MemcacheEngine will use
75+
* - `servers` String or array of memcached servers. If an array MemcachedEngine will use
7676
* them as a pool.
7777
* - `options` - Additional options for the memcached client. Should be an array of option => value.
7878
* Use the \Memcached::OPT_* constants as keys.

0 commit comments

Comments
 (0)