From 46198a89ccc8e6750a37e1b9127f57238242fadf Mon Sep 17 00:00:00 2001
From: Camil Staps
Date: Mon, 1 Aug 2016 14:11:06 +0200
Subject: Array shorthands
---
include/home.php | 22 +++++++++++-----------
include/offers-view.php | 16 ++++++++--------
2 files changed, 19 insertions(+), 19 deletions(-)
(limited to 'include')
diff --git a/include/home.php b/include/home.php
index b42ec8e..05846cf 100644
--- a/include/home.php
+++ b/include/home.php
@@ -155,7 +155,7 @@ require('./header.php');
= CURDATE()"]);
- $list = array();
+ $list = [];
foreach ($offers as $offer) {
$start = BusinessAdmin::formatDate($offer->start_date, false);
$end = BusinessAdmin::formatDate($offer->end_date, false);
@@ -166,7 +166,7 @@ require('./header.php');
// We want to sort on percentage (DESC) and secondly end date (ASC) so start date (DESC)
$base = str_pad($percentage, 3, '0', STR_PAD_LEFT) . $offer->start_date;
for ($i = 0; isset($list["$base-$i"]); $i++);
- $list["$base-$i"] = array(
+ $list["$base-$i"] = [
'start' => $start,
'end' => $end,
'id' => $offer->id,
@@ -174,7 +174,7 @@ require('./header.php');
'percentage' => $percentage,
'price_excl' => Constants::invoice_valuta . $offer->calculate(Calculatable::SUBTOTAL),
'price_incl' => Constants::invoice_valuta . $offer->calculate(Calculatable::TOTAL)
- );
+ ];
}
krsort($list, SORT_STRING);
foreach ($list as $item) {
@@ -301,28 +301,28 @@ require('./header.php');