@@ -96,8 +96,8 @@ discard block |
||
| 96 | 96 | */ |
| 97 | 97 | public function createAssetJsViewFunction(AssetManager $assetManager): callable |
| 98 | 98 | { |
| 99 | - return function ($keys, $type = '') use ($assetManager) { |
|
| 100 | - $callback = function ($key) use ($assetManager, $type) { |
|
| 99 | + return function($keys, $type = '') use ($assetManager) { |
|
| 100 | + $callback = function($key) use ($assetManager, $type) { |
|
| 101 | 101 | $path = $assetManager->ensureJsWebPath($key); |
| 102 | 102 | if (empty($path)) { |
| 103 | 103 | return ''; |
@@ -121,8 +121,8 @@ discard block |
||
| 121 | 121 | */ |
| 122 | 122 | public function createAssetCssViewFunction(AssetManager $assetManager): callable |
| 123 | 123 | { |
| 124 | - return function ($keys) use ($assetManager) { |
|
| 125 | - $callback = function ($key) use ($assetManager) { |
|
| 124 | + return function($keys) use ($assetManager) { |
|
| 125 | + $callback = function($key) use ($assetManager) { |
|
| 126 | 126 | $path = $assetManager->ensureCssWebPath($key); |
| 127 | 127 | if (empty($path)) { |
| 128 | 128 | return ''; |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | */ |
| 143 | 143 | public function createAssetImgViewFunction(AssetManager $assetManager): callable |
| 144 | 144 | { |
| 145 | - return function ($key, $alt = '') use ($assetManager) { |
|
| 145 | + return function($key, $alt = '') use ($assetManager) { |
|
| 146 | 146 | $path = $assetManager->ensureImgWebPath($key); |
| 147 | 147 | if (empty($path)) { |
| 148 | 148 | return ''; |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | */ |
| 42 | 42 | public function createMetaViewFunction(): callable |
| 43 | 43 | { |
| 44 | - return function (string $name, ...$contents) { |
|
| 44 | + return function(string $name, ...$contents) { |
|
| 45 | 45 | $realContent = ''; |
| 46 | 46 | foreach ($contents as $content) { |
| 47 | 47 | if (empty($content)) { |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | public function createAuthorNameViewFunction(): callable |
| 62 | 62 | { |
| 63 | - return function (string $author) { |
|
| 63 | + return function(string $author) { |
|
| 64 | 64 | if (empty($author)) { |
| 65 | 65 | return ''; |
| 66 | 66 | } |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function createAuthorLinkViewFunction(): callable |
| 76 | 76 | { |
| 77 | - return function (string $authorLink) { |
|
| 77 | + return function(string $authorLink) { |
|
| 78 | 78 | if (empty($authorLink)) { |
| 79 | 79 | return ''; |
| 80 | 80 | } |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | */ |
| 81 | 81 | public function createCanViewViewFunction(string $username, Enforcer $enforcer): callable |
| 82 | 82 | { |
| 83 | - return function (string $key) use ($username, $enforcer) { |
|
| 83 | + return function(string $key) use ($username, $enforcer) { |
|
| 84 | 84 | return $enforcer->enforce($username, 'admin_resource_' . $key, Role::READ); |
| 85 | 85 | }; |
| 86 | 86 | } |