Skip to content

Commit e2967c3

Browse files
charlescunicojaapio
authored andcommitted
Renamed classes Mixed and Resource
1 parent 6b2ed6e commit e2967c3

File tree

6 files changed

+8
-69
lines changed

6 files changed

+8
-69
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.idea
22
composer.lock
33
vendor
4+
.DS_Store

src/TypeResolver.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ final class TypeResolver
3737
'float' => Types\Float_::class,
3838
'double' => Types\Float_::class,
3939
'object' => Object_::class,
40-
'mixed' => Types\Mixed::class,
40+
'mixed' => Types\Mixed_::class,
4141
'array' => Array_::class,
42-
'resource' => Types\Resource::class,
42+
'resource' => Types\Resource_::class,
4343
'void' => Types\Void_::class,
4444
'null' => Types\Null_::class,
4545
'scalar' => Types\Scalar::class,

src/Types/Array_.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
* An array can be represented in two forms:
2121
*
22-
* 1. Untyped (`array`), where the key and value type is unknown and hence classified as 'Mixed'.
22+
* 1. Untyped (`array`), where the key and value type is unknown and hence classified as 'Mixed_'.
2323
* 2. Types (`string[]`), where the value type is provided by preceding an opening and closing square bracket with a
2424
* type name.
2525
*/
@@ -43,7 +43,7 @@ public function __construct(Type $valueType = null, Type $keyType = null)
4343
$keyType = new Compound([ new String_(), new Integer() ]);
4444
}
4545
if ($valueType === null) {
46-
$valueType = new Mixed();
46+
$valueType = new Mixed_();
4747
}
4848

4949
$this->valueType = $valueType;
@@ -77,7 +77,7 @@ public function getValueType()
7777
*/
7878
public function __toString()
7979
{
80-
if ($this->valueType instanceof Mixed) {
80+
if ($this->valueType instanceof Mixed_) {
8181
return 'array';
8282
}
8383

src/Types/Mixed.php

-31
This file was deleted.

src/Types/Resource.php

-31
This file was deleted.

tests/unit/TypeResolverTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -390,14 +390,14 @@ public function provideKeywords()
390390
['double', Types\Float_::class],
391391
['bool', Types\Boolean::class],
392392
['boolean', Types\Boolean::class],
393-
['resource', Types\Resource::class],
393+
['resource', Types\Resource_::class],
394394
['null', Types\Null_::class],
395395
['callable', Types\Callable_::class],
396396
['callback', Types\Callable_::class],
397397
['array', Array_::class],
398398
['scalar', Types\Scalar::class],
399399
['object', Object_::class],
400-
['mixed', Types\Mixed::class],
400+
['mixed', Types\Mixed_::class],
401401
['void', Types\Void_::class],
402402
['$this', Types\This::class],
403403
['static', Types\Static_::class],

0 commit comments

Comments
 (0)