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.store.php

    r3812 r3874  
    2424 
    2525    /** @var    array    Modules fields to search on and their weighting */ 
    26     public static $weighting = array('id' => 10, 'name' => 8, 'author' => 6, 'tags' => 4, 'desc' => 2); 
     26    public static $weighting = ['id' => 10, 'name' => 8, 'author' => 6, 'tags' => 4, 'desc' => 2]; 
    2727 
    2828    /** @var    string    User agent used to query repository */ 
     
    6767        $raw_datas = $parser->getModules(); 
    6868 
    69         uasort($raw_datas, array('self', 'sort')); 
     69        uasort($raw_datas, ['self', 'sort']); 
    7070 
    7171        $skipped = array_keys($this->modules->getDisabledModules()); 
     
    7676        } 
    7777 
    78         $updates = array(); 
     78        $updates = []; 
    7979        $current = $this->modules->getModules(); 
    8080        foreach ($current as $p_id => $p_infos) { 
     
    9090        } 
    9191 
    92         $this->data = array( 
     92        $this->data = [ 
    9393            'new'    => $raw_datas, 
    9494            'update' => $updates 
    95         ); 
     95        ]; 
    9696 
    9797        return true; 
     
    125125    public function search($pattern) 
    126126    { 
    127         $result = array(); 
     127        $result = []; 
    128128 
    129129        # Split query into small clean words 
     
    245245    public static function patternize($str) 
    246246    { 
    247         $arr = array(); 
     247        $arr = []; 
    248248 
    249249        foreach (explode(' ', $str) as $_) { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map