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
  • debian/mkdcl.php

    r2566 r3874  
    1616     { 
    1717          $f = file($this->f); 
    18           $res = array(); 
     18          $res = []; 
    1919          $done = false; 
    2020 
     
    9696     private function getPackageInfo($l) 
    9797     { 
    98           $res = array( 
     98          $res = [ 
    9999               'package' => '', 
    100100               'version' => '', 
     
    102102               'keywords' => '', 
    103103               'changelog' => '', 
    104                'maintainer' => array() 
    105           ); 
     104               'maintainer' => [] 
     105          ]; 
    106106 
    107107          $l = explode(';',$l); 
     
    126126     private function getMaintainerInfo($l) 
    127127     { 
    128           $res = array( 
     128          $res = [ 
    129129               'name' => '', 
    130130               'email' => '', 
    131131               'date' => '' 
    132           ); 
     132          ]; 
    133133 
    134134          if (preg_match('/^ -- (.+?) <(.+?)>  (.+?)$/',$l,$m)) { 
     
    171171          } 
    172172 
    173           $res = array(); 
     173          $res = []; 
    174174          foreach ($x->logentry as $change) 
    175175          { 
    176                $res[(integer) $change['revision']] = array( 
     176               $res[(integer) $change['revision']] = [ 
    177177                    'author' => (string) $change->author, 
    178178                    'date' => (string) $change->date, 
    179179                    'msg' => trim((string) $change->msg) 
    180                ); 
     180               ]; 
    181181          } 
    182182 
Note: See TracChangeset for help on using the changeset viewer.

Sites map