• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lmc-eu / matej-client-php / 7529439147

15 Jan 2024 01:18PM UTC coverage: 100.0%. Remained the same
7529439147

Pull #145

github

web-flow
Bump actions/checkout from 3 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #145: Bump actions/checkout from 3 to 4

712 of 712 relevant lines covered (100.0%)

35.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/Model/RecommendationCommandResponse.php
1
<?php declare(strict_types=1);
2

3
namespace Lmc\Matej\Model;
4

5
class RecommendationCommandResponse extends CommandResponse
6
{
7
    /**
8
     * Return recommendations data.
9
     */
10
    public function getData(): array
11
    {
12
        $data = [];
21✔
13
        /* If Matej returns flat structure response `['id1', 'id2']`, convert it
14
           to complex structure `[['item_id': 'id1'], ['item_id': 'id2']]`. This
15
           ensures `RecommendationCommandResponse::getData` returns data in
16
           consistent format. */
17
        foreach ($this->data as $key => $val) {
21✔
18
            if (is_string($val)) {
21✔
19
                $val = (object) ['item_id' => $val];
7✔
20
            }
21
            $data[$key] = $val;
21✔
22
        }
23

24
        return $data;
21✔
25
    }
26
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc