Automated native_function_invocation fixes
This commit is contained in:
1 parent
94b654175c
commit
eb88bb4c3a
62 files changed
+237
-237
No files matched your search
@@ -61,7 +61,7 @@ class WorksheetManager implements WorksheetManagerInterface
|
||||
*/
|
||||
public function startSheet(Worksheet $worksheet)
|
||||
{
|
||||
$sheetFilePointer = fopen($worksheet->getFilePath(), 'w');
|
||||
$sheetFilePointer = \fopen($worksheet->getFilePath(), 'w');
|
||||
$this->throwIfSheetFilePointerIsNotAvailable($sheetFilePointer);
|
||||
|
||||
$worksheet->setFilePointer($sheetFilePointer);
|
||||
@@ -134,7 +134,7 @@ class WorksheetManager implements WorksheetManagerInterface
|
||||
|
||||
$data .= '</table:table-row>';
|
||||
|
||||
$wasWriteSuccessful = fwrite($worksheet->getFilePointer(), $data);
|
||||
$wasWriteSuccessful = \fwrite($worksheet->getFilePointer(), $data);
|
||||
if ($wasWriteSuccessful === false) {
|
||||
throw new IOException("Unable to write data in {$worksheet->getFilePath()}");
|
||||
}
|
||||
@@ -190,7 +190,7 @@ class WorksheetManager implements WorksheetManagerInterface
|
||||
if ($cell->isString()) {
|
||||
$data .= ' office:value-type="string" calcext:value-type="string">';
|
||||
|
||||
$cellValueLines = explode("\n", $cell->getValue());
|
||||
$cellValueLines = \explode("\n", $cell->getValue());
|
||||
foreach ($cellValueLines as $cellValueLine) {
|
||||
$data .= '<text:p>' . $this->stringsEscaper->escape($cellValueLine) . '</text:p>';
|
||||
}
|
||||
@@ -207,7 +207,7 @@ class WorksheetManager implements WorksheetManagerInterface
|
||||
} elseif ($cell->isEmpty()) {
|
||||
$data .= '/>';
|
||||
} else {
|
||||
throw new InvalidArgumentException('Trying to add a value with an unsupported type: ' . gettype($cell->getValue()));
|
||||
throw new InvalidArgumentException('Trying to add a value with an unsupported type: ' . \gettype($cell->getValue()));
|
||||
}
|
||||
|
||||
return $data;
|
||||
@@ -223,10 +223,10 @@ class WorksheetManager implements WorksheetManagerInterface
|
||||
{
|
||||
$worksheetFilePointer = $worksheet->getFilePointer();
|
||||
|
||||
if (!is_resource($worksheetFilePointer)) {
|
||||
if (!\is_resource($worksheetFilePointer)) {
|
||||
return;
|
||||
}
|
||||
|
||||
fclose($worksheetFilePointer);
|
||||
\fclose($worksheetFilePointer);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user