File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed
app/code/Magento/WebapiSecurity/Model/Plugin Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -26,22 +26,17 @@ public function __construct(\Magento\Framework\App\Cache\TypeListInterface $cach
26
26
* Invalidate WebApi cache if needed.
27
27
*
28
28
* @param \Magento\Framework\App\Config\Value $subject
29
- * @param \Magento\Framework\App\Config\Value|null $result
30
- * @return \Magento\Framework\App\Config\Value|null
29
+ * @return \Magento\Framework\App\Config\Value
31
30
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
32
31
*/
33
- public function afterAfterSave (
34
- \Magento \Framework \App \Config \Value $ subject ,
35
- $ result
36
- ) {
37
- if (!is_null ($ result )) {
38
- if ($ result ->getPath () == \Magento \WebapiSecurity \Model \Plugin \AnonymousResourceSecurity::XML_ALLOW_INSECURE
39
- && $ result ->isValueChanged ()
40
- ) {
41
- $ this ->cacheTypeList ->invalidate (\Magento \Framework \App \Cache \Type \Webapi::TYPE_IDENTIFIER );
42
- }
32
+ public function afterAfterSave (\Magento \Framework \App \Config \Value $ subject )
33
+ {
34
+ if ($ subject ->getPath () == \Magento \WebapiSecurity \Model \Plugin \AnonymousResourceSecurity::XML_ALLOW_INSECURE
35
+ && $ subject ->isValueChanged ()
36
+ ) {
37
+ $ this ->cacheTypeList ->invalidate (\Magento \Framework \App \Cache \Type \Webapi::TYPE_IDENTIFIER );
43
38
}
44
39
45
- return $ result ;
40
+ return $ subject ;
46
41
}
47
42
}
You can’t perform that action at this time.
0 commit comments