findologic / findologic-api

Library for sending requests to the Findologic API
MIT License
1 stars 3 forks source link

Fix issue with multiple attributes #62

Closed TheKeymaster closed 4 years ago

TheKeymaster commented 4 years ago

Adding multiple attributes with the same key, will result in the array being added one level too much:

$searchRequest
    ->addAttribute('length', '12 cm')
    ->addAttribute('length', '15 cm');

// Request URI will be https://service.findologic.com/ps/www.example.com/index.php?attrib[length][0][0]=12 cm&attrib[length][0][1]=15 cm

This fix resolves that issue to build the correct, expected URI.

codecov-io commented 4 years ago

Codecov Report

Merging #62 into develop will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##             develop    #62   +/-   ##
========================================
  Coverage        100%   100%           
- Complexity       260    263    +3     
========================================
  Files             38     38           
  Lines            682    687    +5     
========================================
+ Hits             682    687    +5
Impacted Files Coverage Δ Complexity Δ
src/Requests/Request.php 100% <100%> (ø) 30 <0> (+3) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2d465c5...a24d979. Read the comment docs.