Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
fix(void): remove void return type due compatability issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Constantine Karnaukhov committed Oct 26, 2018
1 parent bd4d57a commit 747510a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions src/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function getAuditTypeId() {
* Set custom audit type id
* @param string $auditTypeId
*/
public function setAuditTypeId($auditTypeId): void {
public function setAuditTypeId($auditTypeId) {
$this->auditTypeId = $auditTypeId;
}

Expand All @@ -41,15 +41,15 @@ public function getItemId() {
* Set item id
* @param string $itemId
*/
public function setItemId($itemId): void {
public function setItemId($itemId) {
$this->itemId = $itemId;
}

/**
* Add message to event log
* @param string | array $message log message string or array with fields to pass into CEventLog::Add
*/
public function log($message): void {
public function log($message) {
$defaults = [
'SEVERITY' => 'INFO',
'AUDIT_TYPE_ID' => $this->auditTypeId,
Expand All @@ -61,30 +61,30 @@ public function log($message): void {
CEventLog::Add(array_merge($defaults, $message, ['MODULE_ID' => $this->moduleId]));
}

public function info($message): void {
public function info($message) {
$this->log($message);
}

public function debug($message): void {
public function debug($message) {
$this->log([
'SEVERITY' => 'DEBUG',
'DESCRIPTION' => $message,
]);
}

public function warning($message): void {
public function warning($message) {
$message = $this->logMessToArray($message);

$this->log(array_merge(['SEVERITY' => 'WARNING'], $message));
}

public function error($message): void {
public function error($message) {
$message = $this->logMessToArray($message);

$this->log(array_merge(['SEVERITY' => 'ERROR'], $message));
}

public function security($message): void {
public function security($message) {
$message = $this->logMessToArray($message);

$this->log(array_merge(['SEVERITY' => 'SECURITY'], $message));
Expand Down
6 changes: 3 additions & 3 deletions src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function getVersion() {
* Set module version
* @param string $MODULE_VERSION
*/
public function setVersion($MODULE_VERSION): void {
public function setVersion($MODULE_VERSION) {
$this->MODULE_VERSION = $MODULE_VERSION;
}

Expand All @@ -66,11 +66,11 @@ public function getVersionDate() {
* Set module version date
* @param string $MODULE_VERSION_DATE
*/
public function setVersionDate($MODULE_VERSION_DATE): void {
public function setVersionDate($MODULE_VERSION_DATE) {
$this->MODULE_VERSION_DATE = $MODULE_VERSION_DATE;
}

public function showOptionsForm(): void {
public function showOptionsForm() {
$form = new Options\Form($this->options);
$form->handleRequest();
$form->write();
Expand Down
10 changes: 5 additions & 5 deletions src/Options/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ public function __construct($moduleId) {
$this->moduleId = $moduleId;
}

public function addOption($key, array $option): void {
public function addOption($key, array $option) {
$this->optionFields[$key] = $option;
}

public function addOptions(array $options): void {
public function addOptions(array $options) {
foreach ($options as $key => $option) {
$this->addOption($key, $option);
}
}

public function addTab($key, array $tab): void {
public function addTab($key, array $tab) {
$this->optionTabs[] = array_merge($tab, ['DIV' => $key]);
}

public function addTabs(array $tabs): void {
public function addTabs(array $tabs) {
foreach ($tabs as $key => $tab) {
$this->addTab($key, $tab);
}
}

private function loadOptionValues(): void {
private function loadOptionValues() {
$this->optionValues = array_merge(
Option::getDefaults($this->moduleId),
Option::getForModule($this->moduleId)
Expand Down

0 comments on commit 747510a

Please sign in to comment.