Skip to content

Commit

Permalink
Update constructor usage of call_user_func_array
Browse files Browse the repository at this point in the history
Ignore phpcompat errors as they do not impact us in this case
Also do not return the alue of the `call_user_func_array`, but return a
void value.

Fixes #104
  • Loading branch information
andrewnicols committed Aug 20, 2024
1 parent c8d4e35 commit e7c7d5c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Html2Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ public function __construct($html = '', $options = array())

// for backwards compatibility
if (!is_array($options)) {
return call_user_func_array(array($this, 'legacyConstruct'), func_get_args());
// phpcs:ignore (PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
call_user_func_array(array($this, 'legacyConstruct'), func_get_args());
return;
}

$this->html = $html;
Expand Down

0 comments on commit e7c7d5c

Please sign in to comment.