Skip to content

Commit

Permalink
Dev: Code style from CS fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanJard committed Nov 12, 2024
1 parent 8f3926b commit 2cc648d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
6 changes: 3 additions & 3 deletions Editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,8 @@ public function process($data)
$debugInfo = &$this->_debugInfo;

$debugInfo[] = 'Editor PHP libraries - version ' . $this->version;
$this->_db->debug(function ($mess) use (&$debugInfo) {

$this->_db->debug(static function ($mess) use (&$debugInfo) {
$debugInfo[] = $mess;
});
}
Expand Down Expand Up @@ -994,7 +994,7 @@ private function _process($data)
'error' => '',
'fieldErrors' => [],
'ipOpts' => [],
'options' => []
'options' => [],
];

$action = Editor::action($data);
Expand Down
2 changes: 1 addition & 1 deletion Editor/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function __construct($dbField = null, $name = null)
private $_validator = [];

/** @var Upload|null */
private $_upload = null;
private $_upload;

Check failure on line 157 in Editor/Field.php

View workflow job for this annotation

GitHub Actions / Unit (latest, StaticAnalysis)

Property DataTables\Editor\Field::$_upload is never written, only read.

/** @var callable */
private $_xss;
Expand Down
23 changes: 11 additions & 12 deletions Editor/Join.php
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,9 @@ public function whereSet($_ = null)
/**
* Get data.
*
* @param Editor $editor Host Editor instance
* @param mixed[] $data Data from the parent table's get and were we need
* to add out output.
* @param Editor $editor Host Editor instance
* @param mixed[] $data Data from the parent table's get and were we need
* to add out output.
*
* @internal
*/
Expand Down Expand Up @@ -675,28 +675,27 @@ public function create($editor, $parentId, $data)
}

/**
* Get options for the fields in this join
* Get options for the fields in this join.
*
* @param array $options Array to write the read options into
* @param Database $db Database connection object
* @param bool $refresh Refresh indication flag
* @return void
* @param array $options Array to write the read options into
* @param Database $db Database connection object
* @param bool $refresh Refresh indication flag
*
* @internal
*/
public function options(&$options, $db, $refresh) {
public function options(&$options, $db, $refresh)
{
// Field options
foreach ($this->_fields as $field) {
$optsInst = $field->options();

if ($optsInst) {
$opts = $optsInst->exec($db, $refresh);

if ($opts !== false) {
if ($this->_type === 'object') {
$name = $this->name() . '.' . $field->name();
}
else {
} else {
$name = $this->name() . '[].' . $field->name();
}

Expand Down
4 changes: 2 additions & 2 deletions Editor/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class Options extends Ext
private $_manualAdd = [];

/** @var callable|null */
private $_customFn = null;
private $_customFn;

Check failure on line 104 in Editor/Options.php

View workflow job for this annotation

GitHub Actions / Unit (latest, StaticAnalysis)

Property DataTables\Editor\Options::$_customFn is never written, only read.

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Public methods
Expand Down Expand Up @@ -309,7 +309,7 @@ public function where($_ = null)
*
* @internal
*/
public function exec($db, $refresh, $search=null)
public function exec($db, $refresh, $search = null)
{
// If search only, and not a search action, then just return false
if ($this->searchOnly() && !$search) {
Expand Down

0 comments on commit 2cc648d

Please sign in to comment.