X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Ffilebackend%2FTempFSFile.php;h=3ec34f18a132f850523d229259506443762c42c0;hb=6e9b4f0e9ce4ccd6089c18b205065ef7fa077484;hp=46b536000063e97d66d6da0d218763adaacd6bd3;hpb=2fd379fa95f223c6b3f3c8eff6de068eca9e1a1a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filebackend/TempFSFile.php b/includes/filebackend/TempFSFile.php index 46b5360000..3ec34f18a1 100644 --- a/includes/filebackend/TempFSFile.php +++ b/includes/filebackend/TempFSFile.php @@ -32,7 +32,7 @@ class TempFSFile extends FSFile { protected $canDelete = false; /** @var array Active temp files to purge on shutdown */ - protected static $instances = array(); + protected static $instances = []; /** @var array Map of (path => 1) for paths to delete on shutdown */ protected static $pathsCollect = null; @@ -41,8 +41,8 @@ class TempFSFile extends FSFile { parent::__construct( $path ); if ( self::$pathsCollect === null ) { - self::$pathsCollect = array(); - register_shutdown_function( array( __CLASS__, 'purgeAllOnShutdown' ) ); + self::$pathsCollect = []; + register_shutdown_function( [ __CLASS__, 'purgeAllOnShutdown' ] ); } } @@ -102,7 +102,7 @@ class TempFSFile extends FSFile { if ( is_object( $object ) ) { if ( !isset( $object->tempFSFileReferences ) ) { // Init first since $object might use __get() and return only a copy variable - $object->tempFSFileReferences = array(); + $object->tempFSFileReferences = []; } $object->tempFSFileReferences[] = $this; }