Commit 34f0d4da authored by Mathias Schreiber's avatar Mathias Schreiber
Browse files

Use PHP 5.3 array style

parent 18f10c0a
...@@ -46,13 +46,13 @@ class tx_typo3roadmap_pi1 extends tslib_pibase ...@@ -46,13 +46,13 @@ class tx_typo3roadmap_pi1 extends tslib_pibase
* *
* @var array * @var array
*/ */
protected $colors = [ protected $colors = array(
'regular' => '#69A550', 'regular' => '#69A550',
'security' => '#FF8700', 'security' => '#FF8700',
'elts' => '#ffb767', 'elts' => '#ffb767',
'sprint' => '#e6e6e6', 'sprint' => '#e6e6e6',
'stabilization' => '#983030' 'stabilization' => '#983030'
]; );
/** /**
* @var t3lib_DB * @var t3lib_DB
...@@ -188,7 +188,7 @@ class tx_typo3roadmap_pi1 extends tslib_pibase ...@@ -188,7 +188,7 @@ class tx_typo3roadmap_pi1 extends tslib_pibase
'uid' 'uid'
); );
if ($rows === null) { if ($rows === null) {
return []; return array();
} }
return $rows; return $rows;
...@@ -299,7 +299,7 @@ class tx_typo3roadmap_pi1 extends tslib_pibase ...@@ -299,7 +299,7 @@ class tx_typo3roadmap_pi1 extends tslib_pibase
*/ */
protected function generateChartArray(array $majorVersions) protected function generateChartArray(array $majorVersions)
{ {
$data = []; $data = array();
foreach ($majorVersions as $index => $majorVersion) { foreach ($majorVersions as $index => $majorVersion) {
$firstStart = (int)$majorVersion['developmentstart']; $firstStart = (int)$majorVersion['developmentstart'];
$data[$index]['version'] = $majorVersion['title']; $data[$index]['version'] = $majorVersion['title'];
...@@ -320,20 +320,20 @@ class tx_typo3roadmap_pi1 extends tslib_pibase ...@@ -320,20 +320,20 @@ class tx_typo3roadmap_pi1 extends tslib_pibase
} }
//Sprint Segment //Sprint Segment
$data[$index]['segments'][] = [ $data[$index]['segments'][] = array(
'start' => $this->dateFromTimestamp($sprintStart), 'start' => $this->dateFromTimestamp($sprintStart),
'end' => $this->dateFromTimestamp($realDate - 1209600), 'end' => $this->dateFromTimestamp($realDate - 1209600),
'color' => $this->colors['sprint'], 'color' => $this->colors['sprint'],
'task' => 'Sprint Phase ' . $minorVersion['version'] 'task' => 'Sprint Phase ' . $minorVersion['version']
]; );
//Stabilization Segment //Stabilization Segment
$data[$index]['segments'][] = [ $data[$index]['segments'][] = array(
'start' => $this->dateFromTimestamp($realDate - 1209600), 'start' => $this->dateFromTimestamp($realDate - 1209600),
'end' => $this->dateFromTimestamp($realDate), 'end' => $this->dateFromTimestamp($realDate),
'color' => $this->colors['stabilization'], 'color' => $this->colors['stabilization'],
'task' => 'Stabilization Phase ' . $minorVersion['version'] 'task' => 'Stabilization Phase ' . $minorVersion['version']
]; );
// Set the last release date as start of maintenance // Set the last release date as start of maintenance
$firstStart = $realDate; $firstStart = $realDate;
} }
...@@ -341,27 +341,27 @@ class tx_typo3roadmap_pi1 extends tslib_pibase ...@@ -341,27 +341,27 @@ class tx_typo3roadmap_pi1 extends tslib_pibase
* Set Maintenance Times * Set Maintenance Times
*/ */
// Regular Maintenance // Regular Maintenance
$data[$index]['segments'][] = [ $data[$index]['segments'][] = array(
'start' => $this->dateFromTimestamp($firstStart), 'start' => $this->dateFromTimestamp($firstStart),
'end' => $this->dateFromTimestamp($majorVersion['regularsupport']), 'end' => $this->dateFromTimestamp($majorVersion['regularsupport']),
'color' => $this->colors['regular'], 'color' => $this->colors['regular'],
'task' => 'Regular Maintenance' 'task' => 'Regular Maintenance'
]; );
// Security Maintenance // Security Maintenance
$data[$index]['segments'][] = [ $data[$index]['segments'][] = array(
'start' => $this->dateFromTimestamp($majorVersion['regularsupport']), 'start' => $this->dateFromTimestamp($majorVersion['regularsupport']),
'end' => $this->dateFromTimestamp($majorVersion['prioritysupport']), 'end' => $this->dateFromTimestamp($majorVersion['prioritysupport']),
'color' => $this->colors['security'], 'color' => $this->colors['security'],
'task' => 'Priority bugfixes' 'task' => 'Priority bugfixes'
]; );
// ELTS Maintenance // ELTS Maintenance
if ($majorVersion['extendedsupport'] > 0) { if ($majorVersion['extendedsupport'] > 0) {
$data[$index]['segments'][] = [ $data[$index]['segments'][] = array(
'start' => $this->dateFromTimestamp($majorVersion['prioritysupport']), 'start' => $this->dateFromTimestamp($majorVersion['prioritysupport']),
'end' => $this->dateFromTimestamp($majorVersion['extendedsupport']), 'end' => $this->dateFromTimestamp($majorVersion['extendedsupport']),
'color' => $this->colors['elts'], 'color' => $this->colors['elts'],
'task' => 'Extended support (optional)' 'task' => 'Extended support (optional)'
]; );
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment