Merge remote-tracking branch 'origin/master'

This commit is contained in:
MarkBaker 2019-07-25 19:39:23 +02:00
commit 7502320ce3
92 changed files with 704 additions and 1233 deletions

View File

@ -56,7 +56,7 @@ return PhpCsFixer\Config::create()
'is_null' => ['use_yoda_style' => false], 'is_null' => ['use_yoda_style' => false],
'linebreak_after_opening_tag' => true, 'linebreak_after_opening_tag' => true,
'line_ending' => true, 'line_ending' => true,
'list_syntax' => ['syntax' => 'long'], // Stay compatiblew with PHP 5.6 'list_syntax' => ['syntax' => 'short'],
'lowercase_cast' => true, 'lowercase_cast' => true,
'lowercase_constants' => true, 'lowercase_constants' => true,
'lowercase_keywords' => true, 'lowercase_keywords' => true,
@ -172,7 +172,7 @@ return PhpCsFixer\Config::create()
'switch_case_semicolon_to_colon' => true, 'switch_case_semicolon_to_colon' => true,
'switch_case_space' => true, 'switch_case_space' => true,
'ternary_operator_spaces' => true, 'ternary_operator_spaces' => true,
'ternary_to_null_coalescing' => false, // Cannot use that with PHP 5.6 'ternary_to_null_coalescing' => true,
'trailing_comma_in_multiline_array' => true, 'trailing_comma_in_multiline_array' => true,
'trim_array_spaces' => true, 'trim_array_spaces' => true,
'unary_operator_spaces' => true, 'unary_operator_spaces' => true,

View File

@ -2,16 +2,15 @@ language: php
dist: trusty dist: trusty
php: php:
- 5.6
- 7.0
- 7.1 - 7.1
- 7.2 - 7.2
- 7.3 - 7.3
- 7.4snapshot
matrix: matrix:
fast_finish: true fast_finish: true
allow_failures: allow_failures:
- php: 5.6 - php: 7.4snapshot
cache: cache:
directories: directories:

View File

@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
- Fix number format masks containing named colours that were being misinterpreted as date formats; and add support for masks that fully replace the value with a full text string [Issue #1009](https://github.com/PHPOffice/PhpSpreadsheet/issues/1009) - Fix number format masks containing named colours that were being misinterpreted as date formats; and add support for masks that fully replace the value with a full text string [Issue #1009](https://github.com/PHPOffice/PhpSpreadsheet/issues/1009)
- Stricter-typed comparison testing in COUNTIF() and COUNTIFS() evaluation [Issue #1046](https://github.com/PHPOffice/PhpSpreadsheet/issues/1046) - Stricter-typed comparison testing in COUNTIF() and COUNTIFS() evaluation [Issue #1046](https://github.com/PHPOffice/PhpSpreadsheet/issues/1046)
- COUPNUM should not return zero when settlement is in the last period - [Issue #1020](https://github.com/PHPOffice/PhpSpreadsheet/issues/1020) and [PR #1021](https://github.com/PHPOffice/PhpSpreadsheet/pull/1021) - COUPNUM should not return zero when settlement is in the last period - [Issue #1020](https://github.com/PHPOffice/PhpSpreadsheet/issues/1020) and [PR #1021](https://github.com/PHPOffice/PhpSpreadsheet/pull/1021)
- Fix handling of named ranges referencing sheets with spaces or "!" in their title
## [1.8.2] - 2019-07-08 ## [1.8.2] - 2019-07-08

View File

@ -35,11 +35,11 @@
"php-cs-fixer fix --ansi" "php-cs-fixer fix --ansi"
], ],
"versions": [ "versions": [
"phpcs --report-width=200 samples/ src/ tests/ --ignore=samples/Header.php --standard=PHPCompatibility --runtime-set testVersion 5.6- -n" "phpcs --report-width=200 samples/ src/ tests/ --ignore=samples/Header.php --standard=PHPCompatibility --runtime-set testVersion 7.1- -n"
] ]
}, },
"require": { "require": {
"php": "^5.6|^7.0", "php": "^7.1",
"ext-ctype": "*", "ext-ctype": "*",
"ext-dom": "*", "ext-dom": "*",
"ext-gd": "*", "ext-gd": "*",
@ -59,14 +59,13 @@
}, },
"require-dev": { "require-dev": {
"tecnickcom/tcpdf": "^6.2", "tecnickcom/tcpdf": "^6.2",
"phpunit/phpunit": "^5.7",
"doctrine/instantiator": "^1.0.0",
"dompdf/dompdf": "^0.8.0", "dompdf/dompdf": "^0.8.0",
"mpdf/mpdf": "^7.0.0", "mpdf/mpdf": "^7.0.0",
"jpgraph/jpgraph": "^4.0", "jpgraph/jpgraph": "^4.0",
"friendsofphp/php-cs-fixer": "@stable", "friendsofphp/php-cs-fixer": "@stable",
"phpcompatibility/php-compatibility": "^8.0", "phpcompatibility/php-compatibility": "^8.0",
"squizlabs/php_codesniffer": "^3.3" "squizlabs/php_codesniffer": "^3.3",
"phpunit/phpunit": "^7.5"
}, },
"suggest": { "suggest": {
"mpdf/mpdf": "Option for rendering PDF with PDF Writer", "mpdf/mpdf": "Option for rendering PDF with PDF Writer",
@ -84,4 +83,4 @@
"PhpOffice\\PhpSpreadsheetTests\\": "tests/PhpSpreadsheetTests" "PhpOffice\\PhpSpreadsheetTests\\": "tests/PhpSpreadsheetTests"
} }
} }
} }

712
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram MajorVersion="1" MinorVersion="1">
<Font Name="Tahoma" Size="8.25" />
<Class Name="ClassDiagrams.PHPExcel" Collapsed="true">
<Position X="3.5" Y="0.5" Width="1.5" />
<TypeIdentifier>
<FileName>Classes\PHPExcel.cs</FileName>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAA=</HashCode>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="Worksheets" />
</ShowAsAssociation>
</Class>
<Class Name="ClassDiagrams.Worksheet" Collapsed="true">
<Position X="0.5" Y="0.5" Width="1.5" />
<TypeIdentifier>
<FileName>Classes\Worksheet.cs</FileName>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
</TypeIdentifier>
</Class>
<Interface Name="ClassDiagrams.PHPExcel_Reader_IReader" Collapsed="true">
<Position X="2.25" Y="2.5" Width="2" />
<TypeIdentifier>
<FileName>Classes\IReader.cs</FileName>
<HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="reads" />
</ShowAsAssociation>
<AssociationLine Name="reads" Type="ClassDiagrams.PHPExcel">
<MemberNameLabel ManuallyPlaced="true" ManuallySized="true">
<Position X="0.152" Y="1.279" Height="0.16" Width="0.597" />
</MemberNameLabel>
</AssociationLine>
</Interface>
<Interface Name="ClassDiagrams.PHPExcel_Writer_IWriter" Collapsed="true">
<Position X="4.5" Y="2.5" Width="2" />
<TypeIdentifier>
<FileName>Classes\IWriter.cs</FileName>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="writes" />
</ShowAsAssociation>
<AssociationLine Name="writes" Type="ClassDiagrams.PHPExcel">
<MemberNameLabel ManuallyPlaced="true" ManuallySized="true">
<Position X="-1.002" Y="1.298" Height="0.16" Width="0.764" />
</MemberNameLabel>
</AssociationLine>
</Interface>
</ClassDiagram>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@ -1,64 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{CC8CD7D2-8EFF-48E5-A17A-C1C482744D31}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ClassDiagrams</RootNamespace>
<AssemblyName>ClassDiagrams</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>2.0</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<None Include="Architecture.cd" />
<None Include="ReaderWriter.cd" />
</ItemGroup>
<ItemGroup>
<Compile Include="Classes\IReader.cs" />
<Compile Include="Classes\IWriter.cs" />
<Compile Include="Classes\PHPExcel_IOFactory.cs" />
<Compile Include="Classes\Worksheet.cs" />
<Compile Include="Classes\PHPExcel.cs" />
<Compile Include="Classes\PHPExcel_Reader_Excel2007.cs" />
<Compile Include="Classes\PHPExcel_Reader_Serialized.cs" />
<Compile Include="Classes\PHPExcel_Writer_Excel2007.cs" />
<Compile Include="Classes\PHPExcel_Writer_Serialized.cs" />
<Compile Include="Classes\PHPExcel_Reader_Excel5.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Exports\Architecture.png" />
<Content Include="Exports\ReaderWriter.png" />
</ItemGroup>
</Project>

View File

@ -1,5 +0,0 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
</Project>

View File

@ -1,20 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassDiagrams", "ClassDiagrams.csproj", "{CC8CD7D2-8EFF-48E5-A17A-C1C482744D31}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CC8CD7D2-8EFF-48E5-A17A-C1C482744D31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC8CD7D2-8EFF-48E5-A17A-C1C482744D31}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC8CD7D2-8EFF-48E5-A17A-C1C482744D31}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CC8CD7D2-8EFF-48E5-A17A-C1C482744D31}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public interface PHPExcel_Reader_IReader
{
PHPExcel reads
{
get;
set;
}
}
}

View File

@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public interface PHPExcel_Writer_IWriter
{
PHPExcel writes
{
get;
set;
}
}
}

View File

@ -1,40 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public class PHPExcel
{
/// <remarks></remarks>
public Worksheet Worksheets
{
get
{
throw new System.NotImplementedException();
}
set
{
}
}
}
public class PHPExcel_Writer_PDF : PHPExcel_Writer_IWriter
{
#region PHPExcel_Writer_IWriter Members
public PHPExcel writes
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
}

View File

@ -1,41 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public class PHPExcel_IOFactory
{
public PHPExcel_Reader_IReader createsReader
{
get
{
throw new System.NotImplementedException();
}
set
{
}
}
public PHPExcel_Writer_IWriter createsWriter
{
get
{
throw new System.NotImplementedException();
}
set
{
}
}
public PHPExcel_Writer_IWriter createWriter()
{
throw new System.NotImplementedException();
}
public PHPExcel_Reader_IReader createReader()
{
throw new System.NotImplementedException();
}
}
}

View File

@ -1,25 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public class PHPExcel_Reader_Excel2007 : PHPExcel_Reader_IReader
{
#region IReader Members
public PHPExcel reads
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
}

View File

@ -1,63 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public class PHPExcel_Reader_Excel5 : PHPExcel_Reader_IReader
{
#region PHPExcel_Writer_IReader Members
public PHPExcel reads
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
public class PHPExcel_Reader_Excel2003XML : PHPExcel_Reader_IReader
{
#region PHPExcel_Writer_IReader Members
public PHPExcel reads
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
public class PHPExcel_Reader_SYLK : PHPExcel_Reader_IReader
{
#region PHPExcel_Writer_IReader Members
public PHPExcel reads
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
}

View File

@ -1,44 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public class PHPExcel_Reader_Serialized : PHPExcel_Reader_IReader
{
#region IReader Members
public PHPExcel reads
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
public class PHPExcel_Reader_CSV : PHPExcel_Reader_IReader
{
#region IReader Members
public PHPExcel reads
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
}

View File

@ -1,25 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public class PHPExcel_Writer_Excel2007 : PHPExcel_Writer_IWriter
{
#region IWriter Members
public PHPExcel writes
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
}

View File

@ -1,82 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public class PHPExcel_Writer_Serialized : PHPExcel_Writer_IWriter
{
#region IWriter Members
public PHPExcel writes
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
public class PHPExcel_Writer_CSV : PHPExcel_Writer_IWriter
{
#region IWriter Members
public PHPExcel writes
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
public class PHPExcel_Writer_Excel5 : PHPExcel_Writer_IWriter
{
#region IWriter Members
public PHPExcel writes
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
public class PHPExcel_Writer_HTML : PHPExcel_Writer_IWriter
{
#region IWriter Members
public PHPExcel writes
{
get
{
throw new Exception("The method or operation is not implemented.");
}
set
{
throw new Exception("The method or operation is not implemented.");
}
}
#endregion
}
}

View File

@ -1,14 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ClassDiagrams
{
public class Worksheet
{
}
public class CopyOfWorksheet
{
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

View File

@ -1,135 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram MajorVersion="1" MinorVersion="1">
<Class Name="ClassDiagrams.PHPExcel_Reader_Excel2007" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="0.5" Y="3.5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Reader_Excel2007.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Writer_Excel2007" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="3.5" Y="3.5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Writer_Excel2007.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Reader_Serialized" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="0.5" Y="4.25" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Reader_Serialized.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Writer_Serialized" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="3.5" Y="4.25" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Writer_Serialized.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Reader_CSV" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="0.5" Y="5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Reader_Serialized.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Writer_CSV" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="3.5" Y="5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Writer_Serialized.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Writer_Excel5" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="3.5" Y="5.75" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Writer_Serialized.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Writer_HTML" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="3.5" Y="6.5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Writer_Serialized.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Reader_Excel5" Collapsed="true">
<Position X="0.5" Y="5.75" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Reader_Excel5.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Writer_PDF" Collapsed="true">
<Position X="3.5" Y="7.25" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_IOFactory">
<Position X="2" Y="0.5" Width="2.25" />
<AssociationLine Name="createsReader" Type="ClassDiagrams.PHPExcel_Reader_IReader">
<MemberNameLabel ManuallyPlaced="true">
<Position X="0.11" Y="0.06" />
</MemberNameLabel>
</AssociationLine>
<AssociationLine Name="createsWriter" Type="ClassDiagrams.PHPExcel_Writer_IWriter">
<MemberNameLabel ManuallyPlaced="true">
<Position X="-1.088" Y="0.081" />
</MemberNameLabel>
</AssociationLine>
<TypeIdentifier>
<HashCode>AIAAAAAAAAEAAAAAAQAAAAAAAAAAAAAAAAABAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_IOFactory.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="createsReader" />
<Property Name="createsWriter" />
</ShowAsAssociation>
</Class>
<Class Name="ClassDiagrams.PHPExcel_Reader_Excel2003XML" Collapsed="true">
<Position X="0.5" Y="6.5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Reader_Excel5.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="ClassDiagrams.PHPExcel_Reader_SYLK" Collapsed="true">
<Position X="0.5" Y="7.25" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Classes\PHPExcel_Reader_Excel5.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Interface Name="ClassDiagrams.PHPExcel_Writer_IWriter" Collapsed="true">
<Position X="3.5" Y="2.5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
<FileName>Classes\IWriter.cs</FileName>
</TypeIdentifier>
</Interface>
<Interface Name="ClassDiagrams.PHPExcel_Reader_IReader" Collapsed="true">
<Position X="0.5" Y="2.5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Classes\IReader.cs</FileName>
</TypeIdentifier>
</Interface>
<Font Name="Tahoma" Size="8.25" />
</ClassDiagram>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

View File

@ -25,12 +25,9 @@ spreadsheet file formats, like Excel and LibreOffice Calc.
## Software requirements ## Software requirements
The following software is required to develop using PhpSpreadsheet: PHP version 7.1 or newer to develop using PhpSpreadsheet. Other requirements, such as PHP extensions, are enforced by
composer. See the `require` section of [the composer.json file](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/composer.json)
- PHP version 5.6 or newer for details.
- PHP extension php\_zip enabled
- PHP extension php\_xml enabled
- PHP extension php\_gd2 enabled (if not compiled in)
### PHP version support ### PHP version support

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./tests/bootstrap.php" <phpunit
backupGlobals="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.5/phpunit.xsd"
syntaxCheck="true" bootstrap="./tests/bootstrap.php"
disallowTestOutput="true"> backupGlobals="true"
colors="true">
<php> <php>
<ini name="memory_limit" value="2048M"/> <ini name="memory_limit" value="2048M"/>
</php> </php>

View File

@ -3,7 +3,7 @@
require_once 'Header.php'; require_once 'Header.php';
$requirements = [ $requirements = [
'PHP 5.6.0' => version_compare(PHP_VERSION, '5.6.0', '>='), 'PHP 7.1.0' => version_compare(PHP_VERSION, '7.1.0', '>='),
'PHP extension XML' => extension_loaded('xml'), 'PHP extension XML' => extension_loaded('xml'),
'PHP extension xmlwriter' => extension_loaded('xmlwriter'), 'PHP extension xmlwriter' => extension_loaded('xmlwriter'),
'PHP extension mbstring' => extension_loaded('mbstring'), 'PHP extension mbstring' => extension_loaded('mbstring'),

View File

@ -2416,7 +2416,7 @@ class Calculation
// Identify our locale and language // Identify our locale and language
$language = $locale = strtolower($locale); $language = $locale = strtolower($locale);
if (strpos($locale, '_') !== false) { if (strpos($locale, '_') !== false) {
list($language) = explode('_', $locale); [$language] = explode('_', $locale);
} }
if (count(self::$validLocaleLanguages) == 1) { if (count(self::$validLocaleLanguages) == 1) {
self::loadLocales(); self::loadLocales();
@ -2441,9 +2441,9 @@ class Calculation
// Retrieve the list of locale or language specific function names // Retrieve the list of locale or language specific function names
$localeFunctions = file($functionNamesFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); $localeFunctions = file($functionNamesFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
foreach ($localeFunctions as $localeFunction) { foreach ($localeFunctions as $localeFunction) {
list($localeFunction) = explode('##', $localeFunction); // Strip out comments [$localeFunction] = explode('##', $localeFunction); // Strip out comments
if (strpos($localeFunction, '=') !== false) { if (strpos($localeFunction, '=') !== false) {
list($fName, $lfName) = explode('=', $localeFunction); [$fName, $lfName] = explode('=', $localeFunction);
$fName = trim($fName); $fName = trim($fName);
$lfName = trim($lfName); $lfName = trim($lfName);
if ((isset(self::$phpSpreadsheetFunctions[$fName])) && ($lfName != '') && ($fName != $lfName)) { if ((isset(self::$phpSpreadsheetFunctions[$fName])) && ($lfName != '') && ($fName != $lfName)) {
@ -2466,9 +2466,9 @@ class Calculation
if (file_exists($configFile)) { if (file_exists($configFile)) {
$localeSettings = file($configFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); $localeSettings = file($configFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
foreach ($localeSettings as $localeSetting) { foreach ($localeSettings as $localeSetting) {
list($localeSetting) = explode('##', $localeSetting); // Strip out comments [$localeSetting] = explode('##', $localeSetting); // Strip out comments
if (strpos($localeSetting, '=') !== false) { if (strpos($localeSetting, '=') !== false) {
list($settingName, $settingValue) = explode('=', $localeSetting); [$settingName, $settingValue] = explode('=', $localeSetting);
$settingName = strtoupper(trim($settingName)); $settingName = strtoupper(trim($settingName));
switch ($settingName) { switch ($settingName) {
case 'ARGUMENTSEPARATOR': case 'ARGUMENTSEPARATOR':
@ -2977,17 +2977,17 @@ class Calculation
// Examine each of the two operands, and turn them into an array if they aren't one already // Examine each of the two operands, and turn them into an array if they aren't one already
// Note that this function should only be called if one or both of the operand is already an array // Note that this function should only be called if one or both of the operand is already an array
if (!is_array($operand1)) { if (!is_array($operand1)) {
list($matrixRows, $matrixColumns) = self::getMatrixDimensions($operand2); [$matrixRows, $matrixColumns] = self::getMatrixDimensions($operand2);
$operand1 = array_fill(0, $matrixRows, array_fill(0, $matrixColumns, $operand1)); $operand1 = array_fill(0, $matrixRows, array_fill(0, $matrixColumns, $operand1));
$resize = 0; $resize = 0;
} elseif (!is_array($operand2)) { } elseif (!is_array($operand2)) {
list($matrixRows, $matrixColumns) = self::getMatrixDimensions($operand1); [$matrixRows, $matrixColumns] = self::getMatrixDimensions($operand1);
$operand2 = array_fill(0, $matrixRows, array_fill(0, $matrixColumns, $operand2)); $operand2 = array_fill(0, $matrixRows, array_fill(0, $matrixColumns, $operand2));
$resize = 0; $resize = 0;
} }
list($matrix1Rows, $matrix1Columns) = self::getMatrixDimensions($operand1); [$matrix1Rows, $matrix1Columns] = self::getMatrixDimensions($operand1);
list($matrix2Rows, $matrix2Columns) = self::getMatrixDimensions($operand2); [$matrix2Rows, $matrix2Columns] = self::getMatrixDimensions($operand2);
if (($matrix1Rows == $matrix2Columns) && ($matrix2Rows == $matrix1Columns)) { if (($matrix1Rows == $matrix2Columns) && ($matrix2Rows == $matrix1Columns)) {
$resize = 1; $resize = 1;
} }
@ -3496,11 +3496,11 @@ class Calculation
$testPrevOp = $stack->last(1); $testPrevOp = $stack->last(1);
if ($testPrevOp['value'] == ':') { if ($testPrevOp['value'] == ':') {
$startRowColRef = $output[count($output) - 1]['value']; $startRowColRef = $output[count($output) - 1]['value'];
list($rangeWS1, $startRowColRef) = Worksheet::extractSheetTitle($startRowColRef, true); [$rangeWS1, $startRowColRef] = Worksheet::extractSheetTitle($startRowColRef, true);
if ($rangeWS1 != '') { if ($rangeWS1 != '') {
$rangeWS1 .= '!'; $rangeWS1 .= '!';
} }
list($rangeWS2, $val) = Worksheet::extractSheetTitle($val, true); [$rangeWS2, $val] = Worksheet::extractSheetTitle($val, true);
if ($rangeWS2 != '') { if ($rangeWS2 != '') {
$rangeWS2 .= '!'; $rangeWS2 .= '!';
} else { } else {
@ -3678,12 +3678,12 @@ class Calculation
// Binary Operators // Binary Operators
case ':': // Range case ':': // Range
if (strpos($operand1Data['reference'], '!') !== false) { if (strpos($operand1Data['reference'], '!') !== false) {
list($sheet1, $operand1Data['reference']) = Worksheet::extractSheetTitle($operand1Data['reference'], true); [$sheet1, $operand1Data['reference']] = Worksheet::extractSheetTitle($operand1Data['reference'], true);
} else { } else {
$sheet1 = ($pCellParent !== null) ? $pCellWorksheet->getTitle() : ''; $sheet1 = ($pCellParent !== null) ? $pCellWorksheet->getTitle() : '';
} }
list($sheet2, $operand2Data['reference']) = Worksheet::extractSheetTitle($operand2Data['reference'], true); [$sheet2, $operand2Data['reference']] = Worksheet::extractSheetTitle($operand2Data['reference'], true);
if (empty($sheet2)) { if (empty($sheet2)) {
$sheet2 = $sheet1; $sheet2 = $sheet1;
} }
@ -4312,7 +4312,7 @@ class Calculation
if ($pSheet !== null) { if ($pSheet !== null) {
$pSheetName = $pSheet->getTitle(); $pSheetName = $pSheet->getTitle();
if (strpos($pRange, '!') !== false) { if (strpos($pRange, '!') !== false) {
list($pSheetName, $pRange) = Worksheet::extractSheetTitle($pRange, true); [$pSheetName, $pRange] = Worksheet::extractSheetTitle($pRange, true);
$pSheet = $this->spreadsheet->getSheetByName($pSheetName); $pSheet = $this->spreadsheet->getSheetByName($pSheetName);
} }
@ -4365,7 +4365,7 @@ class Calculation
if ($pSheet !== null) { if ($pSheet !== null) {
$pSheetName = $pSheet->getTitle(); $pSheetName = $pSheet->getTitle();
if (strpos($pRange, '!') !== false) { if (strpos($pRange, '!') !== false) {
list($pSheetName, $pRange) = Worksheet::extractSheetTitle($pRange, true); [$pSheetName, $pRange] = Worksheet::extractSheetTitle($pRange, true);
$pSheet = $this->spreadsheet->getSheetByName($pSheetName); $pSheet = $this->spreadsheet->getSheetByName($pSheetName);
} }
@ -4389,7 +4389,7 @@ class Calculation
$aReferences = Coordinate::extractAllCellReferencesInRange($pRange); $aReferences = Coordinate::extractAllCellReferencesInRange($pRange);
if (!isset($aReferences[1])) { if (!isset($aReferences[1])) {
// Single cell (or single column or row) in range // Single cell (or single column or row) in range
list($currentCol, $currentRow) = Coordinate::coordinateFromString($aReferences[0]); [$currentCol, $currentRow] = Coordinate::coordinateFromString($aReferences[0]);
if ($pSheet->cellExists($aReferences[0])) { if ($pSheet->cellExists($aReferences[0])) {
$returnValue[$currentRow][$currentCol] = $pSheet->getCell($aReferences[0])->getCalculatedValue($resetLog); $returnValue[$currentRow][$currentCol] = $pSheet->getCell($aReferences[0])->getCalculatedValue($resetLog);
} else { } else {
@ -4399,7 +4399,7 @@ class Calculation
// Extract cell data for all cells in the range // Extract cell data for all cells in the range
foreach ($aReferences as $reference) { foreach ($aReferences as $reference) {
// Extract range // Extract range
list($currentCol, $currentRow) = Coordinate::coordinateFromString($reference); [$currentCol, $currentRow] = Coordinate::coordinateFromString($reference);
if ($pSheet->cellExists($reference)) { if ($pSheet->cellExists($reference)) {
$returnValue[$currentRow][$currentCol] = $pSheet->getCell($reference)->getCalculatedValue($resetLog); $returnValue[$currentRow][$currentCol] = $pSheet->getCell($reference)->getCalculatedValue($resetLog);
} else { } else {

View File

@ -281,7 +281,7 @@ class Functions
return '=' . $condition; return '=' . $condition;
} }
preg_match('/(=|<[>=]?|>=?)(.*)/', $condition, $matches); preg_match('/(=|<[>=]?|>=?)(.*)/', $condition, $matches);
list(, $operator, $operand) = $matches; [, $operator, $operand] = $matches;
if (is_numeric(trim($operand, '"'))) { if (is_numeric(trim($operand, '"'))) {
$operand = trim($operand, '"'); $operand = trim($operand, '"');

View File

@ -98,9 +98,9 @@ class LookupRef
return (int) Coordinate::columnIndexFromString($columnKey); return (int) Coordinate::columnIndexFromString($columnKey);
} }
} else { } else {
list($sheet, $cellAddress) = Worksheet::extractSheetTitle($cellAddress, true); [$sheet, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
if (strpos($cellAddress, ':') !== false) { if (strpos($cellAddress, ':') !== false) {
list($startAddress, $endAddress) = explode(':', $cellAddress); [$startAddress, $endAddress] = explode(':', $cellAddress);
$startAddress = preg_replace('/[^a-z]/i', '', $startAddress); $startAddress = preg_replace('/[^a-z]/i', '', $startAddress);
$endAddress = preg_replace('/[^a-z]/i', '', $endAddress); $endAddress = preg_replace('/[^a-z]/i', '', $endAddress);
$returnValue = []; $returnValue = [];
@ -138,7 +138,7 @@ class LookupRef
reset($cellAddress); reset($cellAddress);
$isMatrix = (is_numeric(key($cellAddress))); $isMatrix = (is_numeric(key($cellAddress)));
list($columns, $rows) = Calculation::getMatrixDimensions($cellAddress); [$columns, $rows] = Calculation::getMatrixDimensions($cellAddress);
if ($isMatrix) { if ($isMatrix) {
return $rows; return $rows;
@ -175,9 +175,9 @@ class LookupRef
} }
} }
} else { } else {
list($sheet, $cellAddress) = Worksheet::extractSheetTitle($cellAddress, true); [$sheet, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
if (strpos($cellAddress, ':') !== false) { if (strpos($cellAddress, ':') !== false) {
list($startAddress, $endAddress) = explode(':', $cellAddress); [$startAddress, $endAddress] = explode(':', $cellAddress);
$startAddress = preg_replace('/\D/', '', $startAddress); $startAddress = preg_replace('/\D/', '', $startAddress);
$endAddress = preg_replace('/\D/', '', $endAddress); $endAddress = preg_replace('/\D/', '', $endAddress);
$returnValue = []; $returnValue = [];
@ -187,7 +187,7 @@ class LookupRef
return $returnValue; return $returnValue;
} }
list($cellAddress) = explode(':', $cellAddress); [$cellAddress] = explode(':', $cellAddress);
return (int) preg_replace('/\D/', '', $cellAddress); return (int) preg_replace('/\D/', '', $cellAddress);
} }
@ -215,7 +215,7 @@ class LookupRef
reset($cellAddress); reset($cellAddress);
$isMatrix = (is_numeric(key($cellAddress))); $isMatrix = (is_numeric(key($cellAddress)));
list($columns, $rows) = Calculation::getMatrixDimensions($cellAddress); [$columns, $rows] = Calculation::getMatrixDimensions($cellAddress);
if ($isMatrix) { if ($isMatrix) {
return $columns; return $columns;
@ -285,7 +285,7 @@ class LookupRef
$cellAddress1 = $cellAddress; $cellAddress1 = $cellAddress;
$cellAddress2 = null; $cellAddress2 = null;
if (strpos($cellAddress, ':') !== false) { if (strpos($cellAddress, ':') !== false) {
list($cellAddress1, $cellAddress2) = explode(':', $cellAddress); [$cellAddress1, $cellAddress2] = explode(':', $cellAddress);
} }
if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellAddress1, $matches)) || if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellAddress1, $matches)) ||
@ -295,7 +295,7 @@ class LookupRef
} }
if (strpos($cellAddress, '!') !== false) { if (strpos($cellAddress, '!') !== false) {
list($sheetName, $cellAddress) = Worksheet::extractSheetTitle($cellAddress, true); [$sheetName, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
$sheetName = trim($sheetName, "'"); $sheetName = trim($sheetName, "'");
$pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName); $pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName);
} else { } else {
@ -306,7 +306,7 @@ class LookupRef
} }
if (strpos($cellAddress, '!') !== false) { if (strpos($cellAddress, '!') !== false) {
list($sheetName, $cellAddress) = Worksheet::extractSheetTitle($cellAddress, true); [$sheetName, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
$sheetName = trim($sheetName, "'"); $sheetName = trim($sheetName, "'");
$pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName); $pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName);
} else { } else {
@ -359,16 +359,16 @@ class LookupRef
$sheetName = null; $sheetName = null;
if (strpos($cellAddress, '!')) { if (strpos($cellAddress, '!')) {
list($sheetName, $cellAddress) = Worksheet::extractSheetTitle($cellAddress, true); [$sheetName, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
$sheetName = trim($sheetName, "'"); $sheetName = trim($sheetName, "'");
} }
if (strpos($cellAddress, ':')) { if (strpos($cellAddress, ':')) {
list($startCell, $endCell) = explode(':', $cellAddress); [$startCell, $endCell] = explode(':', $cellAddress);
} else { } else {
$startCell = $endCell = $cellAddress; $startCell = $endCell = $cellAddress;
} }
list($startCellColumn, $startCellRow) = Coordinate::coordinateFromString($startCell); [$startCellColumn, $startCellRow] = Coordinate::coordinateFromString($startCell);
list($endCellColumn, $endCellRow) = Coordinate::coordinateFromString($endCell); [$endCellColumn, $endCellRow] = Coordinate::coordinateFromString($endCell);
$startCellRow += $rows; $startCellRow += $rows;
$startCellColumn = Coordinate::columnIndexFromString($startCellColumn) - 1; $startCellColumn = Coordinate::columnIndexFromString($startCellColumn) - 1;

View File

@ -1074,7 +1074,7 @@ class MathTrig
return array_filter( return array_filter(
$args, $args,
function ($index) use ($cellReference) { function ($index) use ($cellReference) {
list(, $row, $column) = explode('.', $index); [, $row, $column] = explode('.', $index);
return $cellReference->getWorksheet()->getRowDimension($row)->getVisible() && return $cellReference->getWorksheet()->getRowDimension($row)->getVisible() &&
$cellReference->getWorksheet()->getColumnDimension($column)->getVisible(); $cellReference->getWorksheet()->getColumnDimension($column)->getVisible();
@ -1088,7 +1088,7 @@ class MathTrig
return array_filter( return array_filter(
$args, $args,
function ($index) use ($cellReference) { function ($index) use ($cellReference) {
list(, $row, $column) = explode('.', $index); [, $row, $column] = explode('.', $index);
if ($cellReference->getWorksheet()->cellExists($column . $row)) { if ($cellReference->getWorksheet()->cellExists($column . $row)) {
//take this cell out if it contains the SUBTOTAL or AGGREGATE functions in a formula //take this cell out if it contains the SUBTOTAL or AGGREGATE functions in a formula
$isFormula = $cellReference->getWorksheet()->getCell($column . $row)->isFormula(); $isFormula = $cellReference->getWorksheet()->getCell($column . $row)->isFormula();

View File

@ -118,7 +118,7 @@ class AdvancedValueBinder extends DefaultValueBinder implements IValueBinder
// Check for time without seconds e.g. '9:45', '09:45' // Check for time without seconds e.g. '9:45', '09:45'
if (preg_match('/^(\d|[0-1]\d|2[0-3]):[0-5]\d$/', $value)) { if (preg_match('/^(\d|[0-1]\d|2[0-3]):[0-5]\d$/', $value)) {
// Convert value to number // Convert value to number
list($h, $m) = explode(':', $value); [$h, $m] = explode(':', $value);
$days = $h / 24 + $m / 1440; $days = $h / 24 + $m / 1440;
$cell->setValueExplicit($days, DataType::TYPE_NUMERIC); $cell->setValueExplicit($days, DataType::TYPE_NUMERIC);
// Set style // Set style
@ -131,7 +131,7 @@ class AdvancedValueBinder extends DefaultValueBinder implements IValueBinder
// Check for time with seconds '9:45:59', '09:45:59' // Check for time with seconds '9:45:59', '09:45:59'
if (preg_match('/^(\d|[0-1]\d|2[0-3]):[0-5]\d:[0-5]\d$/', $value)) { if (preg_match('/^(\d|[0-1]\d|2[0-3]):[0-5]\d:[0-5]\d$/', $value)) {
// Convert value to number // Convert value to number
list($h, $m, $s) = explode(':', $value); [$h, $m, $s] = explode(':', $value);
$days = $h / 24 + $m / 1440 + $s / 86400; $days = $h / 24 + $m / 1440 + $s / 86400;
// Convert value to number // Convert value to number
$cell->setValueExplicit($days, DataType::TYPE_NUMERIC); $cell->setValueExplicit($days, DataType::TYPE_NUMERIC);

View File

@ -511,7 +511,7 @@ class Cell
{ {
if ($mergeRange = $this->getMergeRange()) { if ($mergeRange = $this->getMergeRange()) {
$mergeRange = Coordinate::splitRange($mergeRange); $mergeRange = Coordinate::splitRange($mergeRange);
list($startCell) = $mergeRange[0]; [$startCell] = $mergeRange[0];
if ($this->getCoordinate() === $startCell) { if ($this->getCoordinate() === $startCell) {
return true; return true;
} }
@ -569,7 +569,7 @@ class Cell
*/ */
public function isInRange($pRange) public function isInRange($pRange)
{ {
list($rangeStart, $rangeEnd) = Coordinate::rangeBoundaries($pRange); [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($pRange);
// Translate properties // Translate properties
$myColumn = Coordinate::columnIndexFromString($this->getColumn()); $myColumn = Coordinate::columnIndexFromString($this->getColumn());

View File

@ -71,7 +71,7 @@ abstract class Coordinate
} }
// Split out any worksheet name from the reference // Split out any worksheet name from the reference
list($worksheet, $pCoordinateString) = Worksheet::extractSheetTitle($pCoordinateString, true); [$worksheet, $pCoordinateString] = Worksheet::extractSheetTitle($pCoordinateString, true);
if ($worksheet > '') { if ($worksheet > '') {
$worksheet .= '!'; $worksheet .= '!';
} }
@ -102,13 +102,13 @@ abstract class Coordinate
} }
// Split out any worksheet name from the coordinate // Split out any worksheet name from the coordinate
list($worksheet, $pCoordinateString) = Worksheet::extractSheetTitle($pCoordinateString, true); [$worksheet, $pCoordinateString] = Worksheet::extractSheetTitle($pCoordinateString, true);
if ($worksheet > '') { if ($worksheet > '') {
$worksheet .= '!'; $worksheet .= '!';
} }
// Create absolute coordinate // Create absolute coordinate
list($column, $row) = self::coordinateFromString($pCoordinateString); [$column, $row] = self::coordinateFromString($pCoordinateString);
$column = ltrim($column, '$'); $column = ltrim($column, '$');
$row = ltrim($row, '$'); $row = ltrim($row, '$');
@ -187,7 +187,7 @@ abstract class Coordinate
if (strpos($pRange, ':') === false) { if (strpos($pRange, ':') === false) {
$rangeA = $rangeB = $pRange; $rangeA = $rangeB = $pRange;
} else { } else {
list($rangeA, $rangeB) = explode(':', $pRange); [$rangeA, $rangeB] = explode(':', $pRange);
} }
// Calculate range outer borders // Calculate range outer borders
@ -211,7 +211,7 @@ abstract class Coordinate
public static function rangeDimension($pRange) public static function rangeDimension($pRange)
{ {
// Calculate range outer borders // Calculate range outer borders
list($rangeStart, $rangeEnd) = self::rangeBoundaries($pRange); [$rangeStart, $rangeEnd] = self::rangeBoundaries($pRange);
return [($rangeEnd[0] - $rangeStart[0] + 1), ($rangeEnd[1] - $rangeStart[1] + 1)]; return [($rangeEnd[0] - $rangeStart[0] + 1), ($rangeEnd[1] - $rangeStart[1] + 1)];
} }
@ -238,7 +238,7 @@ abstract class Coordinate
if (strpos($pRange, ':') === false) { if (strpos($pRange, ':') === false) {
$rangeA = $rangeB = $pRange; $rangeA = $rangeB = $pRange;
} else { } else {
list($rangeA, $rangeB) = explode(':', $pRange); [$rangeA, $rangeB] = explode(':', $pRange);
} }
return [self::coordinateFromString($rangeA), self::coordinateFromString($rangeB)]; return [self::coordinateFromString($rangeA), self::coordinateFromString($rangeB)];
@ -376,9 +376,9 @@ abstract class Coordinate
} }
// Range... // Range...
list($rangeStart, $rangeEnd) = $range; [$rangeStart, $rangeEnd] = $range;
list($startColumn, $startRow) = self::coordinateFromString($rangeStart); [$startColumn, $startRow] = self::coordinateFromString($rangeStart);
list($endColumn, $endRow) = self::coordinateFromString($rangeEnd); [$endColumn, $endRow] = self::coordinateFromString($rangeEnd);
$startColumnIndex = self::columnIndexFromString($startColumn); $startColumnIndex = self::columnIndexFromString($startColumn);
$endColumnIndex = self::columnIndexFromString($endColumn); $endColumnIndex = self::columnIndexFromString($endColumn);
++$endColumnIndex; ++$endColumnIndex;
@ -432,7 +432,7 @@ abstract class Coordinate
continue; continue;
} }
list($column, $row) = self::coordinateFromString($coord); [$column, $row] = self::coordinateFromString($coord);
$row = (int) (ltrim($row, '$')); $row = (int) (ltrim($row, '$'));
$hashCode = $column . '-' . (is_object($value) ? $value->getHashCode() : $value); $hashCode = $column . '-' . (is_object($value) ? $value->getHashCode() : $value);

View File

@ -376,7 +376,7 @@ class DataSeriesValues
} }
unset($dataValue); unset($dataValue);
} else { } else {
list($worksheet, $cellRange) = Worksheet::extractSheetTitle($this->dataSource, true); [$worksheet, $cellRange] = Worksheet::extractSheetTitle($this->dataSource, true);
$dimensions = Coordinate::rangeDimension(str_replace('$', '', $cellRange)); $dimensions = Coordinate::rangeDimension(str_replace('$', '', $cellRange));
if (($dimensions[0] == 1) || ($dimensions[1] == 1)) { if (($dimensions[0] == 1) || ($dimensions[1] == 1)) {
$this->dataValues = Functions::flattenArray($newDataValues); $this->dataValues = Functions::flattenArray($newDataValues);

View File

@ -442,7 +442,7 @@ class JpGraph implements IRenderer
$seriesPlot->link->SetColor(self::$colourSet[self::$plotColour]); $seriesPlot->link->SetColor(self::$colourSet[self::$plotColour]);
} elseif ($scatterStyle == 'smoothMarker') { } elseif ($scatterStyle == 'smoothMarker') {
$spline = new \Spline($dataValuesY, $dataValuesX); $spline = new \Spline($dataValuesY, $dataValuesX);
list($splineDataY, $splineDataX) = $spline->Get(count($dataValuesX) * self::$width / 20); [$splineDataY, $splineDataX] = $spline->Get(count($dataValuesX) * self::$width / 20);
$lplot = new \LinePlot($splineDataX, $splineDataY); $lplot = new \LinePlot($splineDataX, $splineDataY);
$lplot->SetColor(self::$colourSet[self::$plotColour]); $lplot->SetColor(self::$colourSet[self::$plotColour]);

View File

@ -175,9 +175,8 @@ class Csv extends BaseReader
} }
} }
foreach ($potentialDelimiters as $delimiter) { foreach ($potentialDelimiters as $delimiter) {
$counts[$delimiter][] = isset($countLine[$delimiter]) $counts[$delimiter][] = $countLine[$delimiter]
? $countLine[$delimiter] ?? 0;
: 0;
} }
} }

View File

@ -267,7 +267,7 @@ class Gnumeric extends BaseReader
break; break;
case 'user-defined': case 'user-defined':
list(, $attrName) = explode(':', $attributes['name']); [, $attrName] = explode(':', $attributes['name']);
switch ($attrName) { switch ($attrName) {
case 'publisher': case 'publisher':
$docProps->setCompany(trim($propertyValue)); $docProps->setCompany(trim($propertyValue));
@ -879,7 +879,7 @@ class Gnumeric extends BaseReader
private static function parseGnumericColour($gnmColour) private static function parseGnumericColour($gnmColour)
{ {
list($gnmR, $gnmG, $gnmB) = explode(':', $gnmColour); [$gnmR, $gnmG, $gnmB] = explode(':', $gnmColour);
$gnmR = substr(str_pad($gnmR, 4, '0', STR_PAD_RIGHT), 0, 2); $gnmR = substr(str_pad($gnmR, 4, '0', STR_PAD_RIGHT), 0, 2);
$gnmG = substr(str_pad($gnmG, 4, '0', STR_PAD_RIGHT), 0, 2); $gnmG = substr(str_pad($gnmG, 4, '0', STR_PAD_RIGHT), 0, 2);
$gnmB = substr(str_pad($gnmB, 4, '0', STR_PAD_RIGHT), 0, 2); $gnmB = substr(str_pad($gnmB, 4, '0', STR_PAD_RIGHT), 0, 2);

View File

@ -920,7 +920,7 @@ class Html extends BaseReader
*/ */
private function setBorderStyle(Style $cellStyle, $styleValue, $type) private function setBorderStyle(Style $cellStyle, $styleValue, $type)
{ {
list(, $borderStyle, $color) = explode(' ', $styleValue); [, $borderStyle, $color] = explode(' ', $styleValue);
$cellStyle->applyFromArray([ $cellStyle->applyFromArray([
'borders' => [ 'borders' => [

View File

@ -490,7 +490,7 @@ class Ods extends BaseReader
$dateObj = new DateTime($value, $GMT); $dateObj = new DateTime($value, $GMT);
$dateObj->setTimeZone($timezoneObj); $dateObj->setTimeZone($timezoneObj);
list($year, $month, $day, $hour, $minute, $second) = explode( [$year, $month, $day, $hour, $minute, $second] = explode(
' ', ' ',
$dateObj->format('Y m d H i s') $dateObj->format('Y m d H i s')
); );

View File

@ -384,7 +384,7 @@ class Slk extends BaseReader
break; break;
case 'W': case 'W':
list($startCol, $endCol, $columnWidth) = explode(' ', substr($rowDatum, 1)); [$startCol, $endCol, $columnWidth] = explode(' ', substr($rowDatum, 1));
break; break;
case 'S': case 'S':

View File

@ -1089,8 +1089,8 @@ class Xls extends BaseReader
} }
// calculate the width and height of the shape // calculate the width and height of the shape
list($startColumn, $startRow) = Coordinate::coordinateFromString($spContainer->getStartCoordinates()); [$startColumn, $startRow] = Coordinate::coordinateFromString($spContainer->getStartCoordinates());
list($endColumn, $endRow) = Coordinate::coordinateFromString($spContainer->getEndCoordinates()); [$endColumn, $endRow] = Coordinate::coordinateFromString($spContainer->getEndCoordinates());
$startOffsetX = $spContainer->getStartOffsetX(); $startOffsetX = $spContainer->getStartOffsetX();
$startOffsetY = $spContainer->getStartOffsetY(); $startOffsetY = $spContainer->getStartOffsetY();
@ -1175,7 +1175,7 @@ class Xls extends BaseReader
// treat SHAREDFMLA records // treat SHAREDFMLA records
if ($this->version == self::XLS_BIFF8) { if ($this->version == self::XLS_BIFF8) {
foreach ($this->sharedFormulaParts as $cell => $baseCell) { foreach ($this->sharedFormulaParts as $cell => $baseCell) {
list($column, $row) = Coordinate::coordinateFromString($cell); [$column, $row] = Coordinate::coordinateFromString($cell);
if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($column, $row, $this->phpSheet->getTitle())) { if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($column, $row, $this->phpSheet->getTitle())) {
$formula = $this->getFormulaFromStructure($this->sharedFormulas[$baseCell], $cell); $formula = $this->getFormulaFromStructure($this->sharedFormulas[$baseCell], $cell);
$this->phpSheet->getCell($cell)->setValueExplicit('=' . $formula, DataType::TYPE_FORMULA); $this->phpSheet->getCell($cell)->setValueExplicit('=' . $formula, DataType::TYPE_FORMULA);
@ -1251,8 +1251,8 @@ class Xls extends BaseReader
$coordinateStrings = explode(':', $extractedRange); $coordinateStrings = explode(':', $extractedRange);
if (count($coordinateStrings) == 2) { if (count($coordinateStrings) == 2) {
list($firstColumn, $firstRow) = Coordinate::coordinateFromString($coordinateStrings[0]); [$firstColumn, $firstRow] = Coordinate::coordinateFromString($coordinateStrings[0]);
list($lastColumn, $lastRow) = Coordinate::coordinateFromString($coordinateStrings[1]); [$lastColumn, $lastRow] = Coordinate::coordinateFromString($coordinateStrings[1]);
if ($firstColumn == 'A' and $lastColumn == 'IV') { if ($firstColumn == 'A' and $lastColumn == 'IV') {
// then we have repeating rows // then we have repeating rows
@ -5355,12 +5355,12 @@ class Xls extends BaseReader
$formulaStrings = []; $formulaStrings = [];
foreach ($tokens as $token) { foreach ($tokens as $token) {
// initialize spaces // initialize spaces
$space0 = isset($space0) ? $space0 : ''; // spaces before next token, not tParen $space0 = $space0 ?? ''; // spaces before next token, not tParen
$space1 = isset($space1) ? $space1 : ''; // carriage returns before next token, not tParen $space1 = $space1 ?? ''; // carriage returns before next token, not tParen
$space2 = isset($space2) ? $space2 : ''; // spaces before opening parenthesis $space2 = $space2 ?? ''; // spaces before opening parenthesis
$space3 = isset($space3) ? $space3 : ''; // carriage returns before opening parenthesis $space3 = $space3 ?? ''; // carriage returns before opening parenthesis
$space4 = isset($space4) ? $space4 : ''; // spaces before closing parenthesis $space4 = $space4 ?? ''; // spaces before closing parenthesis
$space5 = isset($space5) ? $space5 : ''; // carriage returns before closing parenthesis $space5 = $space5 ?? ''; // carriage returns before closing parenthesis
switch ($token['name']) { switch ($token['name']) {
case 'tAdd': // addition case 'tAdd': // addition
@ -7145,7 +7145,7 @@ class Xls extends BaseReader
*/ */
private function readBIFF8CellAddressB($cellAddressStructure, $baseCell = 'A1') private function readBIFF8CellAddressB($cellAddressStructure, $baseCell = 'A1')
{ {
list($baseCol, $baseRow) = Coordinate::coordinateFromString($baseCell); [$baseCol, $baseRow] = Coordinate::coordinateFromString($baseCell);
$baseCol = Coordinate::columnIndexFromString($baseCol) - 1; $baseCol = Coordinate::columnIndexFromString($baseCol) - 1;
// offset: 0; size: 2; index to row (0... 65535) (or offset (-32768... 32767)) // offset: 0; size: 2; index to row (0... 65535) (or offset (-32768... 32767))
@ -7328,7 +7328,7 @@ class Xls extends BaseReader
*/ */
private function readBIFF8CellRangeAddressB($subData, $baseCell = 'A1') private function readBIFF8CellRangeAddressB($subData, $baseCell = 'A1')
{ {
list($baseCol, $baseRow) = Coordinate::coordinateFromString($baseCell); [$baseCol, $baseRow] = Coordinate::coordinateFromString($baseCell);
$baseCol = Coordinate::columnIndexFromString($baseCol) - 1; $baseCol = Coordinate::columnIndexFromString($baseCol) - 1;
// TODO: if cell range is just a single cell, should this funciton // TODO: if cell range is just a single cell, should this funciton

View File

@ -1352,7 +1352,7 @@ class Xlsx extends BaseReader
$rangeSets = preg_split("/('?(?:.*?)'?(?:![A-Z0-9]+:[A-Z0-9]+)),?/", $extractedRange, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); $rangeSets = preg_split("/('?(?:.*?)'?(?:![A-Z0-9]+:[A-Z0-9]+)),?/", $extractedRange, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
$newRangeSets = []; $newRangeSets = [];
foreach ($rangeSets as $rangeSet) { foreach ($rangeSets as $rangeSet) {
list($sheetName, $rangeSet) = Worksheet::extractSheetTitle($rangeSet, true); [$sheetName, $rangeSet] = Worksheet::extractSheetTitle($rangeSet, true);
if (strpos($rangeSet, ':') === false) { if (strpos($rangeSet, ':') === false) {
$rangeSet = $rangeSet . ':' . $rangeSet; $rangeSet = $rangeSet . ':' . $rangeSet;
} }
@ -1426,7 +1426,7 @@ class Xlsx extends BaseReader
$locatedSheet = $excel->getSheetByName($extractedSheetName); $locatedSheet = $excel->getSheetByName($extractedSheetName);
// Modify range // Modify range
list($worksheetName, $extractedRange) = Worksheet::extractSheetTitle($extractedRange, true); [$worksheetName, $extractedRange] = Worksheet::extractSheetTitle($extractedRange, true);
} }
if ($locatedSheet !== null) { if ($locatedSheet !== null) {
@ -1841,7 +1841,7 @@ class Xlsx extends BaseReader
private static function getArrayItem($array, $key = 0) private static function getArrayItem($array, $key = 0)
{ {
return isset($array[$key]) ? $array[$key] : null; return $array[$key] ?? null;
} }
private static function dirAdd($base, $add) private static function dirAdd($base, $add)

View File

@ -86,6 +86,6 @@ class Properties
private static function getArrayItem(array $array, $key = 0) private static function getArrayItem(array $array, $key = 0)
{ {
return isset($array[$key]) ? $array[$key] : null; return $array[$key] ?? null;
} }
} }

View File

@ -260,6 +260,6 @@ class Styles extends BaseParserClass
private static function getArrayItem($array, $key = 0) private static function getArrayItem($array, $key = 0)
{ {
return isset($array[$key]) ? $array[$key] : null; return $array[$key] ?? null;
} }
} }

View File

@ -82,11 +82,8 @@ class ReferenceHelper
*/ */
public static function cellSort($a, $b) public static function cellSort($a, $b)
{ {
// TODO Scrutinizer doesn't like sscanf($a, '%[A-Z]%d', $ac, $ar), and we can't use short list() syntax [$ac, $ar] = sscanf($a, '%[A-Z]%d');
// [$ac, $ar] = sscanf($a, '%[A-Z]%d') while retaining PHP 5.6 support. [$bc, $br] = sscanf($b, '%[A-Z]%d');
// Switch when we drop support for 5.6
list($ac, $ar) = sscanf($a, '%[A-Z]%d');
list($bc, $br) = sscanf($b, '%[A-Z]%d');
if ($ar === $br) { if ($ar === $br) {
return strcasecmp(strlen($ac) . $ac, strlen($bc) . $bc); return strcasecmp(strlen($ac) . $ac, strlen($bc) . $bc);
@ -106,11 +103,8 @@ class ReferenceHelper
*/ */
public static function cellReverseSort($a, $b) public static function cellReverseSort($a, $b)
{ {
// TODO Scrutinizer doesn't like sscanf($a, '%[A-Z]%d', $ac, $ar), and we can't use short list() syntax [$ac, $ar] = sscanf($a, '%[A-Z]%d');
// [$ac, $ar] = sscanf($a, '%[A-Z]%d') while retaining PHP 5.6 support. [$bc, $br] = sscanf($b, '%[A-Z]%d');
// Switch when we drop support for 5.6
list($ac, $ar) = sscanf($a, '%[A-Z]%d');
list($bc, $br) = sscanf($b, '%[A-Z]%d');
if ($ar === $br) { if ($ar === $br) {
return 1 - strcasecmp(strlen($ac) . $ac, strlen($bc) . $bc); return 1 - strcasecmp(strlen($ac) . $ac, strlen($bc) . $bc);
@ -132,7 +126,7 @@ class ReferenceHelper
*/ */
private static function cellAddressInDeleteRange($cellAddress, $beforeRow, $pNumRows, $beforeColumnIndex, $pNumCols) private static function cellAddressInDeleteRange($cellAddress, $beforeRow, $pNumRows, $beforeColumnIndex, $pNumCols)
{ {
list($cellColumn, $cellRow) = Coordinate::coordinateFromString($cellAddress); [$cellColumn, $cellRow] = Coordinate::coordinateFromString($cellAddress);
$cellColumnIndex = Coordinate::columnIndexFromString($cellColumn); $cellColumnIndex = Coordinate::columnIndexFromString($cellColumn);
// Is cell within the range of rows/columns if we're deleting // Is cell within the range of rows/columns if we're deleting
if ($pNumRows < 0 && if ($pNumRows < 0 &&
@ -319,7 +313,7 @@ class ReferenceHelper
if (!empty($aColumnDimensions)) { if (!empty($aColumnDimensions)) {
foreach ($aColumnDimensions as $objColumnDimension) { foreach ($aColumnDimensions as $objColumnDimension) {
$newReference = $this->updateCellReference($objColumnDimension->getColumnIndex() . '1', $pBefore, $pNumCols, $pNumRows); $newReference = $this->updateCellReference($objColumnDimension->getColumnIndex() . '1', $pBefore, $pNumCols, $pNumRows);
list($newReference) = Coordinate::coordinateFromString($newReference); [$newReference] = Coordinate::coordinateFromString($newReference);
if ($objColumnDimension->getColumnIndex() != $newReference) { if ($objColumnDimension->getColumnIndex() != $newReference) {
$objColumnDimension->setColumnIndex($newReference); $objColumnDimension->setColumnIndex($newReference);
} }
@ -344,7 +338,7 @@ class ReferenceHelper
if (!empty($aRowDimensions)) { if (!empty($aRowDimensions)) {
foreach ($aRowDimensions as $objRowDimension) { foreach ($aRowDimensions as $objRowDimension) {
$newReference = $this->updateCellReference('A' . $objRowDimension->getRowIndex(), $pBefore, $pNumCols, $pNumRows); $newReference = $this->updateCellReference('A' . $objRowDimension->getRowIndex(), $pBefore, $pNumCols, $pNumRows);
list(, $newReference) = Coordinate::coordinateFromString($newReference); [, $newReference] = Coordinate::coordinateFromString($newReference);
if ($objRowDimension->getRowIndex() != $newReference) { if ($objRowDimension->getRowIndex() != $newReference) {
$objRowDimension->setRowIndex($newReference); $objRowDimension->setRowIndex($newReference);
} }
@ -378,7 +372,7 @@ class ReferenceHelper
$allCoordinates = $pSheet->getCoordinates(); $allCoordinates = $pSheet->getCoordinates();
// Get coordinate of $pBefore // Get coordinate of $pBefore
list($beforeColumn, $beforeRow) = Coordinate::coordinateFromString($pBefore); [$beforeColumn, $beforeRow] = Coordinate::coordinateFromString($pBefore);
$beforeColumnIndex = Coordinate::columnIndexFromString($beforeColumn); $beforeColumnIndex = Coordinate::columnIndexFromString($beforeColumn);
// Clear cells if we are removing columns or rows // Clear cells if we are removing columns or rows
@ -539,7 +533,7 @@ class ReferenceHelper
$row = 0; $row = 0;
sscanf($pBefore, '%[A-Z]%d', $column, $row); sscanf($pBefore, '%[A-Z]%d', $column, $row);
$columnIndex = Coordinate::columnIndexFromString($column); $columnIndex = Coordinate::columnIndexFromString($column);
list($rangeStart, $rangeEnd) = Coordinate::rangeBoundaries($autoFilterRange); [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($autoFilterRange);
if ($columnIndex <= $rangeEnd[0]) { if ($columnIndex <= $rangeEnd[0]) {
if ($pNumCols < 0) { if ($pNumCols < 0) {
// If we're actually deleting any columns that fall within the autofilter range, // If we're actually deleting any columns that fall within the autofilter range,
@ -707,7 +701,7 @@ class ReferenceHelper
if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) { if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) {
$toString = ($match[2] > '') ? $match[2] . '!' : ''; $toString = ($match[2] > '') ? $match[2] . '!' : '';
$toString .= $modified3 . ':' . $modified4; $toString .= $modified3 . ':' . $modified4;
list($column, $row) = Coordinate::coordinateFromString($match[3]); [$column, $row] = Coordinate::coordinateFromString($match[3]);
// Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more // Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more
$column = Coordinate::columnIndexFromString(trim($column, '$')) + 100000; $column = Coordinate::columnIndexFromString(trim($column, '$')) + 100000;
$row = trim($row, '$') + 10000000; $row = trim($row, '$') + 10000000;
@ -733,7 +727,7 @@ class ReferenceHelper
if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) { if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) {
$toString = ($match[2] > '') ? $match[2] . '!' : ''; $toString = ($match[2] > '') ? $match[2] . '!' : '';
$toString .= $modified3; $toString .= $modified3;
list($column, $row) = Coordinate::coordinateFromString($match[3]); [$column, $row] = Coordinate::coordinateFromString($match[3]);
// Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more // Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more
$column = Coordinate::columnIndexFromString(trim($column, '$')) + 100000; $column = Coordinate::columnIndexFromString(trim($column, '$')) + 100000;
$row = trim($row, '$') + 10000000; $row = trim($row, '$') + 10000000;
@ -881,10 +875,10 @@ class ReferenceHelper
} }
// Get coordinate of $pBefore // Get coordinate of $pBefore
list($beforeColumn, $beforeRow) = Coordinate::coordinateFromString($pBefore); [$beforeColumn, $beforeRow] = Coordinate::coordinateFromString($pBefore);
// Get coordinate of $pCellReference // Get coordinate of $pCellReference
list($newColumn, $newRow) = Coordinate::coordinateFromString($pCellReference); [$newColumn, $newRow] = Coordinate::coordinateFromString($pCellReference);
// Verify which parts should be updated // Verify which parts should be updated
$updateColumn = (($newColumn[0] != '$') && ($beforeColumn[0] != '$') && (Coordinate::columnIndexFromString($newColumn) >= Coordinate::columnIndexFromString($beforeColumn))); $updateColumn = (($newColumn[0] != '$') && ($beforeColumn[0] != '$') && (Coordinate::columnIndexFromString($newColumn) >= Coordinate::columnIndexFromString($beforeColumn)));

View File

@ -30,7 +30,6 @@ class Settings
* 7.2 < 7.2.1 * 7.2 < 7.2.1
* 7.1 < 7.1.13 * 7.1 < 7.1.13
* 7.0 < 7.0.27 * 7.0 < 7.0.27
* 5.6 ANY
* then you may need to disable this check to prevent unwanted behaviour in other threads * then you may need to disable this check to prevent unwanted behaviour in other threads
* SECURITY WARNING: Changing this flag is not recommended. * SECURITY WARNING: Changing this flag is not recommended.
* *
@ -122,7 +121,6 @@ class Settings
* 7.2 < 7.2.1 * 7.2 < 7.2.1
* 7.1 < 7.1.13 * 7.1 < 7.1.13
* 7.0 < 7.0.27 * 7.0 < 7.0.27
* 5.6 ANY
* then you may need to disable this check to prevent unwanted behaviour in other threads * then you may need to disable this check to prevent unwanted behaviour in other threads
* SECURITY WARNING: Changing this flag to false is not recommended. * SECURITY WARNING: Changing this flag to false is not recommended.
* *

View File

@ -174,7 +174,7 @@ class Matrix
switch ($match) { switch ($match) {
//A($i0...; $j0...) //A($i0...; $j0...)
case 'integer,integer': case 'integer,integer':
list($i0, $j0) = $args; [$i0, $j0] = $args;
if ($i0 >= 0) { if ($i0 >= 0) {
$m = $this->m - $i0; $m = $this->m - $i0;
} else { } else {
@ -197,7 +197,7 @@ class Matrix
break; break;
//A($i0...$iF; $j0...$jF) //A($i0...$iF; $j0...$jF)
case 'integer,integer,integer,integer': case 'integer,integer,integer,integer':
list($i0, $iF, $j0, $jF) = $args; [$i0, $iF, $j0, $jF] = $args;
if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) { if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) {
$m = $iF - $i0; $m = $iF - $i0;
} else { } else {
@ -220,7 +220,7 @@ class Matrix
break; break;
//$R = array of row indices; $C = array of column indices //$R = array of row indices; $C = array of column indices
case 'array,array': case 'array,array':
list($RL, $CL) = $args; [$RL, $CL] = $args;
if (count($RL) > 0) { if (count($RL) > 0) {
$m = count($RL); $m = count($RL);
} else { } else {
@ -243,7 +243,7 @@ class Matrix
break; break;
//A($i0...$iF); $CL = array of column indices //A($i0...$iF); $CL = array of column indices
case 'integer,integer,array': case 'integer,integer,array':
list($i0, $iF, $CL) = $args; [$i0, $iF, $CL] = $args;
if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) { if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) {
$m = $iF - $i0; $m = $iF - $i0;
} else { } else {
@ -266,7 +266,7 @@ class Matrix
break; break;
//$RL = array of row indices //$RL = array of row indices
case 'array,integer,integer': case 'array,integer,integer':
list($RL, $j0, $jF) = $args; [$RL, $j0, $jF] = $args;
if (count($RL) > 0) { if (count($RL) > 0) {
$m = count($RL); $m = count($RL);
} else { } else {

View File

@ -253,7 +253,7 @@ class OLE
*/ */
private static function _readInt1($fh) private static function _readInt1($fh)
{ {
list(, $tmp) = unpack('c', fread($fh, 1)); [, $tmp] = unpack('c', fread($fh, 1));
return $tmp; return $tmp;
} }
@ -267,7 +267,7 @@ class OLE
*/ */
private static function _readInt2($fh) private static function _readInt2($fh)
{ {
list(, $tmp) = unpack('v', fread($fh, 2)); [, $tmp] = unpack('v', fread($fh, 2));
return $tmp; return $tmp;
} }
@ -281,7 +281,7 @@ class OLE
*/ */
private static function _readInt4($fh) private static function _readInt4($fh)
{ {
list(, $tmp) = unpack('V', fread($fh, 4)); [, $tmp] = unpack('V', fread($fh, 4));
return $tmp; return $tmp;
} }

View File

@ -118,7 +118,7 @@ class Root extends PPS
$aList = []; $aList = [];
PPS::_savePpsSetPnt($aList, [$this]); PPS::_savePpsSetPnt($aList, [$this]);
// calculate values for header // calculate values for header
list($iSBDcnt, $iBBcnt, $iPPScnt) = $this->_calcSize($aList); //, $rhInfo); [$iSBDcnt, $iBBcnt, $iPPScnt] = $this->_calcSize($aList); //, $rhInfo);
// Save Header // Save Header
$this->_saveHeader($iSBDcnt, $iBBcnt, $iPPScnt); $this->_saveHeader($iSBDcnt, $iBBcnt, $iPPScnt);
@ -149,7 +149,7 @@ class Root extends PPS
public function _calcSize(&$raList) public function _calcSize(&$raList)
{ {
// Calculate Basic Setting // Calculate Basic Setting
list($iSBDcnt, $iBBcnt, $iPPScnt) = [0, 0, 0]; [$iSBDcnt, $iBBcnt, $iPPScnt] = [0, 0, 0];
$iSmallLen = 0; $iSmallLen = 0;
$iSBcnt = 0; $iSBcnt = 0;
$iCount = count($raList); $iCount = count($raList);

View File

@ -211,7 +211,7 @@ class Xls
*/ */
public static function oneAnchor2twoAnchor($sheet, $coordinates, $offsetX, $offsetY, $width, $height) public static function oneAnchor2twoAnchor($sheet, $coordinates, $offsetX, $offsetY, $width, $height)
{ {
list($column, $row) = Coordinate::coordinateFromString($coordinates); [$column, $row] = Coordinate::coordinateFromString($coordinates);
$col_start = Coordinate::columnIndexFromString($column); $col_start = Coordinate::columnIndexFromString($column);
$row_start = $row - 1; $row_start = $row - 1;

View File

@ -721,7 +721,7 @@ class Spreadsheet
{ {
$worksheetCount = count($this->workSheetCollection); $worksheetCount = count($this->workSheetCollection);
for ($i = 0; $i < $worksheetCount; ++$i) { for ($i = 0; $i < $worksheetCount; ++$i) {
if ($this->workSheetCollection[$i]->getTitle() === $pName) { if ($this->workSheetCollection[$i]->getTitle() === trim($pName, "'")) {
return $this->workSheetCollection[$i]; return $this->workSheetCollection[$i];
} }
} }

View File

@ -706,7 +706,7 @@ class NumberFormat extends Supervisor
if (preg_match('/\[\$(.*)\]/u', $format, $m)) { if (preg_match('/\[\$(.*)\]/u', $format, $m)) {
// Currency or Accounting // Currency or Accounting
$currencyCode = $m[1]; $currencyCode = $m[1];
list($currencyCode) = explode('-', $currencyCode); [$currencyCode] = explode('-', $currencyCode);
if ($currencyCode == '') { if ($currencyCode == '') {
$currencyCode = StringHelper::getCurrencyCode(); $currencyCode = StringHelper::getCurrencyCode();
} }
@ -807,7 +807,7 @@ class NumberFormat extends Supervisor
// Additional formatting provided by callback function // Additional formatting provided by callback function
if ($callBack !== null) { if ($callBack !== null) {
list($writerInstance, $function) = $callBack; [$writerInstance, $function] = $callBack;
$value = $writerInstance->$function($value, $formatColor); $value = $writerInstance->$function($value, $formatColor);
} }

View File

@ -204,7 +204,7 @@ class Style extends Supervisor
$rangeA = $pRange; $rangeA = $pRange;
$rangeB = $pRange; $rangeB = $pRange;
} else { } else {
list($rangeA, $rangeB) = explode(':', $pRange); [$rangeA, $rangeB] = explode(':', $pRange);
} }
// Calculate range outer borders // Calculate range outer borders

View File

@ -90,7 +90,7 @@ class AutoFilter
public function setRange($pRange) public function setRange($pRange)
{ {
// extract coordinate // extract coordinate
list($worksheet, $pRange) = Worksheet::extractSheetTitle($pRange, true); [$worksheet, $pRange] = Worksheet::extractSheetTitle($pRange, true);
if (strpos($pRange, ':') !== false) { if (strpos($pRange, ':') !== false) {
$this->range = $pRange; $this->range = $pRange;
@ -105,7 +105,7 @@ class AutoFilter
$this->columns = []; $this->columns = [];
} else { } else {
// Discard any column rules that are no longer valid within this range // Discard any column rules that are no longer valid within this range
list($rangeStart, $rangeEnd) = Coordinate::rangeBoundaries($this->range); [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($this->range);
foreach ($this->columns as $key => $value) { foreach ($this->columns as $key => $value) {
$colIndex = Coordinate::columnIndexFromString($key); $colIndex = Coordinate::columnIndexFromString($key);
if (($rangeStart[0] > $colIndex) || ($rangeEnd[0] < $colIndex)) { if (($rangeStart[0] > $colIndex) || ($rangeEnd[0] < $colIndex)) {
@ -143,7 +143,7 @@ class AutoFilter
} }
$columnIndex = Coordinate::columnIndexFromString($column); $columnIndex = Coordinate::columnIndexFromString($column);
list($rangeStart, $rangeEnd) = Coordinate::rangeBoundaries($this->range); [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($this->range);
if (($rangeStart[0] > $columnIndex) || ($rangeEnd[0] < $columnIndex)) { if (($rangeStart[0] > $columnIndex) || ($rangeEnd[0] < $columnIndex)) {
throw new PhpSpreadsheetException('Column is outside of current autofilter range.'); throw new PhpSpreadsheetException('Column is outside of current autofilter range.');
} }
@ -196,7 +196,7 @@ class AutoFilter
*/ */
public function getColumnByOffset($pColumnOffset) public function getColumnByOffset($pColumnOffset)
{ {
list($rangeStart, $rangeEnd) = Coordinate::rangeBoundaries($this->range); [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($this->range);
$pColumn = Coordinate::stringFromColumnIndex($rangeStart[0] + $pColumnOffset); $pColumn = Coordinate::stringFromColumnIndex($rangeStart[0] + $pColumnOffset);
return $this->getColumn($pColumn); return $this->getColumn($pColumn);
@ -357,7 +357,7 @@ class AutoFilter
{ {
$dataSet = $ruleSet['filterRules']; $dataSet = $ruleSet['filterRules'];
$join = $ruleSet['join']; $join = $ruleSet['join'];
$customRuleForBlanks = isset($ruleSet['customRuleForBlanks']) ? $ruleSet['customRuleForBlanks'] : false; $customRuleForBlanks = $ruleSet['customRuleForBlanks'] ?? false;
if (!$customRuleForBlanks) { if (!$customRuleForBlanks) {
// Blank cells are always ignored, so return a FALSE // Blank cells are always ignored, so return a FALSE
@ -621,7 +621,7 @@ class AutoFilter
*/ */
public function showHideRows() public function showHideRows()
{ {
list($rangeStart, $rangeEnd) = Coordinate::rangeBoundaries($this->range); [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($this->range);
// The heading row should always be visible // The heading row should always be visible
$this->workSheet->getRowDimension($rangeStart[1])->setVisible(true); $this->workSheet->getRowDimension($rangeStart[1])->setVisible(true);

View File

@ -88,7 +88,7 @@ class Drawing extends BaseDrawing
if ($this->width == 0 && $this->height == 0) { if ($this->width == 0 && $this->height == 0) {
// Get width/height // Get width/height
list($this->width, $this->height) = getimagesize($pValue); [$this->width, $this->height] = getimagesize($pValue);
} }
} else { } else {
throw new PhpSpreadsheetException("File $pValue not found!"); throw new PhpSpreadsheetException("File $pValue not found!");

View File

@ -1561,7 +1561,7 @@ class Worksheet implements IComparable
} }
// Calculate range outer borders // Calculate range outer borders
list($rangeStart, $rangeEnd) = Coordinate::rangeBoundaries($pRange . ':' . $pRange); [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($pRange . ':' . $pRange);
// Make sure we can loop upwards on rows and columns // Make sure we can loop upwards on rows and columns
if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) { if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) {
@ -1601,7 +1601,7 @@ class Worksheet implements IComparable
} }
// Calculate range outer borders // Calculate range outer borders
list($rangeStart, $rangeEnd) = Coordinate::rangeBoundaries($pRange . ':' . $pRange); [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($pRange . ':' . $pRange);
// Make sure we can loop upwards on rows and columns // Make sure we can loop upwards on rows and columns
if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) { if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) {
@ -2424,7 +2424,7 @@ class Worksheet implements IComparable
$pCoordinate = preg_replace('/^(\d+):(\d+)$/', 'A${1}:XFD${2}', $pCoordinate); $pCoordinate = preg_replace('/^(\d+):(\d+)$/', 'A${1}:XFD${2}', $pCoordinate);
if (Coordinate::coordinateIsRange($pCoordinate)) { if (Coordinate::coordinateIsRange($pCoordinate)) {
list($first) = Coordinate::splitRange($pCoordinate); [$first] = Coordinate::splitRange($pCoordinate);
$this->activeCell = $first[0]; $this->activeCell = $first[0];
} else { } else {
$this->activeCell = $pCoordinate; $this->activeCell = $pCoordinate;
@ -2493,7 +2493,7 @@ class Worksheet implements IComparable
} }
// start coordinate // start coordinate
list($startColumn, $startRow) = Coordinate::coordinateFromString($startCell); [$startColumn, $startRow] = Coordinate::coordinateFromString($startCell);
// Loop through $source // Loop through $source
foreach ($source as $rowData) { foreach ($source as $rowData) {
@ -2535,7 +2535,7 @@ class Worksheet implements IComparable
// Returnvalue // Returnvalue
$returnValue = []; $returnValue = [];
// Identify the range that we need to extract from the worksheet // Identify the range that we need to extract from the worksheet
list($rangeStart, $rangeEnd) = Coordinate::rangeBoundaries($pRange); [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($pRange);
$minCol = Coordinate::stringFromColumnIndex($rangeStart[0]); $minCol = Coordinate::stringFromColumnIndex($rangeStart[0]);
$minRow = $rangeStart[1]; $minRow = $rangeStart[1];
$maxCol = Coordinate::stringFromColumnIndex($rangeEnd[0]); $maxCol = Coordinate::stringFromColumnIndex($rangeEnd[0]);

View File

@ -643,7 +643,10 @@ class Html extends BaseWriter
} else { } else {
$imageDetails = getimagesize($filename); $imageDetails = getimagesize($filename);
if ($fp = fopen($filename, 'rb', 0)) { if ($fp = fopen($filename, 'rb', 0)) {
$picture = fread($fp, filesize($filename)); $picture = '';
while (!feof($fp)) {
$picture .= fread($fp, 1024);
}
fclose($fp); fclose($fp);
// base64 encode the binary data, then break it // base64 encode the binary data, then break it
// into chunks according to RFC 2045 semantics // into chunks according to RFC 2045 semantics
@ -1538,14 +1541,14 @@ class Html extends BaseWriter
// loop through all Excel merged cells // loop through all Excel merged cells
foreach ($sheet->getMergeCells() as $cells) { foreach ($sheet->getMergeCells() as $cells) {
list($cells) = Coordinate::splitRange($cells); [$cells] = Coordinate::splitRange($cells);
$first = $cells[0]; $first = $cells[0];
$last = $cells[1]; $last = $cells[1];
list($fc, $fr) = Coordinate::coordinateFromString($first); [$fc, $fr] = Coordinate::coordinateFromString($first);
$fc = Coordinate::columnIndexFromString($fc) - 1; $fc = Coordinate::columnIndexFromString($fc) - 1;
list($lc, $lr) = Coordinate::coordinateFromString($last); [$lc, $lr] = Coordinate::coordinateFromString($last);
$lc = Coordinate::columnIndexFromString($lc) - 1; $lc = Coordinate::columnIndexFromString($lc) - 1;
// loop through the individual cells in the individual merge // loop through the individual cells in the individual merge

View File

@ -383,7 +383,7 @@ class Content extends WriterPart
} }
$mergeRange = Coordinate::splitRange($cell->getMergeRange()); $mergeRange = Coordinate::splitRange($cell->getMergeRange());
list($startCell, $endCell) = $mergeRange[0]; [$startCell, $endCell] = $mergeRange[0];
$start = Coordinate::coordinateFromString($startCell); $start = Coordinate::coordinateFromString($startCell);
$end = Coordinate::coordinateFromString($endCell); $end = Coordinate::coordinateFromString($endCell);
$columnSpan = Coordinate::columnIndexFromString($end[0]) - Coordinate::columnIndexFromString($start[0]) + 1; $columnSpan = Coordinate::columnIndexFromString($end[0]) - Coordinate::columnIndexFromString($start[0]) + 1;

View File

@ -459,7 +459,7 @@ class Xls extends BaseWriter
if ($drawing instanceof Drawing) { if ($drawing instanceof Drawing) {
$filename = $drawing->getPath(); $filename = $drawing->getPath();
list($imagesx, $imagesy, $imageFormat) = getimagesize($filename); [$imagesx, $imagesy, $imageFormat] = getimagesize($filename);
switch ($imageFormat) { switch ($imageFormat) {
case 1: // GIF, not supported by BIFF8, we convert to PNG case 1: // GIF, not supported by BIFF8, we convert to PNG

View File

@ -420,7 +420,7 @@ class Escher
$recType = 0xF010; $recType = 0xF010;
// start coordinates // start coordinates
list($column, $row) = Coordinate::coordinateFromString($this->object->getStartCoordinates()); [$column, $row] = Coordinate::coordinateFromString($this->object->getStartCoordinates());
$c1 = Coordinate::columnIndexFromString($column) - 1; $c1 = Coordinate::columnIndexFromString($column) - 1;
$r1 = $row - 1; $r1 = $row - 1;
@ -431,7 +431,7 @@ class Escher
$startOffsetY = $this->object->getStartOffsetY(); $startOffsetY = $this->object->getStartOffsetY();
// end coordinates // end coordinates
list($column, $row) = Coordinate::coordinateFromString($this->object->getEndCoordinates()); [$column, $row] = Coordinate::coordinateFromString($this->object->getEndCoordinates());
$c2 = Coordinate::columnIndexFromString($column) - 1; $c2 = Coordinate::columnIndexFromString($column) - 1;
$r2 = $row - 1; $r2 = $row - 1;

View File

@ -608,15 +608,15 @@ class Parser
// TODO: possible class value 0,1,2 check Formula.pm // TODO: possible class value 0,1,2 check Formula.pm
// Split the range into 2 cell refs // Split the range into 2 cell refs
if (preg_match('/^(\$)?([A-Ia-i]?[A-Za-z])(\$)?(\d+)\:(\$)?([A-Ia-i]?[A-Za-z])(\$)?(\d+)$/', $range)) { if (preg_match('/^(\$)?([A-Ia-i]?[A-Za-z])(\$)?(\d+)\:(\$)?([A-Ia-i]?[A-Za-z])(\$)?(\d+)$/', $range)) {
list($cell1, $cell2) = explode(':', $range); [$cell1, $cell2] = explode(':', $range);
} else { } else {
// TODO: use real error codes // TODO: use real error codes
throw new WriterException('Unknown range separator'); throw new WriterException('Unknown range separator');
} }
// Convert the cell references // Convert the cell references
list($row1, $col1) = $this->cellToPackedRowcol($cell1); [$row1, $col1] = $this->cellToPackedRowcol($cell1);
list($row2, $col2) = $this->cellToPackedRowcol($cell2); [$row2, $col2] = $this->cellToPackedRowcol($cell2);
// The ptg value depends on the class of the ptg. // The ptg value depends on the class of the ptg.
if ($class == 0) { if ($class == 0) {
@ -644,20 +644,20 @@ class Parser
private function convertRange3d($token) private function convertRange3d($token)
{ {
// Split the ref at the ! symbol // Split the ref at the ! symbol
list($ext_ref, $range) = PhpspreadsheetWorksheet::extractSheetTitle($token, true); [$ext_ref, $range] = PhpspreadsheetWorksheet::extractSheetTitle($token, true);
// Convert the external reference part (different for BIFF8) // Convert the external reference part (different for BIFF8)
$ext_ref = $this->getRefIndex($ext_ref); $ext_ref = $this->getRefIndex($ext_ref);
// Split the range into 2 cell refs // Split the range into 2 cell refs
list($cell1, $cell2) = explode(':', $range); [$cell1, $cell2] = explode(':', $range);
// Convert the cell references // Convert the cell references
if (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?(\\d+)$/', $cell1)) { if (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?(\\d+)$/', $cell1)) {
list($row1, $col1) = $this->cellToPackedRowcol($cell1); [$row1, $col1] = $this->cellToPackedRowcol($cell1);
list($row2, $col2) = $this->cellToPackedRowcol($cell2); [$row2, $col2] = $this->cellToPackedRowcol($cell2);
} else { // It's a rows range (like 26:27) } else { // It's a rows range (like 26:27)
list($row1, $col1, $row2, $col2) = $this->rangeToPackedRange($cell1 . ':' . $cell2); [$row1, $col1, $row2, $col2] = $this->rangeToPackedRange($cell1 . ':' . $cell2);
} }
// The ptg value depends on the class of the ptg. // The ptg value depends on the class of the ptg.
@ -677,7 +677,7 @@ class Parser
{ {
// Convert the cell reference // Convert the cell reference
$cell_array = $this->cellToPackedRowcol($cell); $cell_array = $this->cellToPackedRowcol($cell);
list($row, $col) = $cell_array; [$row, $col] = $cell_array;
// The ptg value depends on the class of the ptg. // The ptg value depends on the class of the ptg.
$ptgRef = pack('C', $this->ptg['ptgRefA']); $ptgRef = pack('C', $this->ptg['ptgRefA']);
@ -696,13 +696,13 @@ class Parser
private function convertRef3d($cell) private function convertRef3d($cell)
{ {
// Split the ref at the ! symbol // Split the ref at the ! symbol
list($ext_ref, $cell) = PhpspreadsheetWorksheet::extractSheetTitle($cell, true); [$ext_ref, $cell] = PhpspreadsheetWorksheet::extractSheetTitle($cell, true);
// Convert the external reference part (different for BIFF8) // Convert the external reference part (different for BIFF8)
$ext_ref = $this->getRefIndex($ext_ref); $ext_ref = $this->getRefIndex($ext_ref);
// Convert the cell reference part // Convert the cell reference part
list($row, $col) = $this->cellToPackedRowcol($cell); [$row, $col] = $this->cellToPackedRowcol($cell);
// The ptg value depends on the class of the ptg. // The ptg value depends on the class of the ptg.
$ptgRef = pack('C', $this->ptg['ptgRef3dA']); $ptgRef = pack('C', $this->ptg['ptgRef3dA']);
@ -756,7 +756,7 @@ class Parser
// Check if there is a sheet range eg., Sheet1:Sheet2. // Check if there is a sheet range eg., Sheet1:Sheet2.
if (preg_match('/:/', $ext_ref)) { if (preg_match('/:/', $ext_ref)) {
list($sheet_name1, $sheet_name2) = explode(':', $ext_ref); [$sheet_name1, $sheet_name2] = explode(':', $ext_ref);
$sheet1 = $this->getSheetIndex($sheet_name1); $sheet1 = $this->getSheetIndex($sheet_name1);
if ($sheet1 == -1) { if ($sheet1 == -1) {
@ -769,7 +769,7 @@ class Parser
// Reverse max and min sheet numbers if necessary // Reverse max and min sheet numbers if necessary
if ($sheet1 > $sheet2) { if ($sheet1 > $sheet2) {
list($sheet1, $sheet2) = [$sheet2, $sheet1]; [$sheet1, $sheet2] = [$sheet2, $sheet1];
} }
} else { // Single sheet name only. } else { // Single sheet name only.
$sheet1 = $this->getSheetIndex($ext_ref); $sheet1 = $this->getSheetIndex($ext_ref);
@ -843,7 +843,7 @@ class Parser
private function cellToPackedRowcol($cell) private function cellToPackedRowcol($cell)
{ {
$cell = strtoupper($cell); $cell = strtoupper($cell);
list($row, $col, $row_rel, $col_rel) = $this->cellToRowcol($cell); [$row, $col, $row_rel, $col_rel] = $this->cellToRowcol($cell);
if ($col >= 256) { if ($col >= 256) {
throw new WriterException("Column in: $cell greater than 255"); throw new WriterException("Column in: $cell greater than 255");
} }
@ -1078,7 +1078,7 @@ class Parser
{ {
$this->currentCharacter = 0; $this->currentCharacter = 0;
$this->formula = $formula; $this->formula = $formula;
$this->lookAhead = isset($formula[1]) ? $formula[1] : ''; $this->lookAhead = $formula[1] ?? '';
$this->advance(); $this->advance();
$this->parseTree = $this->condition(); $this->parseTree = $this->condition();

View File

@ -479,7 +479,7 @@ class Worksheet extends BIFFwriter
// Hyperlinks // Hyperlinks
foreach ($phpSheet->getHyperLinkCollection() as $coordinate => $hyperlink) { foreach ($phpSheet->getHyperLinkCollection() as $coordinate => $hyperlink) {
list($column, $row) = Coordinate::coordinateFromString($coordinate); [$column, $row] = Coordinate::coordinateFromString($coordinate);
$url = $hyperlink->getUrl(); $url = $hyperlink->getUrl();
@ -1355,17 +1355,17 @@ class Worksheet extends BIFFwriter
$selectedCells = Coordinate::splitRange($this->phpSheet->getSelectedCells()); $selectedCells = Coordinate::splitRange($this->phpSheet->getSelectedCells());
$selectedCells = $selectedCells[0]; $selectedCells = $selectedCells[0];
if (count($selectedCells) == 2) { if (count($selectedCells) == 2) {
list($first, $last) = $selectedCells; [$first, $last] = $selectedCells;
} else { } else {
$first = $selectedCells[0]; $first = $selectedCells[0];
$last = $selectedCells[0]; $last = $selectedCells[0];
} }
list($colFirst, $rwFirst) = Coordinate::coordinateFromString($first); [$colFirst, $rwFirst] = Coordinate::coordinateFromString($first);
$colFirst = Coordinate::columnIndexFromString($colFirst) - 1; // base 0 column index $colFirst = Coordinate::columnIndexFromString($colFirst) - 1; // base 0 column index
--$rwFirst; // base 0 row index --$rwFirst; // base 0 row index
list($colLast, $rwLast) = Coordinate::coordinateFromString($last); [$colLast, $rwLast] = Coordinate::coordinateFromString($last);
$colLast = Coordinate::columnIndexFromString($colLast) - 1; // base 0 column index $colLast = Coordinate::columnIndexFromString($colLast) - 1; // base 0 column index
--$rwLast; // base 0 row index --$rwLast; // base 0 row index
@ -1394,11 +1394,11 @@ class Worksheet extends BIFFwriter
// Swap last row/col for first row/col as necessary // Swap last row/col for first row/col as necessary
if ($rwFirst > $rwLast) { if ($rwFirst > $rwLast) {
list($rwFirst, $rwLast) = [$rwLast, $rwFirst]; [$rwFirst, $rwLast] = [$rwLast, $rwFirst];
} }
if ($colFirst > $colLast) { if ($colFirst > $colLast) {
list($colFirst, $colLast) = [$colLast, $colFirst]; [$colFirst, $colLast] = [$colLast, $colFirst];
} }
$header = pack('vv', $record, $length); $header = pack('vv', $record, $length);
@ -1440,9 +1440,9 @@ class Worksheet extends BIFFwriter
// extract the row and column indexes // extract the row and column indexes
$range = Coordinate::splitRange($mergeCell); $range = Coordinate::splitRange($mergeCell);
list($first, $last) = $range[0]; [$first, $last] = $range[0];
list($firstColumn, $firstRow) = Coordinate::coordinateFromString($first); [$firstColumn, $firstRow] = Coordinate::coordinateFromString($first);
list($lastColumn, $lastRow) = Coordinate::coordinateFromString($last); [$lastColumn, $lastRow] = Coordinate::coordinateFromString($last);
$recordData .= pack('vvvv', $firstRow - 1, $lastRow - 1, Coordinate::columnIndexFromString($firstColumn) - 1, Coordinate::columnIndexFromString($lastColumn) - 1); $recordData .= pack('vvvv', $firstRow - 1, $lastRow - 1, Coordinate::columnIndexFromString($firstColumn) - 1, Coordinate::columnIndexFromString($lastColumn) - 1);
@ -1589,11 +1589,11 @@ class Worksheet extends BIFFwriter
{ {
$panes = []; $panes = [];
if ($this->phpSheet->getFreezePane()) { if ($this->phpSheet->getFreezePane()) {
list($column, $row) = Coordinate::coordinateFromString($this->phpSheet->getFreezePane()); [$column, $row] = Coordinate::coordinateFromString($this->phpSheet->getFreezePane());
$panes[0] = Coordinate::columnIndexFromString($column) - 1; $panes[0] = Coordinate::columnIndexFromString($column) - 1;
$panes[1] = $row - 1; $panes[1] = $row - 1;
list($leftMostColumn, $topRow) = Coordinate::coordinateFromString($this->phpSheet->getTopLeftCell()); [$leftMostColumn, $topRow] = Coordinate::coordinateFromString($this->phpSheet->getTopLeftCell());
//Coordinates are zero-based in xls files //Coordinates are zero-based in xls files
$panes[2] = $topRow - 1; $panes[2] = $topRow - 1;
$panes[3] = Coordinate::columnIndexFromString($leftMostColumn) - 1; $panes[3] = Coordinate::columnIndexFromString($leftMostColumn) - 1;
@ -1602,10 +1602,10 @@ class Worksheet extends BIFFwriter
return; return;
} }
$x = isset($panes[0]) ? $panes[0] : null; $x = $panes[0] ?? null;
$y = isset($panes[1]) ? $panes[1] : null; $y = $panes[1] ?? null;
$rwTop = isset($panes[2]) ? $panes[2] : null; $rwTop = $panes[2] ?? null;
$colLeft = isset($panes[3]) ? $panes[3] : null; $colLeft = $panes[3] ?? null;
if (count($panes) > 4) { // if Active pane was received if (count($panes) > 4) { // if Active pane was received
$pnnAct = $panes[4]; $pnnAct = $panes[4];
} else { } else {
@ -2215,7 +2215,7 @@ class Worksheet extends BIFFwriter
public function insertBitmap($row, $col, $bitmap, $x = 0, $y = 0, $scale_x = 1, $scale_y = 1) public function insertBitmap($row, $col, $bitmap, $x = 0, $y = 0, $scale_x = 1, $scale_y = 1)
{ {
$bitmap_array = (is_resource($bitmap) ? $this->processBitmapGd($bitmap) : $this->processBitmap($bitmap)); $bitmap_array = (is_resource($bitmap) ? $this->processBitmapGd($bitmap) : $this->processBitmap($bitmap));
list($width, $height, $size, $data) = $bitmap_array; [$width, $height, $size, $data] = $bitmap_array;
// Scale the frame of the image. // Scale the frame of the image.
$width *= $scale_x; $width *= $scale_x;

View File

@ -1136,7 +1136,7 @@ class Chart extends WriterPart
$fillColorValues = $plotSeriesValues->getFillColor(); $fillColorValues = $plotSeriesValues->getFillColor();
if ($fillColorValues !== null && is_array($fillColorValues)) { if ($fillColorValues !== null && is_array($fillColorValues)) {
foreach ($plotSeriesValues->getDataValues() as $dataKey => $dataValue) { foreach ($plotSeriesValues->getDataValues() as $dataKey => $dataValue) {
$this->writePlotSeriesValuesElement($objWriter, $dataKey, (isset($fillColorValues[$dataKey]) ? $fillColorValues[$dataKey] : 'FF9900')); $this->writePlotSeriesValuesElement($objWriter, $dataKey, ($fillColorValues[$dataKey] ?? 'FF9900'));
} }
} else { } else {
$this->writePlotSeriesValuesElement($objWriter); $this->writePlotSeriesValuesElement($objWriter);

View File

@ -175,7 +175,7 @@ class Comments extends WriterPart
private function writeVMLComment(XMLWriter $objWriter, $pCellReference, Comment $pComment) private function writeVMLComment(XMLWriter $objWriter, $pCellReference, Comment $pComment)
{ {
// Metadata // Metadata
list($column, $row) = Coordinate::coordinateFromString($pCellReference); [$column, $row] = Coordinate::coordinateFromString($pCellReference);
$column = Coordinate::columnIndexFromString($column); $column = Coordinate::columnIndexFromString($column);
$id = 1024 + $column + $row; $id = 1024 + $column + $row;
$id = substr($id, 0, 4); $id = substr($id, 0, 4);

View File

@ -339,7 +339,7 @@ class Workbook extends WriterPart
$range = Coordinate::splitRange($autoFilterRange); $range = Coordinate::splitRange($autoFilterRange);
$range = $range[0]; $range = $range[0];
// Strip any worksheet ref so we can make the cell ref absolute // Strip any worksheet ref so we can make the cell ref absolute
list($ws, $range[0]) = Worksheet::extractSheetTitle($range[0], true); [$ws, $range[0]] = Worksheet::extractSheetTitle($range[0], true);
$range[0] = Coordinate::absoluteCoordinate($range[0]); $range[0] = Coordinate::absoluteCoordinate($range[0]);
$range[1] = Coordinate::absoluteCoordinate($range[1]); $range[1] = Coordinate::absoluteCoordinate($range[1]);

View File

@ -251,7 +251,7 @@ class Worksheet extends WriterPart
// Pane // Pane
$pane = ''; $pane = '';
if ($pSheet->getFreezePane()) { if ($pSheet->getFreezePane()) {
list($xSplit, $ySplit) = Coordinate::coordinateFromString($pSheet->getFreezePane()); [$xSplit, $ySplit] = Coordinate::coordinateFromString($pSheet->getFreezePane());
$xSplit = Coordinate::columnIndexFromString($xSplit); $xSplit = Coordinate::columnIndexFromString($xSplit);
--$xSplit; --$xSplit;
--$ySplit; --$ySplit;
@ -752,7 +752,7 @@ class Worksheet extends WriterPart
$range = Coordinate::splitRange($autoFilterRange); $range = Coordinate::splitRange($autoFilterRange);
$range = $range[0]; $range = $range[0];
// Strip any worksheet ref // Strip any worksheet ref
list($ws, $range[0]) = PhpspreadsheetWorksheet::extractSheetTitle($range[0], true); [$ws, $range[0]] = PhpspreadsheetWorksheet::extractSheetTitle($range[0], true);
$range = implode(':', $range); $range = implode(':', $range);
$objWriter->writeAttribute('ref', str_replace('$', '', $range)); $objWriter->writeAttribute('ref', str_replace('$', '', $range));

View File

@ -52,7 +52,7 @@ class CalculationTest extends TestCase
*/ */
public function testGetFunctions($category, $functionCall, $argumentCount) public function testGetFunctions($category, $functionCall, $argumentCount)
{ {
self::assertInternalType('callable', $functionCall); self::assertIsCallable($functionCall);
} }
public function providerGetFunctions() public function providerGetFunctions()

View File

@ -37,7 +37,7 @@ class EngineeringTest extends TestCase
public function testBESSELI($expectedResult, ...$args) public function testBESSELI($expectedResult, ...$args)
{ {
$result = Engineering::BESSELI(...$args); $result = Engineering::BESSELI(...$args);
self::assertEquals($expectedResult, $result, null, self::BESSEL_PRECISION); self::assertEquals($expectedResult, $result, '', self::BESSEL_PRECISION);
} }
public function providerBESSELI() public function providerBESSELI()
@ -53,7 +53,7 @@ class EngineeringTest extends TestCase
public function testBESSELJ($expectedResult, ...$args) public function testBESSELJ($expectedResult, ...$args)
{ {
$result = Engineering::BESSELJ(...$args); $result = Engineering::BESSELJ(...$args);
self::assertEquals($expectedResult, $result, null, self::BESSEL_PRECISION); self::assertEquals($expectedResult, $result, '', self::BESSEL_PRECISION);
} }
public function providerBESSELJ() public function providerBESSELJ()
@ -69,7 +69,7 @@ class EngineeringTest extends TestCase
public function testBESSELK($expectedResult, ...$args) public function testBESSELK($expectedResult, ...$args)
{ {
$result = Engineering::BESSELK(...$args); $result = Engineering::BESSELK(...$args);
self::assertEquals($expectedResult, $result, null, self::BESSEL_PRECISION); self::assertEquals($expectedResult, $result, '', self::BESSEL_PRECISION);
} }
public function providerBESSELK() public function providerBESSELK()
@ -85,7 +85,7 @@ class EngineeringTest extends TestCase
public function testBESSELY($expectedResult, ...$args) public function testBESSELY($expectedResult, ...$args)
{ {
$result = Engineering::BESSELY(...$args); $result = Engineering::BESSELY(...$args);
self::assertEquals($expectedResult, $result, null, self::BESSEL_PRECISION); self::assertEquals($expectedResult, $result, '', self::BESSEL_PRECISION);
} }
public function providerBESSELY() public function providerBESSELY()
@ -100,7 +100,7 @@ class EngineeringTest extends TestCase
*/ */
public function testParseComplex() public function testParseComplex()
{ {
list($real, $imaginary, $suffix) = [1.23e-4, 5.67e+8, 'j']; [$real, $imaginary, $suffix] = [1.23e-4, 5.67e+8, 'j'];
$result = Engineering::parseComplex('1.23e-4+5.67e+8j'); $result = Engineering::parseComplex('1.23e-4+5.67e+8j');
$this->assertArrayHasKey('real', $result); $this->assertArrayHasKey('real', $result);
@ -136,7 +136,7 @@ class EngineeringTest extends TestCase
public function testIMAGINARY($expectedResult, $value) public function testIMAGINARY($expectedResult, $value)
{ {
$result = Engineering::IMAGINARY($value); $result = Engineering::IMAGINARY($value);
self::assertEquals($expectedResult, $result, null, self::COMPLEX_PRECISION); self::assertEquals($expectedResult, $result, '', self::COMPLEX_PRECISION);
} }
public function providerIMAGINARY() public function providerIMAGINARY()
@ -153,7 +153,7 @@ class EngineeringTest extends TestCase
public function testIMREAL($expectedResult, $value) public function testIMREAL($expectedResult, $value)
{ {
$result = Engineering::IMREAL($value); $result = Engineering::IMREAL($value);
self::assertEquals($expectedResult, $result, null, self::COMPLEX_PRECISION); self::assertEquals($expectedResult, $result, '', self::COMPLEX_PRECISION);
} }
public function providerIMREAL() public function providerIMREAL()
@ -170,7 +170,7 @@ class EngineeringTest extends TestCase
public function testIMABS($expectedResult, $value) public function testIMABS($expectedResult, $value)
{ {
$result = Engineering::IMABS($value); $result = Engineering::IMABS($value);
self::assertEquals($expectedResult, $result, null, self::COMPLEX_PRECISION); self::assertEquals($expectedResult, $result, '', self::COMPLEX_PRECISION);
} }
public function providerIMABS() public function providerIMABS()
@ -187,7 +187,7 @@ class EngineeringTest extends TestCase
public function testIMARGUMENT($expectedResult, $value) public function testIMARGUMENT($expectedResult, $value)
{ {
$result = Engineering::IMARGUMENT($value); $result = Engineering::IMARGUMENT($value);
self::assertEquals($expectedResult, $result, null, self::COMPLEX_PRECISION); self::assertEquals($expectedResult, $result, '', self::COMPLEX_PRECISION);
} }
public function providerIMARGUMENT() public function providerIMARGUMENT()
@ -618,7 +618,7 @@ class EngineeringTest extends TestCase
public function testERF($expectedResult, ...$args) public function testERF($expectedResult, ...$args)
{ {
$result = Engineering::ERF(...$args); $result = Engineering::ERF(...$args);
self::assertEquals($expectedResult, $result, null, self::ERF_PRECISION); self::assertEquals($expectedResult, $result, '', self::ERF_PRECISION);
} }
public function providerERF() public function providerERF()
@ -634,7 +634,7 @@ class EngineeringTest extends TestCase
public function testERFPRECISE($expectedResult, ...$args) public function testERFPRECISE($expectedResult, ...$args)
{ {
$result = Engineering::ERFPRECISE(...$args); $result = Engineering::ERFPRECISE(...$args);
self::assertEquals($expectedResult, $result, null, self::ERF_PRECISION); self::assertEquals($expectedResult, $result, '', self::ERF_PRECISION);
} }
public function providerERFPRECISE() public function providerERFPRECISE()
@ -650,7 +650,7 @@ class EngineeringTest extends TestCase
public function testERFC($expectedResult, ...$args) public function testERFC($expectedResult, ...$args)
{ {
$result = Engineering::ERFC(...$args); $result = Engineering::ERFC(...$args);
self::assertEquals($expectedResult, $result, null, self::ERF_PRECISION); self::assertEquals($expectedResult, $result, '', self::ERF_PRECISION);
} }
public function providerERFC() public function providerERFC()
@ -714,7 +714,7 @@ class EngineeringTest extends TestCase
public function testDEC2BIN($expectedResult, ...$args) public function testDEC2BIN($expectedResult, ...$args)
{ {
$result = Engineering::DECTOBIN(...$args); $result = Engineering::DECTOBIN(...$args);
self::assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, '');
} }
public function providerDEC2BIN() public function providerDEC2BIN()
@ -730,7 +730,7 @@ class EngineeringTest extends TestCase
public function testDEC2HEX($expectedResult, ...$args) public function testDEC2HEX($expectedResult, ...$args)
{ {
$result = Engineering::DECTOHEX(...$args); $result = Engineering::DECTOHEX(...$args);
self::assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, '');
} }
public function providerDEC2HEX() public function providerDEC2HEX()
@ -746,7 +746,7 @@ class EngineeringTest extends TestCase
public function testDEC2OCT($expectedResult, ...$args) public function testDEC2OCT($expectedResult, ...$args)
{ {
$result = Engineering::DECTOOCT(...$args); $result = Engineering::DECTOOCT(...$args);
self::assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, '');
} }
public function providerDEC2OCT() public function providerDEC2OCT()
@ -762,7 +762,7 @@ class EngineeringTest extends TestCase
public function testHEX2BIN($expectedResult, ...$args) public function testHEX2BIN($expectedResult, ...$args)
{ {
$result = Engineering::HEXTOBIN(...$args); $result = Engineering::HEXTOBIN(...$args);
self::assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, '');
} }
public function providerHEX2BIN() public function providerHEX2BIN()
@ -778,7 +778,7 @@ class EngineeringTest extends TestCase
public function testHEX2DEC($expectedResult, ...$args) public function testHEX2DEC($expectedResult, ...$args)
{ {
$result = Engineering::HEXTODEC(...$args); $result = Engineering::HEXTODEC(...$args);
self::assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, '');
} }
public function providerHEX2DEC() public function providerHEX2DEC()
@ -794,7 +794,7 @@ class EngineeringTest extends TestCase
public function testHEX2OCT($expectedResult, ...$args) public function testHEX2OCT($expectedResult, ...$args)
{ {
$result = Engineering::HEXTOOCT(...$args); $result = Engineering::HEXTOOCT(...$args);
self::assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, '');
} }
public function providerHEX2OCT() public function providerHEX2OCT()
@ -810,7 +810,7 @@ class EngineeringTest extends TestCase
public function testOCT2BIN($expectedResult, ...$args) public function testOCT2BIN($expectedResult, ...$args)
{ {
$result = Engineering::OCTTOBIN(...$args); $result = Engineering::OCTTOBIN(...$args);
self::assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, '');
} }
public function providerOCT2BIN() public function providerOCT2BIN()
@ -826,7 +826,7 @@ class EngineeringTest extends TestCase
public function testOCT2DEC($expectedResult, ...$args) public function testOCT2DEC($expectedResult, ...$args)
{ {
$result = Engineering::OCTTODEC(...$args); $result = Engineering::OCTTODEC(...$args);
self::assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, '');
} }
public function providerOCT2DEC() public function providerOCT2DEC()
@ -842,7 +842,7 @@ class EngineeringTest extends TestCase
public function testOCT2HEX($expectedResult, ...$args) public function testOCT2HEX($expectedResult, ...$args)
{ {
$result = Engineering::OCTTOHEX(...$args); $result = Engineering::OCTTOHEX(...$args);
self::assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, '');
} }
public function providerOCT2HEX() public function providerOCT2HEX()
@ -859,7 +859,7 @@ class EngineeringTest extends TestCase
public function testBITAND($expectedResult, array $args) public function testBITAND($expectedResult, array $args)
{ {
$result = Engineering::BITAND(...$args); $result = Engineering::BITAND(...$args);
self::assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, '');
} }
public function providerBITAND() public function providerBITAND()
@ -876,7 +876,7 @@ class EngineeringTest extends TestCase
public function testBITOR($expectedResult, array $args) public function testBITOR($expectedResult, array $args)
{ {
$result = Engineering::BITOR(...$args); $result = Engineering::BITOR(...$args);
self::assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, '');
} }
public function providerBITOR() public function providerBITOR()
@ -893,7 +893,7 @@ class EngineeringTest extends TestCase
public function testBITXOR($expectedResult, array $args) public function testBITXOR($expectedResult, array $args)
{ {
$result = Engineering::BITXOR(...$args); $result = Engineering::BITXOR(...$args);
self::assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, '');
} }
public function providerBITXOR() public function providerBITXOR()
@ -910,7 +910,7 @@ class EngineeringTest extends TestCase
public function testBITLSHIFT($expectedResult, array $args) public function testBITLSHIFT($expectedResult, array $args)
{ {
$result = Engineering::BITLSHIFT(...$args); $result = Engineering::BITLSHIFT(...$args);
self::assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, '');
} }
public function providerBITLSHIFT() public function providerBITLSHIFT()
@ -927,7 +927,7 @@ class EngineeringTest extends TestCase
public function testBITRSHIFT($expectedResult, array $args) public function testBITRSHIFT($expectedResult, array $args)
{ {
$result = Engineering::BITRSHIFT(...$args); $result = Engineering::BITRSHIFT(...$args);
self::assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, '');
} }
public function providerBITRSHIFT() public function providerBITRSHIFT()
@ -943,7 +943,7 @@ class EngineeringTest extends TestCase
public function testDELTA($expectedResult, ...$args) public function testDELTA($expectedResult, ...$args)
{ {
$result = Engineering::DELTA(...$args); $result = Engineering::DELTA(...$args);
self::assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, '');
} }
public function providerDELTA() public function providerDELTA()
@ -959,7 +959,7 @@ class EngineeringTest extends TestCase
public function testGESTEP($expectedResult, ...$args) public function testGESTEP($expectedResult, ...$args)
{ {
$result = Engineering::GESTEP(...$args); $result = Engineering::GESTEP(...$args);
self::assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, '');
} }
public function providerGESTEP() public function providerGESTEP()
@ -970,25 +970,25 @@ class EngineeringTest extends TestCase
public function testGetConversionGroups() public function testGetConversionGroups()
{ {
$result = Engineering::getConversionGroups(); $result = Engineering::getConversionGroups();
self::assertInternalType('array', $result); self::assertIsArray($result);
} }
public function testGetConversionGroupUnits() public function testGetConversionGroupUnits()
{ {
$result = Engineering::getConversionGroupUnits(); $result = Engineering::getConversionGroupUnits();
self::assertInternalType('array', $result); self::assertIsArray($result);
} }
public function testGetConversionGroupUnitDetails() public function testGetConversionGroupUnitDetails()
{ {
$result = Engineering::getConversionGroupUnitDetails(); $result = Engineering::getConversionGroupUnitDetails();
self::assertInternalType('array', $result); self::assertIsArray($result);
} }
public function testGetConversionMultipliers() public function testGetConversionMultipliers()
{ {
$result = Engineering::getConversionMultipliers(); $result = Engineering::getConversionMultipliers();
self::assertInternalType('array', $result); self::assertIsArray($result);
} }
/** /**
@ -999,7 +999,7 @@ class EngineeringTest extends TestCase
public function testCONVERTUOM($expectedResult, ...$args) public function testCONVERTUOM($expectedResult, ...$args)
{ {
$result = Engineering::CONVERTUOM(...$args); $result = Engineering::CONVERTUOM(...$args);
self::assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, '');
} }
public function providerCONVERTUOM() public function providerCONVERTUOM()

View File

@ -49,7 +49,7 @@ class DateTest extends TestCase
$result = DateTime::DATE(2012, 1, 31); $result = DateTime::DATE(2012, 1, 31);
// Must return an object... // Must return an object...
$this->assertInternalType('object', $result); self::assertIsObject($result);
// ... of the correct type // ... of the correct type
$this->assertTrue(is_a($result, 'DateTimeInterface')); $this->assertTrue(is_a($result, 'DateTimeInterface'));
// ... with the correct value // ... with the correct value

View File

@ -2,6 +2,7 @@
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\DateTime; namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\DateTime;
use DateTimeInterface;
use PhpOffice\PhpSpreadsheet\Calculation\DateTime; use PhpOffice\PhpSpreadsheet\Calculation\DateTime;
use PhpOffice\PhpSpreadsheet\Calculation\Functions; use PhpOffice\PhpSpreadsheet\Calculation\Functions;
use PhpOffice\PhpSpreadsheet\Shared\Date; use PhpOffice\PhpSpreadsheet\Shared\Date;
@ -47,9 +48,9 @@ class DateValueTest extends TestCase
$result = DateTime::DATEVALUE('2012-1-31'); $result = DateTime::DATEVALUE('2012-1-31');
// Must return an object... // Must return an object...
$this->assertInternalType('object', $result); self::assertIsObject($result);
// ... of the correct type // ... of the correct type
$this->assertTrue(is_a($result, 'DateTimeInterface')); $this->assertTrue(is_a($result, DateTimeInterface::class));
// ... with the correct value // ... with the correct value
$this->assertEquals($result->format('d-M-Y'), '31-Jan-2012'); $this->assertEquals($result->format('d-M-Y'), '31-Jan-2012');
} }

View File

@ -48,7 +48,7 @@ class EDateTest extends TestCase
$result = DateTime::EDATE('2012-1-26', -1); $result = DateTime::EDATE('2012-1-26', -1);
// Must return an object... // Must return an object...
$this->assertInternalType('object', $result); self::assertIsObject($result);
// ... of the correct type // ... of the correct type
$this->assertTrue(is_a($result, 'DateTimeInterface')); $this->assertTrue(is_a($result, 'DateTimeInterface'));
// ... with the correct value // ... with the correct value

View File

@ -48,7 +48,7 @@ class EoMonthTest extends TestCase
$result = DateTime::EOMONTH('2012-1-26', -1); $result = DateTime::EOMONTH('2012-1-26', -1);
// Must return an object... // Must return an object...
$this->assertInternalType('object', $result); self::assertIsObject($result);
// ... of the correct type // ... of the correct type
$this->assertTrue(is_a($result, 'DateTimeInterface')); $this->assertTrue(is_a($result, 'DateTimeInterface'));
// ... with the correct value // ... with the correct value

View File

@ -46,7 +46,7 @@ class TimeTest extends TestCase
$result = DateTime::TIME(7, 30, 20); $result = DateTime::TIME(7, 30, 20);
// Must return an object... // Must return an object...
$this->assertInternalType('object', $result); self::assertIsObject($result);
// ... of the correct type // ... of the correct type
$this->assertTrue(is_a($result, 'DateTimeInterface')); $this->assertTrue(is_a($result, 'DateTimeInterface'));
// ... with the correct value // ... with the correct value

View File

@ -46,7 +46,7 @@ class TimeValueTest extends TestCase
$result = DateTime::TIMEVALUE('7:30:20'); $result = DateTime::TIMEVALUE('7:30:20');
// Must return an object... // Must return an object...
$this->assertInternalType('object', $result); self::assertIsObject($result);
// ... of the correct type // ... of the correct type
$this->assertTrue(is_a($result, 'DateTimeInterface')); $this->assertTrue(is_a($result, 'DateTimeInterface'));
// ... with the correct value // ... with the correct value

View File

@ -114,7 +114,7 @@ class FunctionsTest extends TestCase
public function testIsBlank($expectedResult, ...$args) public function testIsBlank($expectedResult, ...$args)
{ {
$result = Functions::isBlank(...$args); $result = Functions::isBlank(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, '', 1E-8);
} }
public function providerIsBlank() public function providerIsBlank()
@ -130,7 +130,7 @@ class FunctionsTest extends TestCase
public function testIsErr($expectedResult, ...$args) public function testIsErr($expectedResult, ...$args)
{ {
$result = Functions::isErr(...$args); $result = Functions::isErr(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, '', 1E-8);
} }
public function providerIsErr() public function providerIsErr()
@ -146,7 +146,7 @@ class FunctionsTest extends TestCase
public function testIsError($expectedResult, ...$args) public function testIsError($expectedResult, ...$args)
{ {
$result = Functions::isError(...$args); $result = Functions::isError(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, '', 1E-8);
} }
public function providerIsError() public function providerIsError()
@ -162,7 +162,7 @@ class FunctionsTest extends TestCase
public function testErrorType($expectedResult, ...$args) public function testErrorType($expectedResult, ...$args)
{ {
$result = Functions::errorType(...$args); $result = Functions::errorType(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, '', 1E-8);
} }
public function providerErrorType() public function providerErrorType()
@ -178,7 +178,7 @@ class FunctionsTest extends TestCase
public function testIsLogical($expectedResult, ...$args) public function testIsLogical($expectedResult, ...$args)
{ {
$result = Functions::isLogical(...$args); $result = Functions::isLogical(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, '', 1E-8);
} }
public function providerIsLogical() public function providerIsLogical()
@ -194,7 +194,7 @@ class FunctionsTest extends TestCase
public function testIsNa($expectedResult, ...$args) public function testIsNa($expectedResult, ...$args)
{ {
$result = Functions::isNa(...$args); $result = Functions::isNa(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, '', 1E-8);
} }
public function providerIsNa() public function providerIsNa()
@ -210,7 +210,7 @@ class FunctionsTest extends TestCase
public function testIsNumber($expectedResult, ...$args) public function testIsNumber($expectedResult, ...$args)
{ {
$result = Functions::isNumber(...$args); $result = Functions::isNumber(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, '', 1E-8);
} }
public function providerIsNumber() public function providerIsNumber()
@ -226,7 +226,7 @@ class FunctionsTest extends TestCase
public function testIsText($expectedResult, ...$args) public function testIsText($expectedResult, ...$args)
{ {
$result = Functions::isText(...$args); $result = Functions::isText(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, '', 1E-8);
} }
public function providerIsText() public function providerIsText()
@ -242,7 +242,7 @@ class FunctionsTest extends TestCase
public function testIsNonText($expectedResult, ...$args) public function testIsNonText($expectedResult, ...$args)
{ {
$result = Functions::isNonText(...$args); $result = Functions::isNonText(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, '', 1E-8);
} }
public function providerIsNonText() public function providerIsNonText()
@ -258,7 +258,7 @@ class FunctionsTest extends TestCase
public function testIsEven($expectedResult, ...$args) public function testIsEven($expectedResult, ...$args)
{ {
$result = Functions::isEven(...$args); $result = Functions::isEven(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, '', 1E-8);
} }
public function providerIsEven() public function providerIsEven()
@ -274,7 +274,7 @@ class FunctionsTest extends TestCase
public function testIsOdd($expectedResult, ...$args) public function testIsOdd($expectedResult, ...$args)
{ {
$result = Functions::isOdd(...$args); $result = Functions::isOdd(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, '', 1E-8);
} }
public function providerIsOdd() public function providerIsOdd()
@ -290,7 +290,7 @@ class FunctionsTest extends TestCase
public function testTYPE($expectedResult, ...$args) public function testTYPE($expectedResult, ...$args)
{ {
$result = Functions::TYPE(...$args); $result = Functions::TYPE(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, '', 1E-8);
} }
public function providerTYPE() public function providerTYPE()
@ -306,7 +306,7 @@ class FunctionsTest extends TestCase
public function testN($expectedResult, ...$args) public function testN($expectedResult, ...$args)
{ {
$result = Functions::n(...$args); $result = Functions::n(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, '', 1E-8);
} }
public function providerN() public function providerN()
@ -359,7 +359,7 @@ class FunctionsTest extends TestCase
} }
$result = Functions::isFormula($reference, $ourCell); $result = Functions::isFormula($reference, $ourCell);
self::assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, '', 1E-8);
} }
public function providerIsFormula() public function providerIsFormula()

View File

@ -178,7 +178,7 @@ class LookupRefTest extends TestCase
} }
$result = LookupRef::FORMULATEXT($reference, $ourCell); $result = LookupRef::FORMULATEXT($reference, $ourCell);
self::assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, '', 1E-8);
} }
public function providerFormulaText() public function providerFormulaText()

View File

@ -362,7 +362,7 @@ class TextDataTest extends TestCase
StringHelper::setCurrencyCode('$'); StringHelper::setCurrencyCode('$');
$result = TextData::VALUE(...$args); $result = TextData::VALUE(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, '', 1E-8);
} }
public function providerVALUE() public function providerVALUE()
@ -383,7 +383,7 @@ class TextDataTest extends TestCase
StringHelper::setCurrencyCode('$'); StringHelper::setCurrencyCode('$');
$result = TextData::EXACT(...$args); $result = TextData::EXACT(...$args);
self::assertSame($expectedResult, $result, null); self::assertSame($expectedResult, $result);
} }
/** /**

View File

@ -243,10 +243,6 @@ class CoordinateTest extends TestCase
{ {
$this->expectException(\TypeError::class); $this->expectException(\TypeError::class);
if (PHP_MAJOR_VERSION < 7) {
$this->markTestSkipped('Cannot catch type hinting error with PHP 5.6');
}
$cellRange = ''; $cellRange = '';
Coordinate::buildRange($cellRange); Coordinate::buildRange($cellRange);
} }

View File

@ -10,7 +10,7 @@ class DataTypeTest extends TestCase
public function testGetErrorCodes() public function testGetErrorCodes()
{ {
$result = DataType::getErrorCodes(); $result = DataType::getErrorCodes();
self::assertInternalType('array', $result); self::assertIsArray($result);
self::assertGreaterThan(0, count($result)); self::assertGreaterThan(0, count($result));
self::assertArrayHasKey('#NULL!', $result); self::assertArrayHasKey('#NULL!', $result);
} }

View File

@ -21,6 +21,8 @@ class SampleTest extends TestCase
}); });
require $sample; require $sample;
self::assertTrue(true);
} }
public function providerSample() public function providerSample()

View File

@ -240,28 +240,28 @@ class OdsTest extends TestCase
$properties = $spreadsheet->getProperties(); $properties = $spreadsheet->getProperties();
// Core Properties // Core Properties
// $this->assertSame('Mark Baker', $properties->getCreator()); // self::assertSame('Mark Baker', $properties->getCreator());
$this->assertSame('Property Test File', $properties->getTitle()); self::assertSame('Property Test File', $properties->getTitle());
$this->assertSame('Testing for Properties', $properties->getSubject()); self::assertSame('Testing for Properties', $properties->getSubject());
$this->assertSame('TEST ODS PHPSpreadsheet', $properties->getKeywords()); self::assertSame('TEST ODS PHPSpreadsheet', $properties->getKeywords());
// Extended Properties // Extended Properties
// $this->assertSame('PHPOffice', $properties->getCompany()); // self::assertSame('PHPOffice', $properties->getCompany());
// $this->assertSame('The Big Boss', $properties->getManager()); // self::assertSame('The Big Boss', $properties->getManager());
// Custom Properties // Custom Properties
$customProperties = $properties->getCustomProperties(); $customProperties = $properties->getCustomProperties();
$this->assertInternalType('array', $customProperties); self::assertIsArray($customProperties);
$customProperties = array_flip($customProperties); $customProperties = array_flip($customProperties);
$this->assertArrayHasKey('TestDate', $customProperties); self::assertArrayHasKey('TestDate', $customProperties);
foreach ($customPropertySet as $propertyName => $testData) { foreach ($customPropertySet as $propertyName => $testData) {
$this->assertTrue($properties->isCustomPropertySet($propertyName)); self::assertTrue($properties->isCustomPropertySet($propertyName));
$this->assertSame($testData['type'], $properties->getCustomPropertyType($propertyName)); self::assertSame($testData['type'], $properties->getCustomPropertyType($propertyName));
if ($properties->getCustomPropertyType($propertyName) == Properties::PROPERTY_TYPE_DATE) { if ($properties->getCustomPropertyType($propertyName) == Properties::PROPERTY_TYPE_DATE) {
$this->assertSame($testData['value'], date('Y-m-d', $properties->getCustomPropertyValue($propertyName))); self::assertSame($testData['value'], date('Y-m-d', $properties->getCustomPropertyValue($propertyName)));
} else { } else {
$this->assertSame($testData['value'], $properties->getCustomPropertyValue($propertyName)); self::assertSame($testData['value'], $properties->getCustomPropertyValue($propertyName));
} }
} }
} }

View File

@ -82,7 +82,7 @@ class XmlScannerTest extends TestCase
$scanner = $fileReader->getSecurityScanner(); $scanner = $fileReader->getSecurityScanner();
// Must return an object... // Must return an object...
$this->assertInternalType('object', $scanner); self::assertIsObject($scanner);
// ... of the correct type // ... of the correct type
$this->assertInstanceOf(XmlScanner::class, $scanner); $this->assertInstanceOf(XmlScanner::class, $scanner);
} }

View File

@ -40,7 +40,7 @@ class XlsxTest extends TestCase
// Custom Properties // Custom Properties
$customProperties = $properties->getCustomProperties(); $customProperties = $properties->getCustomProperties();
$this->assertInternalType('array', $customProperties); self::assertIsArray($customProperties);
$customProperties = array_flip($customProperties); $customProperties = array_flip($customProperties);
$this->assertArrayHasKey('Publisher', $customProperties); $this->assertArrayHasKey('Publisher', $customProperties);

View File

@ -55,7 +55,7 @@ class DateTest extends TestCase
Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);
$result = Date::timestampToExcel(...$args); $result = Date::timestampToExcel(...$args);
self::assertEquals($expectedResult, $result, null, 1E-5); self::assertEquals($expectedResult, $result, '', 1E-5);
} }
public function providerDateTimeTimestampToExcel1900() public function providerDateTimeTimestampToExcel1900()
@ -73,7 +73,7 @@ class DateTest extends TestCase
Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);
$result = Date::dateTimeToExcel(...$args); $result = Date::dateTimeToExcel(...$args);
self::assertEquals($expectedResult, $result, null, 1E-5); self::assertEquals($expectedResult, $result, '', 1E-5);
} }
public function providerDateTimeDateTimeToExcel() public function providerDateTimeDateTimeToExcel()
@ -91,7 +91,7 @@ class DateTest extends TestCase
Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);
$result = Date::formattedPHPToExcel(...$args); $result = Date::formattedPHPToExcel(...$args);
self::assertEquals($expectedResult, $result, null, 1E-5); self::assertEquals($expectedResult, $result, '', 1E-5);
} }
public function providerDateTimeFormattedPHPToExcel1900() public function providerDateTimeFormattedPHPToExcel1900()
@ -127,7 +127,7 @@ class DateTest extends TestCase
Date::setExcelCalendar(Date::CALENDAR_MAC_1904); Date::setExcelCalendar(Date::CALENDAR_MAC_1904);
$result = Date::timestampToExcel(...$args); $result = Date::timestampToExcel(...$args);
self::assertEquals($expectedResult, $result, null, 1E-5); self::assertEquals($expectedResult, $result, '', 1E-5);
} }
public function providerDateTimeTimestampToExcel1904() public function providerDateTimeTimestampToExcel1904()

View File

@ -127,7 +127,7 @@ class ColumnTest extends TestCase
$this->testAutoFilterColumnObject->setAttributes($attributeSet); $this->testAutoFilterColumnObject->setAttributes($attributeSet);
$result = $this->testAutoFilterColumnObject->getAttributes(); $result = $this->testAutoFilterColumnObject->getAttributes();
self::assertInternalType('array', $result); self::assertIsArray($result);
self::assertCount(count($attributeSet), $result); self::assertCount(count($attributeSet), $result);
} }

View File

@ -111,7 +111,7 @@ class AutoFilterTest extends TestCase
{ {
// There should be no columns yet defined // There should be no columns yet defined
$result = $this->testAutoFilterObject->getColumns(); $result = $this->testAutoFilterObject->getColumns();
self::assertInternalType('array', $result); self::assertIsArray($result);
self::assertCount(0, $result); self::assertCount(0, $result);
} }
@ -151,7 +151,7 @@ class AutoFilterTest extends TestCase
$result = $this->testAutoFilterObject->getColumns(); $result = $this->testAutoFilterObject->getColumns();
// Result should be an array of \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet\AutoFilter\Column // Result should be an array of \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet\AutoFilter\Column
// objects for each column we set indexed by the column ID // objects for each column we set indexed by the column ID
self::assertInternalType('array', $result); self::assertIsArray($result);
self::assertCount(1, $result); self::assertCount(1, $result);
self::assertArrayHasKey($expectedResult, $result); self::assertArrayHasKey($expectedResult, $result);
self::assertInstanceOf(Column::class, $result[$expectedResult]); self::assertInstanceOf(Column::class, $result[$expectedResult]);
@ -178,7 +178,7 @@ class AutoFilterTest extends TestCase
$result = $this->testAutoFilterObject->getColumns(); $result = $this->testAutoFilterObject->getColumns();
// Result should be an array of \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet\AutoFilter\Column // Result should be an array of \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet\AutoFilter\Column
// objects for each column we set indexed by the column ID // objects for each column we set indexed by the column ID
self::assertInternalType('array', $result); self::assertIsArray($result);
self::assertCount(1, $result); self::assertCount(1, $result);
self::assertArrayHasKey($expectedResult, $result); self::assertArrayHasKey($expectedResult, $result);
self::assertInstanceOf(Column::class, $result[$expectedResult]); self::assertInstanceOf(Column::class, $result[$expectedResult]);
@ -211,7 +211,7 @@ class AutoFilterTest extends TestCase
$result = $this->testAutoFilterObject->getColumns(); $result = $this->testAutoFilterObject->getColumns();
// Result should be an array of \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet\AutoFilter\Column // Result should be an array of \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet\AutoFilter\Column
// objects for each column we set indexed by the column ID // objects for each column we set indexed by the column ID
self::assertInternalType('array', $result); self::assertIsArray($result);
self::assertCount(count($columnIndexes), $result); self::assertCount(count($columnIndexes), $result);
foreach ($columnIndexes as $columnIndex) { foreach ($columnIndexes as $columnIndex) {
self::assertArrayHasKey($columnIndex, $result); self::assertArrayHasKey($columnIndex, $result);
@ -288,7 +288,7 @@ class AutoFilterTest extends TestCase
// Column array should be cleared // Column array should be cleared
$result = $this->testAutoFilterObject->getColumns(); $result = $this->testAutoFilterObject->getColumns();
self::assertInternalType('array', $result); self::assertIsArray($result);
self::assertCount(0, $result); self::assertCount(0, $result);
} }
@ -318,7 +318,7 @@ class AutoFilterTest extends TestCase
// Only columns that existed in the original range and that // Only columns that existed in the original range and that
// still fall within the new range should be retained // still fall within the new range should be retained
$result = $this->testAutoFilterObject->getColumns(); $result = $this->testAutoFilterObject->getColumns();
self::assertInternalType('array', $result); self::assertIsArray($result);
self::assertCount(count($columnIndexes1), $result); self::assertCount(count($columnIndexes1), $result);
} }

View File

@ -137,6 +137,7 @@ class WorksheetTest extends TestCase
['B2', '', '', 'B2'], ['B2', '', '', 'B2'],
['testTitle!B2', 'testTitle', 'B2', 'B2'], ['testTitle!B2', 'testTitle', 'B2', 'B2'],
['test!Title!B2', 'test!Title', 'B2', 'B2'], ['test!Title!B2', 'test!Title', 'B2', 'B2'],
['test Title!B2', 'test Title', 'B2', 'B2'],
]; ];
} }

View File

@ -81,4 +81,14 @@ return [
'\'Worksheet1\'!A16', '\'Worksheet1\'!A16',
'123', '123',
], ],
[
true,
'A17',
'=\'Work sheet1\'!A1',
],
[
true,
'A18',
'=\'Work!sheet1\'!A1',
],
]; ];

View File

@ -21,11 +21,26 @@ return [
'A4', 'A4',
'=\'Worksheet1\'!A1', '=\'Worksheet1\'!A1',
], ],
[
'=\'Works heet1\'!A1',
'A4',
'=\'Works heet1\'!A1',
],
[ [
'="HELLO WORLD"', '="HELLO WORLD"',
'\'Worksheet1\'!A5', '\'Worksheet1\'!A5',
'="HELLO WORLD"', '="HELLO WORLD"',
], ],
[
'="HELLO WORLD"',
'\'Work sheet1\'!A5',
'="HELLO WORLD"',
],
[
'="HELLO WORLD"',
'\'Work!sheet1\'!A5',
'="HELLO WORLD"',
],
[ [
'#N/A', '#N/A',
'\'Worksheet1\'!A6', '\'Worksheet1\'!A6',

View File

@ -37,17 +37,17 @@ return [
'#,##0.00', '#,##0.00',
], ],
[ [
'1.23E05', '1.23E+5',
123456.789, 123456.789,
'0.00E+00', '0.00E+00',
], ],
[ [
'-1.23E05', '-1.23E+5',
-123456.789, -123456.789,
'0.00E+00', '0.00E+00',
], ],
[ [
'1.23E-05', '1.23E-5',
1.2345E-5, 1.2345E-5,
'0.00E+00', '0.00E+00',
], ],

View File

@ -29,7 +29,7 @@ return [
'##0', '##0',
], ],
[ [
'12.0', '12.00',
12, 12,
'#.0#', '#.0#',
], ],
@ -263,12 +263,12 @@ return [
[ [
'-70', '-70',
-70, -70,
'#,##0;[Red]-#,##0' '#,##0;[Red]-#,##0',
], ],
[ [
'-12,345', '-12,345',
-12345, -12345,
'#,##0;[Red]-#,##0' '#,##0;[Red]-#,##0',
], ],
// Multiple colors // Multiple colors
[ [