File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
app/code/Meta/BusinessExtension/Model/Api Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 22
22
23
23
use Meta \BusinessExtension \Api \AdobeCloudConfigInterface ;
24
24
use Magento \Framework \Filesystem \DirectoryList ;
25
+ use Magento \Framework \Filesystem \Driver \File ;
25
26
26
27
class AdobeCloudConfig implements AdobeCloudConfigInterface
27
28
{
@@ -39,15 +40,23 @@ class AdobeCloudConfig implements AdobeCloudConfigInterface
39
40
*/
40
41
private $ directoryList ;
41
42
43
+ /**
44
+ * @var File
45
+ */
46
+ private $ file ;
47
+
42
48
/**
43
49
* Class constructor
44
50
*
45
51
* @param DirectoryList $directoryList
52
+ * @param File $file
46
53
*/
47
54
public function __construct (
48
- DirectoryList $ directoryList
55
+ DirectoryList $ directoryList ,
56
+ File $ file
49
57
) {
50
58
$ this ->directoryList = $ directoryList ;
59
+ $ this ->file = $ file ;
51
60
}
52
61
53
62
/**
@@ -60,8 +69,11 @@ public function isSellerOnAdobeCloud(): bool
60
69
$ rootPath = $ this ->directoryList ->getRoot ();
61
70
62
71
foreach (self ::CLOUD_FILES as $ file ) {
63
- if (file_exists ($ rootPath . '/ ' . $ file )) {
64
- return true ;
72
+ try {
73
+ if ($ this ->file ->isExists ($ rootPath . '/ ' . $ file )) {
74
+ return true ;
75
+ }
76
+ } catch (\Exception $ ex ) {
65
77
}
66
78
}
67
79
You can’t perform that action at this time.
0 commit comments