Permalink
Browse files

New array syntax

  • Loading branch information...
sanpii committed Apr 23, 2012
1 parent 455520c commit 0aaf263e5ddef2decf82931a834e27294f9743cf
Showing with 6 additions and 6 deletions.
  1. +6 −6 index.php
View
@@ -16,7 +16,7 @@ public function __construct()
private function loadRules()
{
- $rules = array();
+ $rules = [];
foreach (glob('rules/*.rule') as $filename) {
$rules[] = Rule::newFromFile($filename);
}
@@ -25,24 +25,24 @@ private function loadRules()
public function run()
{
- $this->render(array(
+ $this->render([
'rules' => $this->rules,
'summary' => $this->getSummary(),
- ));
+ ]);
}
private function getSummary()
{
- static $titles = array(
+ static $titles = [
'C' => 'Commentaires',
'E' => 'Environnement',
'F' => 'Fontions',
'G' => 'Général',
'N' => 'Noms',
'T' => 'Tests',
- );
+ ];
- $summary = array();
+ $summary = [];
foreach ($this->rules as $rule) {
$title = $titles[$rule->id{0}];
$summary[$title][] = $rule;

0 comments on commit 0aaf263

Please sign in to comment.