@@ -8535,102 +8535,6 @@ public function testDynamicConstantsWithNativeTypes(
85358535 );
85368536 }
85378537
8538- public function dataMixedTypeConstants (): array
8539- {
8540- return [
8541- [
8542- 'mixed ' ,
8543- 'MixedTypeConstants\MixedTypeConstantClass::MIXED_TYPE_CONSTANT_IN_CLASS ' ,
8544- ],
8545- [
8546- "'abc123def' " ,
8547- 'MixedTypeConstants\MixedTypeConstantClass::PURE_CONSTANT_IN_CLASS ' ,
8548- ],
8549- [
8550- "'xyz' " ,
8551- 'MixedTypeConstants\NoMixedTypeConstantClass::MIXED_TYPE_CONSTANT_IN_CLASS ' ,
8552- ],
8553- [
8554- 'false ' ,
8555- 'GLOBAL_MIXED_TYPE_CONSTANT ' ,
8556- ],
8557- [
8558- '123 ' ,
8559- 'GLOBAL_PURE_CONSTANT ' ,
8560- ],
8561- ];
8562- }
8563-
8564- /**
8565- * @dataProvider dataMixedTypeConstants
8566- */
8567- public function testMixedTypeConstants (
8568- string $ description ,
8569- string $ expression ,
8570- ): void
8571- {
8572- $ this ->assertTypes (
8573- __DIR__ . '/data/mixed-type-constant.php ' ,
8574- $ description ,
8575- $ expression ,
8576- 'die ' ,
8577- [],
8578- true ,
8579- [
8580- 'MixedTypeConstants \\MixedTypeConstantClass::MIXED_TYPE_CONSTANT_IN_CLASS ' ,
8581- 'GLOBAL_MIXED_TYPE_CONSTANT ' ,
8582- ],
8583- );
8584- }
8585-
8586- public function dataMixedTypeConstantsWithNativeTypes (): array
8587- {
8588- return [
8589- [
8590- 'int ' ,
8591- 'MixedTypeConstantNativeTypes\Foo::FOO ' ,
8592- ],
8593- [
8594- 'int|string ' ,
8595- 'MixedTypeConstantNativeTypes\Foo::BAR ' ,
8596- ],
8597- [
8598- 'int ' ,
8599- '$foo::FOO ' ,
8600- ],
8601- [
8602- 'int|string ' ,
8603- '$foo::BAR ' ,
8604- ],
8605- ];
8606- }
8607-
8608- /**
8609- * @dataProvider dataMixedTypeConstantsWithNativeTypes
8610- */
8611- public function testMixedTypeConstantsWithNativeTypes (
8612- string $ description ,
8613- string $ expression ,
8614- ): void
8615- {
8616- if (PHP_VERSION_ID < 80300 ) {
8617- $ this ->markTestSkipped ('Test requires PHP 8.3. ' );
8618- }
8619-
8620- $ this ->assertTypes (
8621- __DIR__ . '/data/mixed-type-constant-native-types.php ' ,
8622- $ description ,
8623- $ expression ,
8624- 'die ' ,
8625- [],
8626- true ,
8627- [
8628- 'MixedTypeConstantNativeTypes\Foo::FOO ' ,
8629- 'MixedTypeConstantNativeTypes\Foo::BAR ' ,
8630- ],
8631- );
8632- }
8633-
86348538 public function dataIsset (): array
86358539 {
86368540 return [
@@ -9641,7 +9545,6 @@ public function testTryCatchScope(
96419545
96429546 /**
96439547 * @param string[] $dynamicConstantNames
9644- * @param string[] $mixedTypeConstantNames
96459548 */
96469549 private function assertTypes (
96479550 string $ file ,
@@ -9650,7 +9553,6 @@ private function assertTypes(
96509553 string $ evaluatedPointExpression = 'die ' ,
96519554 array $ dynamicConstantNames = [],
96529555 bool $ useCache = true ,
9653- array $ mixedTypeConstantNames = [],
96549556 ): void
96559557 {
96569558 $ assertType = function (Scope $ scope ) use ($ expression , $ description , $ evaluatedPointExpression ): void {
@@ -9685,7 +9587,6 @@ static function (Node $node, Scope $scope) use ($file, $evaluatedPointExpression
96859587 $ assertType ($ scope );
96869588 },
96879589 $ dynamicConstantNames ,
9688- $ mixedTypeConstantNames ,
96899590 );
96909591 }
96919592
0 commit comments