Skip to content

Commit b61ff10

Browse files
committed
remove dead conditions
1 parent b519b01 commit b61ff10

11 files changed

+4
-48
lines changed

tests/rules/QueryPlanAnalyzerRuleTest.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ public function testNotUsingIndex(): void
6262
self::markTestSkipped('query plan analyzer requires a active database connection');
6363
}
6464

65-
if (\PHP_VERSION_ID < 70300) {
66-
self::markTestSkipped('not yet supported on php < 7.3');
67-
}
68-
6965
$this->numberOfAllowedUnindexedReads = true;
7066
$this->numberOfRowsNotRequiringIndex = 2;
7167

@@ -111,10 +107,6 @@ public function testNotUsingIndexInDebugMode(): void
111107
self::markTestSkipped('query plan analyzer requires a active database connection');
112108
}
113109

114-
if (\PHP_VERSION_ID < 70300) {
115-
self::markTestSkipped('not yet supported on php < 7.3');
116-
}
117-
118110
$this->debugMode = true;
119111
$this->numberOfAllowedUnindexedReads = true;
120112
$this->numberOfRowsNotRequiringIndex = 2;

tests/rules/SyntaxErrorInDibiPreparedStatementMethodRuleTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ public static function getAdditionalConfigFiles(): array
3030

3131
public function testSyntaxErrorInQueryRule(): void
3232
{
33-
if (\PHP_VERSION_ID < 70400) {
34-
self::markTestSkipped('Test requires PHP 7.4.');
35-
}
36-
3733
if (MysqliQueryReflector::NAME === getenv('DBA_REFLECTOR')) {
3834
$expectedErrors = [
3935
[

tests/rules/SyntaxErrorInPreparedStatementMethodRuleTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ public static function getAdditionalConfigFiles(): array
3030

3131
public function testSyntaxErrorInQueryRule(): void
3232
{
33-
if (\PHP_VERSION_ID < 70400) {
34-
self::markTestSkipped('Test requires PHP 7.4.');
35-
}
36-
3733
if (MysqliQueryReflector::NAME === getenv('DBA_REFLECTOR')) {
3834
$expectedErrors = [
3935
[
@@ -232,10 +228,6 @@ public function testSyntaxErrorInQueryRule(): void
232228

233229
public function testBug94()
234230
{
235-
if (\PHP_VERSION_ID < 70400) {
236-
self::markTestSkipped('Test requires PHP 7.4.');
237-
}
238-
239231
if (MysqliQueryReflector::NAME === getenv('DBA_REFLECTOR')) {
240232
self::markTestSkipped('Error message different depending on version of the database.');
241233
} elseif (PdoPgSqlQueryReflector::NAME === getenv('DBA_REFLECTOR')) {
@@ -263,10 +255,6 @@ public function testBug94()
263255

264256
public function testSyntaxErrorWithInferencePlaceholder()
265257
{
266-
if (\PHP_VERSION_ID < 70400) {
267-
self::markTestSkipped('Test requires PHP 7.4.');
268-
}
269-
270258
if (MysqliQueryReflector::NAME === getenv('DBA_REFLECTOR')) {
271259
$expectedErrors = [
272260
[

tests/rules/SyntaxErrorInPreparedStatementMethodSubclassedRuleTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ public static function getAdditionalConfigFiles(): array
3030

3131
public function testSyntaxErrorInQueryRule(): void
3232
{
33-
if (\PHP_VERSION_ID < 70400) {
34-
self::markTestSkipped('Test requires PHP 7.4.');
35-
}
36-
3733
$this->analyse([__DIR__ . '/data/syntax-error-in-method-subclassed.php'], $this->getExpectedErrors());
3834
}
3935

tests/rules/SyntaxErrorInQueryFunctionRuleTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ public static function getAdditionalConfigFiles(): array
3030

3131
public function testSyntaxErrorInQueryRule(): void
3232
{
33-
if (\PHP_VERSION_ID < 70400) {
34-
self::markTestSkipped('Test requires PHP 7.4.');
35-
}
36-
3733
$this->analyse([__DIR__ . '/data/syntax-error-in-query-function.php'], $this->getExpectedErrors());
3834
}
3935

tests/rules/SyntaxErrorInQueryMethodRuleTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ public static function getAdditionalConfigFiles(): array
3030

3131
public function testSyntaxErrorInQueryRule(): void
3232
{
33-
if (\PHP_VERSION_ID < 70400) {
34-
self::markTestSkipped('Test requires PHP 7.4.');
35-
}
36-
3733
if (MysqliQueryReflector::NAME === getenv('DBA_REFLECTOR')) {
3834
$expected = [
3935
[

tests/rules/SyntaxErrorInQueryMethodSubclassedRuleTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ public static function getAdditionalConfigFiles(): array
3030

3131
public function testSyntaxErrorInQueryRule(): void
3232
{
33-
if (\PHP_VERSION_ID < 70400) {
34-
self::markTestSkipped('Test requires PHP 7.4.');
35-
}
36-
3733
$this->analyse([__DIR__ . '/data/syntax-error-in-method-subclassed.php'], $this->getExpectedErrors());
3834
}
3935

tests/sqlAst/SqlAstInferenceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class SqlAstInferenceTest extends TypeInferenceTestCase
1111
{
1212
public function dataFileAsserts(): iterable
1313
{
14-
if (\PHP_VERSION_ID >= 70400 && 'pdo-pgsql' !== getenv('DBA_REFLECTOR')) {
14+
if ('pdo-pgsql' !== getenv('DBA_REFLECTOR')) {
1515
yield from $this->gatherAssertTypes(__DIR__ . '/data/sql-ast-narrowing.php');
1616
}
1717
}

tests/sqlAst/config/bootstrap.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
$config = RuntimeConfiguration::create();
1818
$config->errorMode(RuntimeConfiguration::ERROR_MODE_EXCEPTION);
1919
$config->analyzeWriteQueries(true);
20-
if (\PHP_VERSION_ID >= 70400) {
21-
$config->utilizeSqlAst(true);
22-
}
20+
$config->utilizeSqlAst(true);
2321

2422
// $config->debugMode(true);
2523
$reflector = ReflectorFactory::create(__DIR__);

tests/stringify/InferenceStringifyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public function dataFileAsserts(): iterable
1212
{
1313
yield from $this->gatherAssertTypes(__DIR__ . '/data/stringify.php');
1414

15-
if (\PHP_VERSION_ID >= 70400 && 'pdo-pgsql' !== getenv('DBA_REFLECTOR')) {
15+
if ('pdo-pgsql' !== getenv('DBA_REFLECTOR')) {
1616
yield from $this->gatherAssertTypes(__DIR__ . '/data/ast-narrowed-stringify.php');
1717
}
1818
}

0 commit comments

Comments
 (0)