File tree Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Expand file tree Collapse file tree 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 {
9191 * @param $key
9292 * @param $value
9393 * @return bool
94- * @throws \ReflectionException
9594 * @throws \doganoo\PHPAlgorithms\Common\Exception\InvalidKeyTypeException
9695 * @throws \doganoo\PHPAlgorithms\Common\Exception\UnsupportedKeyTypeException
9796 */
@@ -109,7 +108,7 @@ public function add($key, $value): bool {
109108 * Notice that contains() looks for the value, not
110109 * key as below.
111110 */
112- if ($ list ->containsValue ( $ value )) {
111+ if ($ list ->containsKey ( $ key )) {
113112 return true ;
114113 }
115114 $ list ->add ($ key , $ value );
Original file line number Diff line number Diff line change @@ -67,7 +67,6 @@ public function addAll($elements): bool {
6767 *
6868 * @param $element
6969 * @return bool
70- * @throws \ReflectionException
7170 * @throws \doganoo\PHPAlgorithms\common\Exception\InvalidKeyTypeException
7271 * @throws \doganoo\PHPAlgorithms\common\Exception\UnsupportedKeyTypeException
7372 */
You can’t perform that action at this time.
0 commit comments