瀏覽代碼

Use keyword "static" (#4436)

static closure
Luc SANCHEZ 3 年之前
父節點
當前提交
85991d1c5c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/Services/ImportService.php

+ 1 - 1
app/Services/ImportService.php

@@ -70,7 +70,7 @@ class FreshRSS_Import_Service {
 		$limits = FreshRSS_Context::$system_conf->limits;
 
 		//Sort with categories first
-		usort($opml_elements, function ($a, $b) {
+		usort($opml_elements, static function ($a, $b) {
 			return strcmp(
 				(isset($a['xmlUrl']) ? 'Z' : 'A') . (isset($a['text']) ? $a['text'] : ''),
 				(isset($b['xmlUrl']) ? 'Z' : 'A') . (isset($b['text']) ? $b['text'] : ''));