Skip to content

Commit

Permalink
replace array() with []
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasKrais committed Jun 20, 2017
1 parent 7723463 commit 4c6f29b
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions lib/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public static function getAll($clang_id) {
$result = rex_sql::factory();
$result->setQuery($query);

$categories = array();
$categories = [];
for($i = 0; $i < $result->getRows(); $i++) {
$categories[] = new Category($result->getValue("category_id"), $clang_id);
$result->next();
Expand All @@ -167,7 +167,7 @@ public function getChildren() {
$result = rex_sql::factory();
$result->setQuery($query);

$children = array();
$children = [];
for($i = 0; $i < $result->getRows(); $i++) {
$children[] = new Category($result->getValue("category_id"), $this->clang_id);
$result->next();
Expand Down Expand Up @@ -214,7 +214,7 @@ public function getProperties() {
$result = rex_sql::factory();
$result->setQuery($query);

$properties = array();
$properties = [];
for($i = 0; $i < $result->getRows(); $i++) {
$properties[] = new Property($result->getValue("property_id"), $this->clang_id);
$result->next();
Expand Down Expand Up @@ -259,7 +259,7 @@ public function getURL($including_domain = FALSE) {
if($this->url == "") {
$d2u_immo = rex_addon::get("d2u_immo");

$parameterArray = array();
$parameterArray = [];
$parameterArray['category_id'] = $this->category_id;

$this->url = rex_getUrl($d2u_immo->getConfig('article_id'), $this->clang_id, $parameterArray, "&");
Expand Down Expand Up @@ -356,7 +356,7 @@ private function setPriority() {
$this->priority = $result->getRows() + 1;
}

$categories = array();
$categories = [];
for($i = 0; $i < $result->getRows(); $i++) {
$categories[$result->getValue("priority")] = $result->getValue("category_id");
$result->next();
Expand Down
4 changes: 2 additions & 2 deletions lib/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public static function getAll() {
$result = rex_sql::factory();
$result->setQuery($query);

$contacts = array();
$contacts = [];
for($i = 0; $i < $result->getRows(); $i++) {
$contacts[] = new Contact($result->getValue("contact_id"));
$result->next();
Expand All @@ -153,7 +153,7 @@ public function getProperties() {
$result = rex_sql::factory();
$result->setQuery($query);

$properties = array();
$properties = [];
for($i = 0; $i < $result->getRows(); $i++) {
$properties[] = new Property($result->getValue("property_id"), $this->clang_id);
$result->next();
Expand Down
4 changes: 2 additions & 2 deletions pages/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<div class="panel-body-wrapper slide">
<?php
if($rex_clang->getId() != rex_config::get("d2u_immo", "default_lang")) {
$options_translations = array();
$options_translations = [];
$options_translations["yes"] = rex_i18n::msg('d2u_helper_translation_needs_update');
$options_translations["no"] = rex_i18n::msg('d2u_helper_translation_is_uptodate');
$options_translations["delete"] = rex_i18n::msg('d2u_helper_translation_delete');
Expand Down Expand Up @@ -160,7 +160,7 @@
}

$options = array("-1"=>rex_i18n::msg('d2u_immo_category_parent_none'));
$selected_values = array();
$selected_values = [];
foreach(Category::getAll(rex_config::get("d2u_immo", "default_lang")) as $parent_category) {
if(!$parent_category->isChild() && $parent_category->category_id != $category->category_id) {
$options[$parent_category->category_id] = $parent_category->name;
Expand Down
2 changes: 1 addition & 1 deletion plugins/export/lib/aexport.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ abstract class AExport {
/**
* @var ExportedProperty[] that need to be exported.
*/
protected $export_properties = array();
protected $export_properties = [];

/**
* @var Provider Export provider object.
Expand Down
2 changes: 1 addition & 1 deletion plugins/export/lib/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ public static function getAll() {
$result = rex_sql::factory();
$result->setQuery($query);

$providers = array();
$providers = [];
for($i = 0; $i < $result->getRows(); $i++) {
$providers[] = new Provider($result->getValue("provider_id"));
$result->next();
Expand Down
2 changes: 1 addition & 1 deletion plugins/export/lib/socialexport_linkedin.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public function export() {
* @return Returns an array on success or FALSE on failure.
*/
private static function http_parse_headers($r) {
$o = array();
$o = [];
$r = substr($r, stripos($r, "\r\n"));
$r = explode("\r\n", $r);
foreach ($r as $h) {
Expand Down
4 changes: 2 additions & 2 deletions plugins/export/pages/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@
'linkedin' => rex_i18n::msg('d2u_immo_export_linkedin')];
d2u_addon_backend_helper::form_select('d2u_immo_export_type', 'form[type]', $options, array($provider->type), 1, FALSE, $readonly);

$options_lang = array();
$options_lang = [];
foreach(rex_clang::getAll() as $rex_clang) {
$options_lang[$rex_clang->getId()] = $rex_clang->getName();
}
d2u_addon_backend_helper::form_select('d2u_immo_export_clang', 'form[clang_id]', $options_lang, array($provider->clang_id));
d2u_addon_backend_helper::form_input('d2u_immo_export_company_name', 'form[company_name]', $provider->company_name, TRUE, $readonly, 'text');
d2u_addon_backend_helper::form_input('d2u_immo_export_company_email', 'form[company_email]', $provider->company_email, TRUE, $readonly, 'email');
d2u_addon_backend_helper::form_input('d2u_immo_export_customer_number', 'form[customer_number]', $provider->customer_number, FALSE, $readonly, 'text');
$options_media = array();
$options_media = [];
$media_sql = rex_sql::factory();
$media_sql->setQuery("SELECT name FROM ". rex::getTablePrefix() ."media_manager_type");
for($i = 0; $i < $media_sql->getRows(); $i++) {
Expand Down
4 changes: 2 additions & 2 deletions plugins/export/vendor/Facebook/base_facebook.php
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ protected function getAccessTokenFromCode($code, $redirect_uri = null) {
return false;
}

$response_params = array();
$response_params = [];
parse_str($access_token_response, $response_params);
if (!isset($response_params['access_token'])) {
return false;
Expand Down Expand Up @@ -972,7 +972,7 @@ protected function getCurrentUrl() {
if (!empty($parts['query'])) {
// drop known fb params
$params = explode('&', $parts['query']);
$retained_params = array();
$retained_params = [];
foreach ($params as $param) {
if ($this->shouldRetainParam($param)) {
$retained_params[] = $param;
Expand Down
6 changes: 3 additions & 3 deletions plugins/window_advertising/lib/advertisement.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public static function getAll($clang_id, $only_online = FALSE) {
$result = rex_sql::factory();
$result->setQuery($query);

$advertisements = array();
$advertisements = [];
for($i = 0; $i < $result->getRows(); $i++) {
$advertisements[] = new Advertisement($result->getValue("ad_id"), $clang_id);
$result->next();
Expand All @@ -179,7 +179,7 @@ public function getURL($including_domain = FALSE) {
if($this->url == "") {
$d2u_immo = rex_addon::get("d2u_immo");

$parameterArray = array();
$parameterArray = [];
$parameterArray['ad_id'] = $this->ad_id;

$this->url = rex_getUrl($d2u_immo->getConfig('article_id'), $this->clang_id, $parameterArray, "&");
Expand Down Expand Up @@ -270,7 +270,7 @@ private function setPriority() {
$this->priority = $result->getRows() + 1;
}

$advertisements = array();
$advertisements = [];
for($i = 0; $i < $result->getRows(); $i++) {
$advertisements[$result->getValue("priority")] = $result->getValue("ad_id");
$result->next();
Expand Down
2 changes: 1 addition & 1 deletion plugins/window_advertising/pages/advertisement.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<div class="panel-body-wrapper slide">
<?php
if($rex_clang->getId() != rex_config::get("d2u_immo", "default_lang")) {
$options_translations = array();
$options_translations = [];
$options_translations["yes"] = rex_i18n::msg('d2u_helper_translation_needs_update');
$options_translations["no"] = rex_i18n::msg('d2u_helper_translation_is_uptodate');
$options_translations["delete"] = rex_i18n::msg('d2u_helper_translation_delete');
Expand Down

0 comments on commit 4c6f29b

Please sign in to comment.