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
@@ -45,8 +45,8 @@ class SheetManager
|
||||
*/
|
||||
public function throwIfNameIsInvalid($name, Sheet $sheet)
|
||||
{
|
||||
if (!is_string($name)) {
|
||||
$actualType = gettype($name);
|
||||
if (!\is_string($name)) {
|
||||
$actualType = \gettype($name);
|
||||
$errorMessage = "The sheet's name is invalid. It must be a string ($actualType given).";
|
||||
throw new InvalidSheetNameException($errorMessage);
|
||||
}
|
||||
@@ -74,9 +74,9 @@ class SheetManager
|
||||
}
|
||||
}
|
||||
|
||||
if (count($failedRequirements) !== 0) {
|
||||
if (\count($failedRequirements) !== 0) {
|
||||
$errorMessage = "The sheet's name (\"$name\") is invalid. It did not respect these rules:\n - ";
|
||||
$errorMessage .= implode("\n - ", $failedRequirements);
|
||||
$errorMessage .= \implode("\n - ", $failedRequirements);
|
||||
throw new InvalidSheetNameException($errorMessage);
|
||||
}
|
||||
}
|
||||
@@ -90,7 +90,7 @@ class SheetManager
|
||||
*/
|
||||
private function doesContainInvalidCharacters($name)
|
||||
{
|
||||
return (str_replace(self::$INVALID_CHARACTERS_IN_SHEET_NAME, '', $name) !== $name);
|
||||
return (\str_replace(self::$INVALID_CHARACTERS_IN_SHEET_NAME, '', $name) !== $name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -80,7 +80,7 @@ class StyleManager implements StyleManagerInterface
|
||||
return $cellStyle;
|
||||
}
|
||||
|
||||
if ($cell->isString() && strpos($cell->getValue(), "\n") !== false) {
|
||||
if ($cell->isString() && \strpos($cell->getValue(), "\n") !== false) {
|
||||
$cellStyle->setShouldWrapText();
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class StyleRegistry
|
||||
$serializedStyle = $this->serialize($style);
|
||||
|
||||
if (!$this->hasStyleAlreadyBeenRegistered($style)) {
|
||||
$nextStyleId = count($this->serializedStyleToStyleIdMappingTable);
|
||||
$nextStyleId = \count($this->serializedStyleToStyleIdMappingTable);
|
||||
$style->setId($nextStyleId);
|
||||
|
||||
$this->serializedStyleToStyleIdMappingTable[$serializedStyle] = $nextStyleId;
|
||||
@@ -79,7 +79,7 @@ class StyleRegistry
|
||||
*/
|
||||
public function getRegisteredStyles()
|
||||
{
|
||||
return array_values($this->styleIdToStyleMappingTable);
|
||||
return \array_values($this->styleIdToStyleMappingTable);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -105,7 +105,7 @@ class StyleRegistry
|
||||
$currentId = $style->getId();
|
||||
$style->setId(0);
|
||||
|
||||
$serializedStyle = serialize($style);
|
||||
$serializedStyle = \serialize($style);
|
||||
|
||||
$style->setId($currentId);
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ abstract class WorkbookManagerAbstract implements WorkbookManagerInterface
|
||||
{
|
||||
$worksheets = $this->getWorksheets();
|
||||
|
||||
$newSheetIndex = count($worksheets);
|
||||
$newSheetIndex = \count($worksheets);
|
||||
$sheetManager = $this->managerFactory->createSheetManager();
|
||||
$sheet = $this->entityFactory->createSheet($newSheetIndex, $this->workbook->getInternalId(), $sheetManager);
|
||||
|
||||
@@ -260,7 +260,7 @@ abstract class WorkbookManagerAbstract implements WorkbookManagerInterface
|
||||
// update max num columns for the worksheet
|
||||
$currentMaxNumColumns = $worksheet->getMaxNumColumns();
|
||||
$cellsCount = $row->getNumCells();
|
||||
$worksheet->setMaxNumColumns(max($currentMaxNumColumns, $cellsCount));
|
||||
$worksheet->setMaxNumColumns(\max($currentMaxNumColumns, $cellsCount));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user