5
5
*/
6
6
namespace Magento \Config \Model \Config \Reader \Source \Deployed ;
7
7
8
- use Magento \Config \Model \Config \Reader ;
9
- use Magento \Framework \App \Config \ScopeConfigInterface ;
10
- use Magento \Framework \App \DeploymentConfig ;
11
- use Magento \Config \Model \Placeholder \PlaceholderInterface ;
12
8
use Magento \Config \Model \Placeholder \PlaceholderFactory ;
9
+ use Magento \Config \Model \Placeholder \PlaceholderInterface ;
13
10
use Magento \Framework \App \Config \ScopeCodeResolver ;
11
+ use Magento \Framework \App \Config \ScopeConfigInterface ;
12
+ use Magento \Framework \App \DeploymentConfig ;
14
13
15
14
/**
16
15
* Class for checking settings that defined in config file
@@ -65,13 +64,13 @@ public function isReadOnly($path, $scope, $scopeCode = null)
65
64
);
66
65
67
66
if (null === $ config ) {
68
- $ config = $ this ->config ->get (
69
- $ this ->resolvePath (ScopeConfigInterface::SCOPE_TYPE_DEFAULT , null ) . "/ " . $ path
70
- );
67
+ $ config = $ this ->config ->get ($ this ->resolvePath ($ scope , $ scopeCode ) . "/ " . $ path );
71
68
}
72
69
73
70
if (null === $ config ) {
74
- $ config = $ this ->config ->get ($ this ->resolvePath ($ scope , $ scopeCode ) . "/ " . $ path );
71
+ $ config = $ this ->config ->get (
72
+ $ this ->resolvePath (ScopeConfigInterface::SCOPE_TYPE_DEFAULT , null ) . "/ " . $ path
73
+ );
75
74
}
76
75
77
76
return $ config !== null ;
@@ -84,7 +83,6 @@ public function isReadOnly($path, $scope, $scopeCode = null)
84
83
*
85
84
* @param string $path
86
85
* @param string $scope
87
- * @param string $scopeCode
88
86
* @param string|null $scopeCode
89
87
* @return string|null
90
88
* @since 100.1.2
@@ -103,9 +101,11 @@ public function getPlaceholderValue($path, $scope, $scopeCode = null)
103
101
*/
104
102
public function getEnvValue ($ placeholder )
105
103
{
104
+ // phpcs:disable Magento2.Security.Superglobal
106
105
if ($ this ->placeholder ->isApplicable ($ placeholder ) && isset ($ _ENV [$ placeholder ])) {
107
106
return $ _ENV [$ placeholder ];
108
107
}
108
+ // phpcs:enable
109
109
110
110
return null ;
111
111
}
0 commit comments