mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
cs: Enable risky rule is_null
.
This commit is contained in:
@@ -520,8 +520,8 @@ class ExportManager
|
||||
if ($element instanceof ExportInterface || $element instanceof DirectExportInterface) {
|
||||
$role = $element->requiredRole();
|
||||
} elseif ($element instanceof ModifierInterface) {
|
||||
if (is_null($element->addRole())) {
|
||||
if (is_null($export)) {
|
||||
if (null === $element->addRole()) {
|
||||
if (null === $export) {
|
||||
throw new LogicException('The export should not be null: as the '
|
||||
. 'ModifierInstance element is not an export, we should '
|
||||
. 'be aware of the export to determine which role is required');
|
||||
|
@@ -342,20 +342,17 @@ class SpreadSheetFormatter implements FormatterInterface
|
||||
|
||||
switch ($this->formatterData['format']) {
|
||||
case 'ods':
|
||||
$writer = \PhpOffice\PhpSpreadsheet\IOFactory
|
||||
::createWriter($spreadsheet, 'Ods');
|
||||
$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Ods');
|
||||
|
||||
break;
|
||||
|
||||
case 'xlsx':
|
||||
$writer = \PhpOffice\PhpSpreadsheet\IOFactory
|
||||
::createWriter($spreadsheet, 'Xlsx');
|
||||
$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Xlsx');
|
||||
|
||||
break;
|
||||
|
||||
case 'csv':
|
||||
$writer = \PhpOffice\PhpSpreadsheet\IOFactory
|
||||
::createWriter($spreadsheet, 'Csv');
|
||||
$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Csv');
|
||||
|
||||
break;
|
||||
|
||||
|
@@ -167,23 +167,20 @@ class SpreadsheetListFormatter implements FormatterInterface
|
||||
|
||||
switch ($this->formatterData['format']) {
|
||||
case 'ods':
|
||||
$writer = \PhpOffice\PhpSpreadsheet\IOFactory
|
||||
::createWriter($spreadsheet, 'Ods');
|
||||
$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Ods');
|
||||
$contentType = 'application/vnd.oasis.opendocument.spreadsheet';
|
||||
|
||||
break;
|
||||
|
||||
case 'xlsx':
|
||||
$writer = \PhpOffice\PhpSpreadsheet\IOFactory
|
||||
::createWriter($spreadsheet, 'Xlsx');
|
||||
$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Xlsx');
|
||||
$contentType = 'application/vnd.openxmlformats-officedocument.'
|
||||
. 'spreadsheetml.sheet';
|
||||
|
||||
break;
|
||||
|
||||
case 'csv':
|
||||
$writer = \PhpOffice\PhpSpreadsheet\IOFactory
|
||||
::createWriter($spreadsheet, 'Csv');
|
||||
$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Csv');
|
||||
$contentType = 'text/csv';
|
||||
|
||||
break;
|
||||
|
Reference in New Issue
Block a user