#984 fix php-cs-fixer warnings
This commit is contained in:
parent
d0f76fd3ba
commit
bb11378fca
|
|
@ -314,11 +314,7 @@ class Conditional implements IComparable
|
|||
}
|
||||
|
||||
/**
|
||||
* Verify if param is valid condition type
|
||||
*
|
||||
* @param string $type
|
||||
*
|
||||
* @return bool
|
||||
* Verify if param is valid condition type.
|
||||
*/
|
||||
public static function isValidConditionType(string $type): bool
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,9 +8,8 @@ use PhpOffice\PhpSpreadsheetTests\Functional\AbstractFunctional;
|
|||
|
||||
class ConditionalTest extends AbstractFunctional
|
||||
{
|
||||
|
||||
/**
|
||||
* Test check if conditional style with type 'notContainsText' works on xlsx
|
||||
* Test check if conditional style with type 'notContainsText' works on xlsx.
|
||||
*/
|
||||
public function testConditionalNotContainsText(): void
|
||||
{
|
||||
|
|
@ -20,12 +19,12 @@ class ConditionalTest extends AbstractFunctional
|
|||
$worksheet = $spreadsheet->getActiveSheet();
|
||||
$styles = $worksheet->getConditionalStyles('A1:A5');
|
||||
|
||||
$this->assertCount(1, $styles);
|
||||
self::assertCount(1, $styles);
|
||||
|
||||
/** @var $notContainsTextStyle Conditional */
|
||||
/** @var Conditional $notContainsTextStyle */
|
||||
$notContainsTextStyle = $styles[0];
|
||||
$this->assertEquals('A', $notContainsTextStyle->getText());
|
||||
$this->assertEquals(Conditional::CONDITION_NOTCONTAINSTEXT, $notContainsTextStyle->getConditionType());
|
||||
$this->assertEquals(Conditional::OPERATOR_NOTCONTAINS, $notContainsTextStyle->getOperatorType());
|
||||
self::assertEquals('A', $notContainsTextStyle->getText());
|
||||
self::assertEquals(Conditional::CONDITION_NOTCONTAINSTEXT, $notContainsTextStyle->getConditionType());
|
||||
self::assertEquals(Conditional::OPERATOR_NOTCONTAINS, $notContainsTextStyle->getOperatorType());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class ConditionalTest extends AbstractFunctional
|
|||
}
|
||||
|
||||
/**
|
||||
* Test check if conditional style with type 'notContainsText' works on xlsx
|
||||
* Test check if conditional style with type 'notContainsText' works on xlsx.
|
||||
*/
|
||||
public function testConditionalNotContainsText(): void
|
||||
{
|
||||
|
|
@ -40,7 +40,7 @@ class ConditionalTest extends AbstractFunctional
|
|||
$condition = new Conditional();
|
||||
$condition->setConditionType(Conditional::CONDITION_NOTCONTAINSTEXT);
|
||||
$condition->setOperatorType(Conditional::OPERATOR_NOTCONTAINS);
|
||||
$condition->setText("C");
|
||||
$condition->setText('C');
|
||||
$condition->getStyle()->applyFromArray([
|
||||
'fill' => [
|
||||
'color' => ['argb' => 'FFFFC000'],
|
||||
|
|
@ -55,6 +55,6 @@ class ConditionalTest extends AbstractFunctional
|
|||
$needle = <<<xml
|
||||
<conditionalFormatting sqref="A1:A5"><cfRule type="notContainsText" dxfId="" priority="1" operator="notContains" text="C"><formula>ISERROR(SEARCH("C",A1:A5))</formula></cfRule></conditionalFormatting>
|
||||
xml;
|
||||
$this->assertStringContainsString($needle, $data);
|
||||
self::assertStringContainsString($needle, $data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue