Skip to content

Commit 311a32d

Browse files
committed
Better docblocks
1 parent 2b576d0 commit 311a32d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/Auth/AclTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ protected function _isAuthorizedByPrefix($prefix, array $prefixMap, array $userR
290290
*
291291
* @param array<string> $prefixes
292292
*
293-
* @return array
293+
* @return array<string, mixed>
294294
*/
295295
protected function _normalizePrefixes(array $prefixes) {
296296
$normalized = [];
@@ -410,7 +410,7 @@ protected function _parseFiles($paths, $file) {
410410
* Deconstructs an ACL INI section key into a named array with ACL parts.
411411
*
412412
* @param string $key INI section key as found in acl.ini
413-
* @return array Array with named keys for controller, plugin and prefix
413+
* @return array<string, mixed> Array with named keys for controller, plugin and prefix
414414
*/
415415
protected function _deconstructIniKey($key) {
416416
return Utility::deconstructIniKey($key);

src/Auth/AuthUserTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public function hasRoles($expectedRoles, $oneRoleIsEnough = true, $providedRoles
171171

172172
/**
173173
* @param \ArrayAccess|array $identity
174-
* @return array
174+
* @return array<string, mixed>
175175
*/
176176
protected function _toArray(ArrayAccess|array $identity): array {
177177
if (is_array($identity)) {

src/Utility/Cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ protected static function assertValidCacheSetup(array $config): void {
109109
}
110110

111111
/**
112-
* @return array
112+
* @return array<string, mixed>
113113
*/
114114
protected static function prepareConfig(): array {
115115
$defaultConfig = static::$_defaultConfig;

src/Utility/Utility.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ class Utility {
1111
* Deconstructs an authentication ini section key into a named array with authentication parts.
1212
*
1313
* @param string $key INI section key as found in authentication.ini
14-
* @return array Array with named keys for controller, plugin and prefix
14+
* @return array<string, mixed> Array with named keys for controller, plugin and prefix
1515
*/
1616
public static function deconstructIniKey($key) {
1717
$res = [
1818
'plugin' => null,
1919
'prefix' => null,
2020
];
2121

22-
if (strpos($key, '.') !== false) {
22+
if (str_contains($key, '.')) {
2323
[$res['plugin'], $key] = explode('.', $key);
2424
}
2525
$lastSlashPos = strrpos($key, '/');

0 commit comments

Comments
 (0)