1
- <?php
1
+ <?php declare (strict_types= 1 );
2
2
3
3
namespace Soap \ExtSoapEngine \Configuration \TypeConverter ;
4
4
5
+ use ArrayIterator ;
6
+ use InvalidArgumentException ;
5
7
use IteratorAggregate ;
6
- use Traversable ;
7
8
8
9
final class TypeConverterCollection implements IteratorAggregate
9
10
{
@@ -24,11 +25,7 @@ public function __construct(array $converters = [])
24
25
}
25
26
}
26
27
27
- /**
28
- * @param TypeConverterInterface $converter
29
- *
30
- * @return string
31
- */
28
+
32
29
private function serialize (TypeConverterInterface $ converter ): string
33
30
{
34
31
return $ converter ->getTypeNamespace () . ': ' . $ converter ->getTypeName ();
@@ -44,7 +41,7 @@ private function serialize(TypeConverterInterface $converter): string
44
41
public function add (TypeConverterInterface $ converter ): self
45
42
{
46
43
if ($ this ->has ($ converter )) {
47
- throw new \ InvalidArgumentException (
44
+ throw new InvalidArgumentException (
48
45
'Converter for this type already exists '
49
46
);
50
47
}
@@ -71,9 +68,7 @@ public function set(TypeConverterInterface $converter): self
71
68
* Returns true if the collection contains a type converter for a certain
72
69
* namespace and name
73
70
*
74
- * @param TypeConverterInterface $converter
75
71
*
76
- * @return bool
77
72
*/
78
73
public function has (TypeConverterInterface $ converter ): bool
79
74
{
@@ -86,10 +81,10 @@ public function has(TypeConverterInterface $converter): bool
86
81
}
87
82
88
83
/**
89
- * @return \ ArrayIterator|TypeConverterInterface[]
84
+ * @return ArrayIterator|TypeConverterInterface[]
90
85
*/
91
- public function getIterator (): \ ArrayIterator
86
+ public function getIterator (): ArrayIterator
92
87
{
93
- return new \ ArrayIterator ($ this ->converters );
88
+ return new ArrayIterator ($ this ->converters );
94
89
}
95
90
}
0 commit comments