-
Notifications
You must be signed in to change notification settings - Fork 111
Fix hook trait usage #986
Copy link
Copy link
Closed
Description
Fix these once atk4/core#133 is merged:
Regex:
(?<! \$this)(?<! \$m)->(?:onHook|hook)\s*\(
Code to be fixed:
ui/src/ActionExecutor/Basic.php
Line 153 in 80b86da
return ($this->hook('afterExecute', [$return]) ?: $success) ?: new jsToast('Success'.(is_string($return) ? (': '.$return) : '')); - return is indexed differently
ui/src/ActionExecutor/jsEvent.php
Line 144 in 80b86da
$js = $this->hook('afterExecute', [$return, $id]) ?: $success ?: new jsToast('Success'.(is_string($return) ? (': '.$return) : '')); - return is indexed differently
ui/src/ActionExecutor/jsUserAction.php
Line 93 in 80b86da
$js = $this->hook('afterExecute', [$return, $id]) ?: $success ?: new jsToast('Success'.(is_string($return) ? (': '.$return) : '')); - return is indexed differently
Line 283 in 80b86da
return $this->hook('displayError', [$fieldName, $str]); - return is indexed differently
Line 308 in 80b86da
return $this->hook('displaySuccess', [$success, $sub_header]); - return is indexed differently
Line 620 in 80b86da
return $response; - return is indexed differently
ui/src/TableColumn/Generic.php
Line 308 in 80b86da
return $tag[0]; - DONE/FIXED: use
reset()instead of[0]
- DONE/FIXED: use
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels