mirror of
https://github.com/nextcloud/server.git
synced 2026-06-14 19:20:35 -04:00
fix: Remove static var in NaturalSort
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
6f7961f5ce
commit
5961eba6a1
1 changed files with 2 additions and 6 deletions
|
|
@ -11,7 +11,6 @@ use OCP\Server;
|
|||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class NaturalSort {
|
||||
private static $instance;
|
||||
private $collator;
|
||||
private $cache = [];
|
||||
|
||||
|
|
@ -113,10 +112,7 @@ class NaturalSort {
|
|||
* Returns a singleton
|
||||
* @return NaturalSort instance
|
||||
*/
|
||||
public static function getInstance() {
|
||||
if (!isset(self::$instance)) {
|
||||
self::$instance = new NaturalSort();
|
||||
}
|
||||
return self::$instance;
|
||||
public static function getInstance(): NaturalSort {
|
||||
return \OCP\Server::get(NaturalSort::class);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue