Use `::class` notation as much as possible
``` * , _/^\_ < > * /.-.\ * * `/&\` * ,@.*;@, /_o.I %_\ * * (`'--:o(_@; /`;--.,__ `') * ;@`o % O,*`'`&\ * (`'--)_@ ;o %'()\ * /`;--._`''--._O'@; /&*,()~o`;-.,_ `""`) * /`,@ ;+& () o*`;-';\ (`""--.,_0 +% @' &()\ /-.,_ ``''--....-'`) * * /@%;o`:;'--,.__ __.'\ ;*,&(); @ % &^;~`"`o;@(); * /(); o^~; & ().o@*&`;&%O\ jgs `"="==""==,,,.,="=="==="` __.----.(\-''#####---...___...-----._ '` \)_`"""""` .--' ') o( )_-\ `"""` ` ```
This commit is contained in:
parent
a045a446d5
commit
56245d558e
File diff suppressed because it is too large
Load Diff
|
@ -31,7 +31,7 @@ class ExceptionHandler
|
|||
*/
|
||||
public function __construct()
|
||||
{
|
||||
set_error_handler(['\\PhpOffice\\PhpSpreadsheet\\Calculation\\Exception', 'errorHandlerCallback'], E_ALL);
|
||||
set_error_handler([\PhpOffice\PhpSpreadsheet\Calculation\Exception::class, 'errorHandlerCallback'], E_ALL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -212,7 +212,7 @@ class OLE
|
|||
{
|
||||
static $isRegistered = false;
|
||||
if (!$isRegistered) {
|
||||
stream_wrapper_register('ole-chainedblockstream', '\\PhpOffice\\PhpSpreadsheet\\Shared\\OLE\\ChainedBlockStream');
|
||||
stream_wrapper_register('ole-chainedblockstream', \PhpOffice\PhpSpreadsheet\Shared\OLE\ChainedBlockStream::class);
|
||||
$isRegistered = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -802,7 +802,7 @@ class AutoFilter
|
|||
// Execute the filter test
|
||||
$result = $result &&
|
||||
call_user_func_array(
|
||||
['\\PhpOffice\\PhpSpreadsheet\\Worksheet\\AutoFilter', $columnFilterTest['method']],
|
||||
[self::class, $columnFilterTest['method']],
|
||||
[$cellValue, $columnFilterTest['arguments']]
|
||||
);
|
||||
// If filter test has resulted in FALSE, exit the loop straightaway rather than running any more tests
|
||||
|
|
|
@ -116,19 +116,19 @@ class Xlsx extends BaseWriter implements IWriter
|
|||
$this->setSpreadsheet($spreadsheet);
|
||||
|
||||
$writerPartsArray = [
|
||||
'stringtable' => '\\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\StringTable',
|
||||
'contenttypes' => '\\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\ContentTypes',
|
||||
'docprops' => '\\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\DocProps',
|
||||
'rels' => '\\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Rels',
|
||||
'theme' => '\\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Theme',
|
||||
'style' => '\\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Style',
|
||||
'workbook' => '\\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Workbook',
|
||||
'worksheet' => '\\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Worksheet',
|
||||
'drawing' => '\\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Drawing',
|
||||
'comments' => '\\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Comments',
|
||||
'chart' => '\\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\Chart',
|
||||
'relsvba' => '\\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\RelsVBA',
|
||||
'relsribbonobjects' => '\\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\RelsRibbon',
|
||||
'stringtable' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\StringTable::class,
|
||||
'contenttypes' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\ContentTypes::class,
|
||||
'docprops' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\DocProps::class,
|
||||
'rels' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Rels::class,
|
||||
'theme' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Theme::class,
|
||||
'style' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Style::class,
|
||||
'workbook' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Workbook::class,
|
||||
'worksheet' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Worksheet::class,
|
||||
'drawing' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Drawing::class,
|
||||
'comments' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Comments::class,
|
||||
'chart' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Chart::class,
|
||||
'relsvba' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\RelsVBA::class,
|
||||
'relsribbonobjects' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\RelsRibbon::class,
|
||||
];
|
||||
|
||||
// Initialise writer parts
|
||||
|
|
|
@ -51,4 +51,13 @@ class CalculationTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
return Calculation::getInstance()->getFunctions();
|
||||
}
|
||||
|
||||
public function testIsImplemented()
|
||||
{
|
||||
$calculation = Calculation::getInstance();
|
||||
$this->assertFalse($calculation->isImplemented('non-existing-function'));
|
||||
$this->assertFalse($calculation->isImplemented('AREAS'));
|
||||
$this->assertTrue($calculation->isImplemented('coUNt'));
|
||||
$this->assertTrue($calculation->isImplemented('abs'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue