Dotclear


Ignore:
Timestamp:
09/14/18 12:16:17 (7 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

short notation for array (array() → [])

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/core/class.dc.update.php

    r3872 r3874  
    2121    protected $cache_file; 
    2222 
    23     protected $version_info = array( 
     23    protected $version_info = [ 
    2424        'version'  => null, 
    2525        'href'     => null, 
     
    2828        'php'      => '5.6', 
    2929        'notify'   => true 
    30     ); 
     30    ]; 
    3131 
    3232    protected $cache_ttl    = '-6 hours'; 
    33     protected $forced_files = array(); 
     33    protected $forced_files = []; 
    3434 
    3535    /** 
     
    314314        unset($opts, $cur_digests, $new_digests, $zip); 
    315315 
    316         $not_readable = array(); 
     316        $not_readable = []; 
    317317 
    318318        if (!empty($this->forced_files)) { 
     
    376376        } 
    377377 
    378         $zip_files    = array(); 
    379         $not_writable = array(); 
     378        $zip_files    = []; 
     379        $not_writable = []; 
    380380 
    381381        foreach ($new_files as $file) { 
     
    424424        $new_md5 = $new_path = $new_digests; 
    425425 
    426         array_walk($cur_md5, array($this, 'parseLine'), 1); 
    427         array_walk($cur_path, array($this, 'parseLine'), 2); 
    428         array_walk($new_md5, array($this, 'parseLine'), 1); 
    429         array_walk($new_path, array($this, 'parseLine'), 2); 
     426        array_walk($cur_md5, [$this, 'parseLine'], 1); 
     427        array_walk($cur_path, [$this, 'parseLine'], 2); 
     428        array_walk($new_md5, [$this, 'parseLine'], 1); 
     429        array_walk($new_path, [$this, 'parseLine'], 2); 
    430430 
    431431        $cur = array_combine($cur_md5, $cur_path); 
     
    464464        $contents = file($digests_file, $opts); 
    465465 
    466         $changes = array(); 
     466        $changes = []; 
    467467 
    468468        foreach ($contents as $digest) { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map