3
3
namespace JustBetter \Sentry \Helper ;
4
4
5
5
use Magento \Framework \App \Area ;
6
+ use Magento \Framework \App \DeploymentConfig ;
7
+ use Magento \Framework \App \Helper \AbstractHelper ;
8
+ use Magento \Framework \App \Helper \Context ;
9
+ use Magento \Framework \App \ProductMetadataInterface ;
6
10
use Magento \Framework \App \State ;
7
11
use Magento \Store \Model \ScopeInterface ;
8
- use Magento \Framework \App \Helper \Context ;
9
12
use Magento \Store \Model \StoreManagerInterface ;
10
- use Magento \Framework \App \Helper \AbstractHelper ;
11
- use Magento \Framework \Exception \LocalizedException ;
12
- use Magento \Framework \App \ProductMetadataInterface ;
13
- use Magento \Framework \App \DeploymentConfig ;
14
13
15
14
class Data extends AbstractHelper
16
15
{
@@ -84,6 +83,7 @@ public function getEnvironment()
84
83
/**
85
84
* @param $field
86
85
* @param null $storeId
86
+ *
87
87
* @return mixed
88
88
*/
89
89
public function getConfigValue ($ field , $ storeId = null )
@@ -98,11 +98,12 @@ public function getConfigValue($field, $storeId = null)
98
98
/**
99
99
* @param $code
100
100
* @param null $storeId
101
+ *
101
102
* @return mixed
102
103
*/
103
104
public function getGeneralConfig ($ code , $ storeId = null )
104
105
{
105
- return $ this ->getConfigValue (self ::XML_PATH_SRS . $ code , $ storeId );
106
+ return $ this ->getConfigValue (self ::XML_PATH_SRS . $ code , $ storeId );
106
107
}
107
108
108
109
/**
@@ -113,7 +114,7 @@ public function collectModuleConfig()
113
114
$ this ->config ['enabled ' ] = $ this ->deploymentConfig ->get ('sentry ' ) !== null ;
114
115
115
116
foreach ($ this ->configKeys as $ value ) {
116
- $ this ->config [$ value ] = $ this ->deploymentConfig ->get ('sentry/ ' . $ value );
117
+ $ this ->config [$ value ] = $ this ->deploymentConfig ->get ('sentry/ ' . $ value );
117
118
}
118
119
119
120
return $ this ->config ;
@@ -156,7 +157,7 @@ public function isOverwriteProductionMode()
156
157
}
157
158
158
159
/**
159
- * Get the current magento version
160
+ * Get the current magento version.
160
161
*
161
162
* @return string
162
163
*/
@@ -166,7 +167,7 @@ public function getMagentoVersion()
166
167
}
167
168
168
169
/**
169
- * Get the current store
170
+ * Get the current store.
170
171
*/
171
172
public function getStore ()
172
173
{
@@ -178,11 +179,12 @@ public function getStore()
178
179
*/
179
180
public function useScriptTag ()
180
181
{
181
- return $ this ->scopeConfig ->isSetFlag (static ::XML_PATH_SRS . 'enable_script_tag ' );
182
+ return $ this ->scopeConfig ->isSetFlag (static ::XML_PATH_SRS . 'enable_script_tag ' );
182
183
}
183
184
184
185
/**
185
186
* @param $blockName
187
+ *
186
188
* @return bool
187
189
*/
188
190
public function showScriptTagInThisBlock ($ blockName )
@@ -192,7 +194,7 @@ public function showScriptTagInThisBlock($blockName)
192
194
return false ;
193
195
}
194
196
195
- $ name = 'sentry. ' . $ config ;
197
+ $ name = 'sentry. ' . $ config ;
196
198
197
199
return $ name == $ blockName ;
198
200
}
0 commit comments