• 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/Command/ItemProperty.php
1
<?php declare(strict_types=1);
2

3
namespace Lmc\Matej\Model\Command;
4

5
use Lmc\Matej\Model\Assertion;
6

7
/**
8
 * Command to save different item content properties to Matej.
9
 */
10
class ItemProperty extends AbstractCommand
11
{
12
    /** @var string */
13
    private $itemId;
14
    /** @var array */
15
    private $properties;
16

17
    private function __construct(string $itemId, array $properties)
18
    {
19
        $this->setItemId($itemId);
28✔
20
        $this->setProperties($properties);
28✔
21
    }
22

23
    /** @return static */
24
    public static function create(string $itemId, array $properties = []): self
25
    {
26
        return new static($itemId, $properties);
28✔
27
    }
28

29
    protected function setItemId(string $itemId): void
30
    {
31
        Assertion::typeIdentifier($itemId);
28✔
32

33
        $this->itemId = $itemId;
28✔
34
    }
35

36
    protected function setProperties(array $properties): void
37
    {
38
        Assertion::keyNotExists(
28✔
39
            $properties,
28✔
40
            'item_id',
28✔
41
            'Cannot update value of "item_id" property - it is used by Matej to identify the item and cannot be altered once created.'
28✔
42
        );
28✔
43

44
        $this->properties = $properties;
21✔
45
    }
46

47
    protected function getCommandType(): string
48
    {
49
        return 'item-properties';
21✔
50
    }
51

52
    protected function getCommandParameters(): array
53
    {
54
        $parameters = $this->properties;
21✔
55

56
        $parameters['item_id'] = $this->itemId;
21✔
57

58
        return $parameters;
21✔
59
    }
60
}
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

© 2026 Coveralls, Inc