From 902d9c98400c1c22d4f64cdfaf8e9bd86da6bb4d Mon Sep 17 00:00:00 2001 From: Karoly Gossler Date: Tue, 6 Feb 2024 12:55:07 +0100 Subject: [PATCH] fix(qa) apply PHP70Migration:risky rule --- lib/Doctrine/Export/Oracle.php | 2 +- tests/CliTestCase/cli-default.php | 2 +- tests/CliTestCase/cli-with-custom-tasks.php | 2 +- tests/CliTestCase/cli-without-autoregistered-custom-tasks.php | 2 +- tests/Export/SchemaTestCase.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Doctrine/Export/Oracle.php b/lib/Doctrine/Export/Oracle.php index 6bae1988f..b34939698 100644 --- a/lib/Doctrine/Export/Oracle.php +++ b/lib/Doctrine/Export/Oracle.php @@ -507,7 +507,7 @@ public function getIndexDeclaration($name, array $definition) if ('unique' == strtolower($definition['type'])) { $type = strtoupper($definition['type']); } else { - throw new Doctrine_Export_Exception('Unknown type '.$definition['type'].' for index '.$name); + throw new Doctrine_Export_Exception('Unknown type '.$definition['type']."\u{a0}for index ".$name); } } else { // only unique indexes should be defined in create table statement diff --git a/tests/CliTestCase/cli-default.php b/tests/CliTestCase/cli-default.php index d91f5bbd4..d2764ac6e 100644 --- a/tests/CliTestCase/cli-default.php +++ b/tests/CliTestCase/cli-default.php @@ -5,7 +5,7 @@ * @author Dan Bettles */ -require_once dirname(dirname(dirname(__FILE__))).'/lib/Doctrine/Core.php'; +require_once dirname(__FILE__, 3).'/lib/Doctrine/Core.php'; spl_autoload_register(['Doctrine_Core', 'autoload']); require_once dirname(__FILE__).'/TestTask02.php'; diff --git a/tests/CliTestCase/cli-with-custom-tasks.php b/tests/CliTestCase/cli-with-custom-tasks.php index 3c9f125e1..18569706f 100644 --- a/tests/CliTestCase/cli-with-custom-tasks.php +++ b/tests/CliTestCase/cli-with-custom-tasks.php @@ -5,7 +5,7 @@ * @author Dan Bettles */ -require_once dirname(dirname(dirname(__FILE__))).'/lib/Doctrine/Core.php'; +require_once dirname(__FILE__, 3).'/lib/Doctrine/Core.php'; spl_autoload_register(['Doctrine_Core', 'autoload']); $cli = new Doctrine_Cli(); diff --git a/tests/CliTestCase/cli-without-autoregistered-custom-tasks.php b/tests/CliTestCase/cli-without-autoregistered-custom-tasks.php index eae8b3733..b866cc585 100644 --- a/tests/CliTestCase/cli-without-autoregistered-custom-tasks.php +++ b/tests/CliTestCase/cli-without-autoregistered-custom-tasks.php @@ -5,7 +5,7 @@ * @author Dan Bettles */ -require_once dirname(dirname(dirname(__FILE__))).'/lib/Doctrine/Core.php'; +require_once dirname(__FILE__, 3).'/lib/Doctrine/Core.php'; spl_autoload_register(['Doctrine_Core', 'autoload']); require_once dirname(__FILE__).'/TestTask02.php'; diff --git a/tests/Export/SchemaTestCase.php b/tests/Export/SchemaTestCase.php index 610f1d8b9..b4319cdc2 100644 --- a/tests/Export/SchemaTestCase.php +++ b/tests/Export/SchemaTestCase.php @@ -58,7 +58,7 @@ class Doctrine_Export_Schema_TestCase extends Doctrine_UnitTestCase public function testYmlExport() { $export = new Doctrine_Export_Schema(); - $export->exportSchema('schema-export.yml', 'yml', dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'models', $this->tables); + $export->exportSchema('schema-export.yml', 'yml', dirname(__FILE__, 2).DIRECTORY_SEPARATOR.'models', $this->tables); unlink('schema-export.yml'); } }