Fix phpstan level 6
[MAILPOET-1969]
This commit is contained in:
@@ -51,12 +51,14 @@ if (!class_exists('ProgressBar', false)) {
|
||||
* @return array|false Array of counters
|
||||
*/
|
||||
private function readProgress() {
|
||||
if (file_exists($this->filename)) {
|
||||
$json_content = file_get_contents($this->filename);
|
||||
return json_decode($json_content);
|
||||
} else {
|
||||
if (!file_exists($this->filename)) {
|
||||
return false;
|
||||
}
|
||||
$json_content = file_get_contents($this->filename);
|
||||
if (is_string($json_content)) {
|
||||
return json_decode($json_content);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -37,7 +37,10 @@ class Engine
|
||||
|
||||
public function executeOne($check, $val, $params=array())
|
||||
{
|
||||
return call_user_func(__NAMESPACE__ .'\Engine::'.$check, $val, $params);
|
||||
$callback = __NAMESPACE__ .'\Engine::'.$check;
|
||||
if (is_callable($callback)) {
|
||||
return call_user_func($callback, $val, $params);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -201,7 +201,7 @@ class XLSXWriter
|
||||
$max_cell_tag = '<dimension ref="A1:' . $max_cell . '"/>';
|
||||
$padding_length = $sheet->max_cell_tag_end - $sheet->max_cell_tag_start - strlen($max_cell_tag);
|
||||
$sheet->file_writer->fseek($sheet->max_cell_tag_start);
|
||||
$sheet->file_writer->write($max_cell_tag.str_repeat(" ", $padding_length));
|
||||
$sheet->file_writer->write($max_cell_tag . str_repeat(" ", (int)$padding_length));
|
||||
$sheet->file_writer->close();
|
||||
$sheet->finalized=true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user