Skip to content

Commit

Permalink
less strict typing
Browse files Browse the repository at this point in the history
  • Loading branch information
ahaskioglu-valiton committed Jun 13, 2024
1 parent ea35cea commit af6a33b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Classes/PHPExcel/Calculation/TextData.php
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ public static function PROPERCASE($mixedCaseString)
* @param string $newText String to replace in defined position
* @return string
*/
public static function REPLACE(string $oldText = '', int $start = 1, int $chars = null, string $newText = ''): string
public static function REPLACE($oldText = '', $start = 1, $chars = null, $newText = ''): string
{
$oldText = PHPExcel_Calculation_Functions::flattenSingleValue($oldText);
$start = PHPExcel_Calculation_Functions::flattenSingleValue($start);
Expand Down
8 changes: 4 additions & 4 deletions Classes/PHPExcel/NamedRange.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ class PHPExcel_NamedRange
/**
* Create a new NamedRange
*
* @param string|null $pName
* @param PHPExcel_Worksheet|null $pWorksheet
* @param string $pName
* @param PHPExcel_Worksheet $pWorksheet
* @param string $pRange
* @param bool $pLocalOnly
* @param PHPExcel_Worksheet|null $pScope Scope. Only applies when $pLocalOnly = true. Null for global scope.
* @throws PHPExcel_Exception
*/
public function __construct(string $pName = null, PHPExcel_Worksheet $pWorksheet = null, string $pRange = 'A1', bool $pLocalOnly = false, PHPExcel_Worksheet $pScope = null)
public function __construct($pName = null, PHPExcel_Worksheet $pWorksheet = null, $pRange = 'A1', $pLocalOnly = false, $pScope = null)
{
// Validate data
if (($pName === null) || ($pWorksheet === null) || ($pRange === null)) {
Expand Down Expand Up @@ -227,7 +227,7 @@ public function setScope(PHPExcel_Worksheet $value = null)
* @param PHPExcel_Worksheet|null $pSheet Scope. Use null for global scope
* @return PHPExcel_NamedRange|null
*/
public static function resolveRange(string $pNamedRange = '', PHPExcel_Worksheet $pSheet = null): ?PHPExcel_NamedRange
public static function resolveRange($pNamedRange = '', PHPExcel_Worksheet $pSheet = null): ?PHPExcel_NamedRange
{
if ($pSheet === null) {
return null;
Expand Down
6 changes: 3 additions & 3 deletions Classes/PHPExcel/Shared/Drawing.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public static function EMUToPixels($pValue = 0)
* @param PHPExcel_Style_Font|null $pDefaultFont Default font of the workbook
* @return float|int Value in cell dimension
*/
public static function pixelsToCellDimension(int $pValue = 0, PHPExcel_Style_Font $pDefaultFont = null): float|int
public static function pixelsToCellDimension($pValue = 0, PHPExcel_Style_Font $pDefaultFont = null): float|int
{
// Font name and size
$name = $pDefaultFont ? $pDefaultFont->getName() : 'Calibri';
Expand All @@ -91,11 +91,11 @@ public static function pixelsToCellDimension(int $pValue = 0, PHPExcel_Style_Fon
/**
* Convert column width from (intrinsic) Excel units to pixels
*
* @param float|int $pValue Value in cell dimension
* @param float $pValue Value in cell dimension
* @param PHPExcel_Style_Font|null $pDefaultFont Default font of the workbook
* @return int Value in pixels
*/
public static function cellDimensionToPixels(float|int $pValue = 0, PHPExcel_Style_Font $pDefaultFont = null): int
public static function cellDimensionToPixels($pValue = 0, PHPExcel_Style_Font $pDefaultFont = null): int
{
// Font name and size
$name = $pDefaultFont ? $pDefaultFont->getName() : 'Calibri';
Expand Down
4 changes: 2 additions & 2 deletions Classes/PHPExcel/Worksheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,7 @@ public function getConditionalStylesCollection()
* @param $pValue PHPExcel_Style_Conditional[]
* @return PHPExcel_Worksheet
*/
public function setConditionalStyles(string $pCoordinate = 'A1', array $pValue = [])
public function setConditionalStyles($pCoordinate = 'A1', $pValue = [])
{
$this->conditionalStylesCollection[strtoupper($pCoordinate)] = $pValue;
return $this;
Expand All @@ -1489,7 +1489,7 @@ public function setConditionalStyles(string $pCoordinate = 'A1', array $pValue =
* @param int|null $pRow2 Numeric row coordinate of the range cell
* @return PHPExcel_Style
*/
public function getStyleByColumnAndRow(int $pColumn = 0, int $pRow = 1, int $pColumn2 = null, int $pRow2 = null): PHPExcel_Style
public function getStyleByColumnAndRow($pColumn = 0, $pRow = 1, $pColumn2 = null, $pRow2 = null): PHPExcel_Style
{
if (!is_null($pColumn2) && !is_null($pRow2)) {
$cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow . ':' . PHPExcel_Cell::stringFromColumnIndex($pColumn2) . $pRow2;
Expand Down
4 changes: 2 additions & 2 deletions Classes/PHPExcel/Writer/Excel5/Workbook.php
Original file line number Diff line number Diff line change
Expand Up @@ -825,12 +825,12 @@ private function writeDefinedNameBiff8($name, $formulaData, $sheetIndex = 0, $is
* Write a short NAME record
*
* @param string $name
* @param int|string $sheetIndex 1-based sheet index the defined name applies to. 0 = global
* @param string $sheetIndex 1-based sheet index the defined name applies to. 0 = global
* @param integer[][] $rangeBounds range boundaries
* @param boolean $isHidden
* @return string Complete binary record data
* */
private function writeShortNameBiff8(string $name = '', int|string $sheetIndex = 0, array $rangeBounds = [], bool $isHidden = false): string
private function writeShortNameBiff8($name = '', $sheetIndex = 0, $rangeBounds = [], $isHidden = false): string
{
$record = 0x0018;

Expand Down

0 comments on commit af6a33b

Please sign in to comment.