Skip to content

Commit

Permalink
add type hint to properties; use SystemAxception
Browse files Browse the repository at this point in the history
  • Loading branch information
mjauvin committed Oct 17, 2023
1 parent 49c22f1 commit 930b000
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions modules/backend/formwidgets/RelationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Backend\FormWidgets;

use ApplicationException;
use SystemException;
use Backend\Classes\FormField;
use Backend\Classes\FormWidgetBase;
use Lang;
Expand All @@ -17,22 +17,22 @@ class RelationManager extends FormWidgetBase
/**
* @var bool Disables the ability to add, update, delete or create relations.
*/
protected $readOnly;
protected bool $readOnly;

/**
* @var string path to controller action to open a record.
*/
protected $recordUrl;
protected string $recordUrl;

/**
* @var string custom JavaScript code to execute when clicking on a record.
*/
protected $recordOnClick;
protected string $recordOnClick;

/**
* @var string relation name if different from the field name.
*/
protected $relation;
protected string $relation;

public function init(): void
{
Expand All @@ -55,7 +55,7 @@ public function render()
'field' => $this->formField->fieldName,
'controller' => get_class($this->controller),
]);
throw new ApplicationException($error);
throw new SystemException($error);
}

$options = [
Expand Down

0 comments on commit 930b000

Please sign in to comment.