@@ -27,7 +27,7 @@ class CheckOutdated
2727 * @param string $pluginName
2828 * @param array $lang
2929 */
30- public function __construct ($ modx , $ pluginName , $ lang = array () )
30+ public function __construct ($ modx , $ pluginName , $ lang = [] )
3131 {
3232 $ this ->modx = $ modx ;
3333 $ this ->pluginName = $ pluginName ;
@@ -54,7 +54,7 @@ public function load($source)
5454 $ data = json_decode ($ data , true );
5555 }
5656
57- return \is_array ($ data ) ? $ data : array () ;
57+ return \is_array ($ data ) ? $ data : [] ;
5858 }
5959
6060 /**
@@ -92,15 +92,15 @@ public function snippet($name, $options)
9292 if (version_compare ($ currentVersion , $ minVersion , 'lt ' )) {
9393 $ out .= $ this ->parseTemplate (
9494 $ tpl ,
95- array (
95+ [
9696 'name ' => $ snippet ->name ,
9797 'replaced ' => $ replaced ,
9898 'isSecurity ' => $ isSecurity ,
9999 'minVersion ' => $ minVersion ,
100100 'currentVersion ' => $ currentVersion ,
101101 'extrasID ' => $ this ->getExtrasId (),
102102 'extrasURL ' => $ this ->getExtrasUrl ($ snippet ->name )
103- )
103+ ]
104104 );
105105 }
106106
@@ -144,15 +144,15 @@ public function plugin($name, $options)
144144 if (version_compare ($ currentVersion , $ minVersion , 'lt ' )) {
145145 $ out .= $ this ->parseTemplate (
146146 $ tpl ,
147- array (
147+ [
148148 'name ' => $ plugin ->name ,
149149 'replaced ' => $ replaced ,
150150 'isSecurity ' => $ isSecurity ,
151151 'minVersion ' => $ minVersion ,
152152 'currentVersion ' => $ currentVersion ,
153153 'extrasID ' => $ this ->getExtrasId (),
154154 'extrasURL ' => $ this ->getExtrasUrl ($ plugin ->name )
155- )
155+ ]
156156 );
157157 }
158158 }
@@ -194,15 +194,15 @@ public function module($name, $options)
194194 if (version_compare ($ currentVersion , $ minVersion , 'lt ' )) {
195195 $ out .= $ this ->parseTemplate (
196196 $ tpl ,
197- array (
197+ [
198198 'name ' => $ module ->name ,
199199 'replaced ' => $ replaced ,
200200 'isSecurity ' => $ isSecurity ,
201201 'minVersion ' => $ minVersion ,
202202 'currentVersion ' => $ currentVersion ,
203203 'extrasID ' => $ this ->getExtrasId (),
204204 'extrasURL ' => $ this ->getExtrasUrl ($ module ->name )
205- )
205+ ]
206206 );
207207 }
208208 }
@@ -216,7 +216,7 @@ public function module($name, $options)
216216 * @param array $options
217217 * @return string
218218 */
219- public function file ($ path , $ options = array () )
219+ public function file ($ path , $ options = [] )
220220 {
221221 $ out = '' ;
222222 if (file_exists (MODX_BASE_PATH . $ path )) {
@@ -241,7 +241,7 @@ public function file($path, $options = array())
241241 * @param array $options
242242 * @return string
243243 */
244- public function theme ($ theme , $ options = array () )
244+ public function theme ($ theme , $ options = [] )
245245 {
246246 $ out = '' ;
247247 if (file_exists (MODX_MANAGER_PATH . 'media/style/ ' . $ theme )) {
@@ -257,11 +257,11 @@ public function theme($theme, $options = array())
257257
258258 $ out = $ this ->parseTemplate (
259259 $ tpl ,
260- array (
260+ [
261261 'theme ' => $ theme ,
262262 'isSecurity ' => $ isSecurity ,
263263 'path ' => MODX_MANAGER_PATH . 'media/style/ '
264- )
264+ ]
265265 );
266266 }
267267
@@ -288,10 +288,10 @@ public function rss($key, $options)
288288
289289 $ out = $ this ->parseTemplate (
290290 $ tpl ,
291- array (
291+ [
292292 'extrasID ' => $ this ->getExtrasId (),
293293 'oldUrl ' => $ options ['old ' ]
294- )
294+ ]
295295 );
296296 }
297297
@@ -361,7 +361,7 @@ public function makeConfigButton($title)
361361 {
362362 $ button = '' ;
363363 if ($ this ->modx ->hasPermission ('edit_plugin ' )) {
364- $ popup = array (
364+ $ popup = [
365365 'url ' => MODX_MANAGER_URL . '?a=102&id= ' . $ this ->getPluginId () . '&tab=1 ' ,
366366 'title1 ' => $ title ,
367367 'icon ' => 'fa-cog ' ,
@@ -374,7 +374,7 @@ public function makeConfigButton($title)
374374 'hover ' => 0 ,
375375 'overlay ' => 1 ,
376376 'overlayclose ' => 1
377- ) ;
377+ ] ;
378378
379379 $ button = '<a ' .
380380 'data-toggle="tooltip" ' .
@@ -395,7 +395,7 @@ public function makeConfigButton($title)
395395 /**
396396 * @param array $lexicon
397397 */
398- public function setLang ($ lexicon = array () )
398+ public function setLang ($ lexicon = [] )
399399 {
400400 $ lang = $ this ->modx ->getConfig ('manager_language ' );
401401 if (file_exists ( __DIR__ . '/lang/ ' .$ lang .'/core.inc.php ' )){
@@ -424,7 +424,7 @@ public function setLang($lexicon = array())
424424 */
425425 public function process ($ type , $ item , $ options )
426426 {
427- $ available = array ( 'rss ' , 'file ' , 'theme ' , 'snippet ' , 'plugin ' , 'module ' ) ;
427+ $ available = [ 'rss ' , 'file ' , 'theme ' , 'snippet ' , 'plugin ' , 'module ' ] ;
428428
429429 if (\in_array ($ type , $ available ) && method_exists ($ this , $ type )) {
430430 $ out = $ this ->{$ type }($ item , $ options );
@@ -437,12 +437,12 @@ public function process($type, $item, $options)
437437 * @param array $data
438438 * @return string
439439 */
440- public function parseTemplate ($ tpl , $ data = array () )
440+ public function parseTemplate ($ tpl , $ data = [] )
441441 {
442442 return $ this ->tpl ->parseChunk (
443443 ($ tpl ),
444444 array_merge (
445- array ( 'evo_cms_version ' => $ this ->modx ->getVersionData ('version ' )) ,
445+ [ 'evo_cms_version ' => $ this ->modx ->getVersionData ('version ' )] ,
446446 $ data ,
447447 $ this ->lang
448448 ),
0 commit comments