Skip to content

Commit

Permalink
PSR-2+X tiny bang
Browse files Browse the repository at this point in the history
  • Loading branch information
klees committed Mar 17, 2020
1 parent 71b9c7d commit 7564c31
Show file tree
Hide file tree
Showing 1,740 changed files with 65,562 additions and 65,358 deletions.
Expand Up @@ -74,9 +74,9 @@ private function initForm()
private function fillForm()
{
$this->setValuesByArray(array(
'name' => $this->object->getName(),
'url' => $this->object->getUrl(),
'img' => $this->object->getImg(),
'name' => $this->object->getName(),
'url' => $this->object->getUrl(),
'img' => $this->object->getImg(),
'show_in_list' => $this->object->getShowInList(),
));
}
Expand Down
Expand Up @@ -80,10 +80,10 @@ protected function initTable()
$result = array();
foreach ($settings as $set) {
$result[] = array(
"id" => $set->getId(),
"id" => $set->getId(),
"name" => $set->getName(),
"url" => $set->getUrl(),
"img" => $set->getImg(),
"url" => $set->getUrl(),
"img" => $set->getImg(),
);
}
$table->setData($result);
Expand Down
Expand Up @@ -55,7 +55,7 @@ public function getByObjectIdAndField(ilBiblFieldInterface $field, $object_id)
{
$list = ilBiblFieldFilter::where([
'object_id' => $object_id,
'field_id' => $field->getId(),
'field_id' => $field->getId(),
])->first();
if (!$list) {
throw new LogicException("filter not found");
Expand Down
Expand Up @@ -85,11 +85,11 @@ public function initForm()
$si->setRequired(true);
$this->addItem($si);

$options = [ilBiblFieldFilterInterface::FILTER_TYPE_TEXT_INPUT => $this->lng()->txt(
$options = [ilBiblFieldFilterInterface::FILTER_TYPE_TEXT_INPUT => $this->lng()->txt(
"filter_type_" . ilBiblFieldFilterInterface::FILTER_TYPE_TEXT_INPUT
), ilBiblFieldFilterInterface::FILTER_TYPE_SELECT_INPUT => $this->lng()->txt(
"filter_type_" . ilBiblFieldFilterInterface::FILTER_TYPE_SELECT_INPUT
), ilBiblFieldFilterInterface::FILTER_TYPE_MULTI_SELECT_INPUT => $this->lng()->txt(
), ilBiblFieldFilterInterface::FILTER_TYPE_SELECT_INPUT => $this->lng()->txt(
"filter_type_" . ilBiblFieldFilterInterface::FILTER_TYPE_SELECT_INPUT
), ilBiblFieldFilterInterface::FILTER_TYPE_MULTI_SELECT_INPUT => $this->lng()->txt(
"filter_type_" . ilBiblFieldFilterInterface::FILTER_TYPE_MULTI_SELECT_INPUT
),];
$si = new ilSelectInputGUI($this->lng()->txt("filter_type"), self::F_FILTER_TYPE);
Expand Down
16 changes: 8 additions & 8 deletions Modules/Bibliographic/classes/class.ilBibliographicDataSet.php
Expand Up @@ -120,11 +120,11 @@ protected function getTypes($a_entity, $a_version)
switch ($a_entity) {
case 'bibl':
return array(
"id" => "integer",
"title" => "text",
"id" => "integer",
"title" => "text",
"description" => "text",
"filename" => "text",
'is_online' => 'integer',
"filename" => "text",
'is_online' => 'integer',
);
default:
return array();
Expand Down Expand Up @@ -180,11 +180,11 @@ protected function _readData($a_entity, $a_ids)
if (ilObject::_lookupType($bibl_id) == 'bibl') {
$obj = new ilObjBibliographic($bibl_id);
$data = array(
'id' => $bibl_id,
'title' => $obj->getTitle(),
'id' => $bibl_id,
'title' => $obj->getTitle(),
'description' => $obj->getDescription(),
'fileName' => $obj->getFilename(),
'is_online' => $obj->getOnline(),
'fileName' => $obj->getFilename(),
'is_online' => $obj->getOnline(),
);
$this->data[] = $data;
}
Expand Down
Expand Up @@ -42,11 +42,11 @@ public function getValidSchemaVersions($a_entity)
{
return array(
'4.5.0' => array(
'namespace' => 'http://www.ilias.de/Modules/DataCollection/dcl/4_5',
'namespace' => 'http://www.ilias.de/Modules/DataCollection/dcl/4_5',
'xsd_file" => "ilias_dcl_4_5.xsd',
'uses_dataset' => true,
'min' => '4.5.0',
'max' => '',
'min' => '4.5.0',
'max' => '',
),
);
}
Expand Down
Expand Up @@ -31,9 +31,9 @@ public static function _getCommands()
$commands = array(
array(
"permission" => "read",
"cmd" => "render",
"lang_var" => "show",
"default" => true,
"cmd" => "render",
"lang_var" => "show",
"default" => true,
),
array("permission" => "write", "cmd" => "view", "lang_var" => "edit_content"),
array("permission" => "write", "cmd" => "edit", "lang_var" => "settings"),
Expand Down
Expand Up @@ -50,9 +50,9 @@ public function getProperties()
include_once("./Modules/Bibliographic/classes/class.ilObjBibliographicAccess.php");
if (!ilObjBibliographicAccess::_lookupOnline($this->obj_id)) {
$props[] = array(
"alert" => true,
"alert" => true,
"property" => $lng->txt("status"),
"value" => $lng->txt("offline"),
"value" => $lng->txt("offline"),
);
}

Expand Down
2 changes: 1 addition & 1 deletion Modules/Blog/classes/class.ilBlogPosting.php
Expand Up @@ -479,7 +479,7 @@ public function updateKeywords(array $keywords)

// language is not "used" anywhere
$ulang = $ilUser->getLanguage();
$keywords = array($ulang=>$keywords);
$keywords = array($ulang => $keywords);

include_once("./Services/MetaData/classes/class.ilMDKeyword.php");
ilMDKeyword::updateKeywords($this->getMDSection(), $keywords);
Expand Down
4 changes: 2 additions & 2 deletions Modules/Blog/classes/class.ilBlogPostingGUI.php
Expand Up @@ -907,8 +907,8 @@ protected static function parseImage($src_width, $src_height, $tgt_width, $tgt_h
$shrink_ratio = min($ratio_width, $ratio_height);

return array(
(int) round($src_width*$shrink_ratio),
(int) round($src_height*$shrink_ratio)
(int) round($src_width * $shrink_ratio),
(int) round($src_height * $shrink_ratio)
);
}

Expand Down
6 changes: 3 additions & 3 deletions Modules/Blog/classes/class.ilObjBlog.php
Expand Up @@ -38,7 +38,7 @@ public function __construct($a_id = 0, $a_reference = true)
protected $abstract_shorten_length = self::ABSTRACT_DEFAULT_SHORTEN_LENGTH; // [int]
protected $abstract_image = false; // [bool]
protected $abstract_image_width = self::ABSTRACT_DEFAULT_IMAGE_WIDTH; // [int]
protected $abstract_image_height= self::ABSTRACT_DEFAULT_IMAGE_HEIGHT; // [int]
protected $abstract_image_height = self::ABSTRACT_DEFAULT_IMAGE_HEIGHT; // [int]
protected $keywords = true; // [bool]
protected $nav_mode = self::NAV_MODE_LIST; // [int]
protected $nav_mode_list_postings = self::NAV_MODE_LIST_DEFAULT_POSTINGS; // [int]
Expand Down Expand Up @@ -833,7 +833,7 @@ public function getLocalContributorRole($a_node_id)
$rbacreview = $this->rbacreview;

foreach ($rbacreview->getLocalRoles($a_node_id) as $role_id) {
if (substr(ilObject::_lookupTitle($role_id), 0, 19) == "il_blog_contributor") {
if (substr(ilObject::_lookupTitle($role_id), 0, 19) == "il_blog_contributor") {
return $role_id;
}
}
Expand All @@ -844,7 +844,7 @@ public function getLocalEditorRole($a_node_id)
$rbacreview = $this->rbacreview;

foreach ($rbacreview->getLocalRoles($a_node_id) as $role_id) {
if (substr(ilObject::_lookupTitle($role_id), 0, 14) == "il_blog_editor") {
if (substr(ilObject::_lookupTitle($role_id), 0, 14) == "il_blog_editor") {
return $role_id;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Modules/Blog/classes/class.ilObjBlogAccess.php
Expand Up @@ -114,7 +114,7 @@ public function canBeDelivered(ilWACPath $ilWACPath)
}
// repository (RBAC)
else {
$ref_ids = ilObject::_getAllReferences($obj_id);
$ref_ids = ilObject::_getAllReferences($obj_id);
foreach ($ref_ids as $ref_id) {
if ($ilAccess->checkAccessOfUser($ilUser->getId(), "read", "view", $ref_id, "blog", $obj_id)) {
return true;
Expand Down
2 changes: 1 addition & 1 deletion Modules/Blog/classes/class.ilObjBlogAdministrationGUI.php
Expand Up @@ -205,7 +205,7 @@ protected function initFormSettings()
$ne = new ilNonEditableValueGUI($lng->txt("blog_allow_html"), "", true);
$this->ctrl->setParameter($gui, "ref_id", $gui->object->getRefId());
$link = $this->ctrl->getLinkTarget($gui);
$ne->setValue("<a href='$link'> >> ".$this->lng->txt("settings")."</a>");
$ne->setValue("<a href='$link'> >> " . $this->lng->txt("settings") . "</a>");
$form->addItem($ne);


Expand Down
18 changes: 9 additions & 9 deletions Modules/Blog/classes/class.ilObjBlogGUI.php
Expand Up @@ -479,7 +479,7 @@ protected function updateCustom(ilPropertyFormGUI $a_form)
} elseif ($value == $lng->txt("blog_keywords")) {
$order[$idx] = "keywords";
} else {
$order[$idx]= "authors";
$order[$idx] = "authors";
}
}
$this->object->setOrder($order);
Expand Down Expand Up @@ -781,7 +781,7 @@ public function executeCommand()
$rep_search->setTitle($this->lng->txt("blog_add_contributor"));
$rep_search->setCallback($this, 'addContributor', $this->object->getAllLocalRoles($this->node_id));
$this->ctrl->setReturn($this, 'contributors');
$ret =&$this->ctrl->forwardCommand($rep_search);
$ret = &$this->ctrl->forwardCommand($rep_search);
break;

case 'ilexportgui':
Expand Down Expand Up @@ -1141,7 +1141,7 @@ public function preview()
$list = $this->renderList($list_items, "previewFullscreen");
$nav = $this->renderNavigation($this->items, "preview", "previewFullscreen");
$this->renderToolbarNavigation($this->items);
$list.= $toolbar->getHTML();
$list .= $toolbar->getHTML();
}

$this->renderFullScreen($list, $nav);
Expand Down Expand Up @@ -2347,7 +2347,7 @@ public function getKeywords($a_show_inactive, $a_posting_id = null)
// #15881
$tmp = array();
foreach ($keywords as $keyword => $counter) {
$tmp[] = array("keyword"=>$keyword, "counter"=>$counter);
$tmp[] = array("keyword" => $keyword, "counter" => $counter);
}
$tmp = ilUtil::sortArray($tmp, "keyword", "ASC");

Expand Down Expand Up @@ -2987,11 +2987,11 @@ public function contributors()
$this,
$ilToolbar,
array(
'auto_complete_name' => $lng->txt('user'),
'submit_name' => $lng->txt('add'),
'add_search' => true,
'add_from_container' => $this->node_id,
'user_type' => $local_roles
'auto_complete_name' => $lng->txt('user'),
'submit_name' => $lng->txt('add'),
'add_search' => true,
'add_from_container' => $this->node_id,
'user_type' => $local_roles
),
true
);
Expand Down
18 changes: 9 additions & 9 deletions Modules/BookingManager/classes/class.ilBookCronNotification.php
Expand Up @@ -143,7 +143,7 @@ protected function sendNotifications()
// additional logging info, see #26216
$log->debug("pool id: "
. $p["booking_pool_id"]
. "(".ilObject::_lookupTitle($p["booking_pool_id"]).") "
. "(" . ilObject::_lookupTitle($p["booking_pool_id"]) . ") "
. ", "
. date("Y-m-d, H:i:s", $from_ts)
. " to " . date("Y-m-d, H:i:s", $to_ts));
Expand Down Expand Up @@ -213,25 +213,25 @@ protected function sendMails($notifications)

$txt = "";
if (is_array($n["personal"])) {
$txt.= "\n" . $lng->txt("book_your_reservations") . "\n";
$txt.= "-----------------------------------------\n";
$txt .= "\n" . $lng->txt("book_your_reservations") . "\n";
$txt .= "-----------------------------------------\n";
foreach ($n["personal"] as $obj_id => $reservs) {
$txt.= ilObject::_lookupTitle($obj_id) . ":\n";
$txt .= ilObject::_lookupTitle($obj_id) . ":\n";
foreach ($reservs as $r) {
$txt.= "- " . $r["title"] . " (" . $r["counter"] . "), " .
$txt .= "- " . $r["title"] . " (" . $r["counter"] . "), " .
ilDatePresentation::formatDate(new ilDate($r["date"], IL_CAL_DATE)) . ", " .
$r["slot"] . "\n";
}
}
}

if (is_array($n["admin"])) {
$txt.= "\n" . $lng->txt("book_reservation_overview") . "\n";
$txt.= "-----------------------------------------\n";
$txt .= "\n" . $lng->txt("book_reservation_overview") . "\n";
$txt .= "-----------------------------------------\n";
foreach ($n["admin"] as $obj_id => $reservs) {
$txt.= ilObject::_lookupTitle($obj_id) . ":\n";
$txt .= ilObject::_lookupTitle($obj_id) . ":\n";
foreach ($reservs as $r) {
$txt.= "- " . $r["title"] . " (" . $r["counter"] . "), " . $r["user_name"] . ", " .
$txt .= "- " . $r["title"] . " (" . $r["counter"] . "), " . $r["user_name"] . ", " .
ilDatePresentation::formatDate(new ilDate($r["date"], IL_CAL_DATE)) . ", " .
$r["slot"] . "\n";
}
Expand Down
Expand Up @@ -136,7 +136,7 @@ public function getItems()
'title' => $item['title'],
'description' => $item['description'],
'nr_items' => ilBookingReservation::numAvailableFromObjectNoSchedule($item['booking_object_id']) . '/' . $item['nr_items'],
'url_assign'=> $this->ctrl->getLinkTargetByClass("ilbookingobjectgui", 'book')
'url_assign' => $this->ctrl->getLinkTargetByClass("ilbookingobjectgui", 'book')
);
$this->ctrl->setParameterByClass('ilbookingobjectgui', 'bkusr', '');
$this->ctrl->setParameterByClass('ilbookingobjectgui', 'object_id', '');
Expand Down
4 changes: 2 additions & 2 deletions Modules/BookingManager/classes/class.ilBookingObject.php
Expand Up @@ -417,7 +417,7 @@ public function update()
return $ilDB->update(
'booking_object',
$fields,
array('booking_object_id'=>array('integer', $this->id))
array('booking_object_id' => array('integer', $this->id))
);
}

Expand All @@ -442,7 +442,7 @@ public static function getList($a_pool_id, $a_title = null)
' OR ' . $ilDB->like('description', 'text', '%' . $a_title . '%') . ')';
}

$sql .= ' ORDER BY title';
$sql .= ' ORDER BY title';

$set = $ilDB->query($sql);
$res = array();
Expand Down
Expand Up @@ -320,7 +320,7 @@ protected function fillRow($a_set)
}
}

$this->tpl->setVariable("VALUE_AVAIL", $a_set["nr_items"]-$cnt);
$this->tpl->setVariable("VALUE_AVAIL", $a_set["nr_items"] - $cnt);
$this->tpl->setVariable("VALUE_AVAIL_ALL", $a_set["nr_items"]);

if ($a_set["nr_items"] <= $cnt || ($this->overall_limit && $this->current_bookings && $this->current_bookings >= $this->overall_limit)) {
Expand Down
Expand Up @@ -116,10 +116,10 @@ public function render()
$this,
$this->toolbar,
array(
'auto_complete_name' => $this->lng->txt('user'),
'submit_name' => $this->lng->txt('add'),
'add_search' => true,
'add_from_container' => $this->ref_id
'auto_complete_name' => $this->lng->txt('user'),
'submit_name' => $this->lng->txt('add'),
'add_search' => true,
'add_from_container' => $this->ref_id
)
);

Expand Down
Expand Up @@ -92,7 +92,7 @@ public function initFilter()
$this->objects[$item["booking_object_id"]] = $item["title"];
}
$item = $this->addFilterItemByMetaType("object", ilTable2GUI::FILTER_SELECT);
$item->setOptions(array(""=>$this->lng->txt('book_all'))+$this->objects);
$item->setOptions(array("" => $this->lng->txt('book_all')) + $this->objects);
$this->filter["object"] = $item->getValue();

$title = $this->addFilterItemByMetaType(
Expand All @@ -105,7 +105,7 @@ public function initFilter()

//user
require_once("./Modules/BookingManager/classes/class.ilBookingParticipant.php");
$options = array(""=>$this->lng->txt('book_all'))+
$options = array("" => $this->lng->txt('book_all')) +
ilBookingParticipant::getUserFilter($this->pool_id);
$item = $this->addFilterItemByMetaType("user", ilTable2GUI::FILTER_SELECT);
$item->setOptions($options);
Expand Down

0 comments on commit 7564c31

Please sign in to comment.