@@ -80,9 +80,9 @@ public function getPath(string $code, bool $relativePath = false): string
80
80
throw new \RuntimeException ("Code {$ code } is not registered " );
81
81
}
82
82
83
- if (!array_key_exists (static ::PATH , $ directories [$ code ])) {
83
+ if (!array_key_exists (self ::PATH , $ directories [$ code ])) {
84
84
throw new \RuntimeException (
85
- sprintf ('Config var "%s" does not exists ' , static ::PATH )
85
+ sprintf ('Config var "%s" does not exists ' , self ::PATH )
86
86
);
87
87
}
88
88
@@ -113,7 +113,7 @@ public function getMagentoRoot(): string
113
113
*/
114
114
public function getInit (): string
115
115
{
116
- return $ this ->getPath (static ::DIR_INIT );
116
+ return $ this ->getPath (self ::DIR_INIT );
117
117
}
118
118
119
119
/**
@@ -122,7 +122,7 @@ public function getInit(): string
122
122
*/
123
123
public function getVar (): string
124
124
{
125
- return $ this ->getPath (static ::DIR_VAR );
125
+ return $ this ->getPath (self ::DIR_VAR );
126
126
}
127
127
128
128
/**
@@ -131,7 +131,7 @@ public function getVar(): string
131
131
*/
132
132
public function getLog (): string
133
133
{
134
- return $ this ->getPath (static ::DIR_LOG );
134
+ return $ this ->getPath (self ::DIR_LOG );
135
135
}
136
136
137
137
/**
@@ -140,7 +140,7 @@ public function getLog(): string
140
140
*/
141
141
public function getGeneratedCode (): string
142
142
{
143
- return $ this ->getPath (static ::DIR_GENERATED_CODE );
143
+ return $ this ->getPath (self ::DIR_GENERATED_CODE );
144
144
}
145
145
146
146
/**
@@ -149,7 +149,7 @@ public function getGeneratedCode(): string
149
149
*/
150
150
public function getGeneratedMetadata (): string
151
151
{
152
- return $ this ->getPath (static ::DIR_GENERATED_METADATA );
152
+ return $ this ->getPath (self ::DIR_GENERATED_METADATA );
153
153
}
154
154
155
155
/**
@@ -161,15 +161,15 @@ public function getGeneratedMetadata(): string
161
161
public function getWritableDirectories (): array
162
162
{
163
163
$ writableDirs = [
164
- static ::DIR_ETC ,
165
- static ::DIR_MEDIA ,
166
- static ::DIR_LOG ,
167
- static ::DIR_VIEW_PREPROCESSED ,
164
+ self ::DIR_ETC ,
165
+ self ::DIR_MEDIA ,
166
+ self ::DIR_LOG ,
167
+ self ::DIR_VIEW_PREPROCESSED ,
168
168
];
169
169
170
170
if ($ this ->magentoVersion ->satisfies ('2.1.* ' )) {
171
- $ writableDirs [] = static ::DIR_GENERATED_METADATA ;
172
- $ writableDirs [] = static ::DIR_GENERATED_CODE ;
171
+ $ writableDirs [] = self ::DIR_GENERATED_METADATA ;
172
+ $ writableDirs [] = self ::DIR_GENERATED_CODE ;
173
173
}
174
174
175
175
return array_map (function ($ path ) {
@@ -186,10 +186,10 @@ public function getWritableDirectories(): array
186
186
public function getMountPoints (): array
187
187
{
188
188
$ mountPoints = [
189
- static ::DIR_ETC ,
190
- static ::DIR_VAR ,
191
- static ::DIR_MEDIA ,
192
- static ::DIR_STATIC
189
+ self ::DIR_ETC ,
190
+ self ::DIR_VAR ,
191
+ self ::DIR_MEDIA ,
192
+ self ::DIR_STATIC
193
193
];
194
194
195
195
return array_map (function ($ path ) {
@@ -203,13 +203,13 @@ public function getMountPoints(): array
203
203
private function getDefaultDirectories (): array
204
204
{
205
205
$ config = [
206
- static ::DIR_INIT => [static ::PATH => 'init ' ],
207
- static ::DIR_VAR => [static ::PATH => 'var ' ],
208
- static ::DIR_LOG => [static ::PATH => 'var/log ' ],
209
- static ::DIR_ETC => [static ::PATH => 'app/etc ' ],
210
- static ::DIR_MEDIA => [static ::PATH => 'pub/media ' ],
211
- static ::DIR_STATIC => [static ::PATH => 'pub/static ' ],
212
- static ::DIR_VIEW_PREPROCESSED => [static ::PATH => 'var/view_preprocessed ' ],
206
+ self ::DIR_INIT => [self ::PATH => 'init ' ],
207
+ self ::DIR_VAR => [self ::PATH => 'var ' ],
208
+ self ::DIR_LOG => [self ::PATH => 'var/log ' ],
209
+ self ::DIR_ETC => [self ::PATH => 'app/etc ' ],
210
+ self ::DIR_MEDIA => [self ::PATH => 'pub/media ' ],
211
+ self ::DIR_STATIC => [self ::PATH => 'pub/static ' ],
212
+ self ::DIR_VIEW_PREPROCESSED => [self ::PATH => 'var/view_preprocessed ' ],
213
213
];
214
214
215
215
return $ config ;
@@ -224,11 +224,11 @@ private function getDefaultVariadicDirectories(): array
224
224
$ config = [];
225
225
226
226
if ($ this ->magentoVersion ->satisfies ('2.1.* ' )) {
227
- $ config [static ::DIR_GENERATED_CODE ] = [static ::PATH => 'var/generation ' ];
228
- $ config [static ::DIR_GENERATED_METADATA ] = [static ::PATH => 'var/di ' ];
227
+ $ config [self ::DIR_GENERATED_CODE ] = [self ::PATH => 'var/generation ' ];
228
+ $ config [self ::DIR_GENERATED_METADATA ] = [self ::PATH => 'var/di ' ];
229
229
} else {
230
- $ config [static ::DIR_GENERATED_CODE ] = [static ::PATH => 'generated/code ' ];
231
- $ config [static ::DIR_GENERATED_METADATA ] = [static ::PATH => 'generated/metadata ' ];
230
+ $ config [self ::DIR_GENERATED_CODE ] = [self ::PATH => 'generated/code ' ];
231
+ $ config [self ::DIR_GENERATED_METADATA ] = [self ::PATH => 'generated/metadata ' ];
232
232
}
233
233
234
234
return $ config ;
0 commit comments