File tree 2 files changed +1
-3
lines changed
2 files changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,6 @@ public function addNode(Node $node): bool {
91
91
* @param $key
92
92
* @param $value
93
93
* @return bool
94
- * @throws \ReflectionException
95
94
* @throws \doganoo\PHPAlgorithms\Common\Exception\InvalidKeyTypeException
96
95
* @throws \doganoo\PHPAlgorithms\Common\Exception\UnsupportedKeyTypeException
97
96
*/
@@ -109,7 +108,7 @@ public function add($key, $value): bool {
109
108
* Notice that contains() looks for the value, not
110
109
* key as below.
111
110
*/
112
- if ($ list ->containsValue ( $ value )) {
111
+ if ($ list ->containsKey ( $ key )) {
113
112
return true ;
114
113
}
115
114
$ list ->add ($ key , $ value );
Original file line number Diff line number Diff line change @@ -67,7 +67,6 @@ public function addAll($elements): bool {
67
67
*
68
68
* @param $element
69
69
* @return bool
70
- * @throws \ReflectionException
71
70
* @throws \doganoo\PHPAlgorithms\common\Exception\InvalidKeyTypeException
72
71
* @throws \doganoo\PHPAlgorithms\common\Exception\UnsupportedKeyTypeException
73
72
*/
You can’t perform that action at this time.
0 commit comments