-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskItem.php
More file actions
65 lines (54 loc) · 1.25 KB
/
Copy pathTaskItem.php
File metadata and controls
65 lines (54 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
declare(strict_types=1);
/*
* This file is part of ezkoding
*
* (c) 2025 Oliver Glowa, coding.glowa.com
*
* This source file is subject to the Apache-2.0 license that is bundled
* with this source code in the file LICENSE.
*/
namespace ollily\Tools\Batch;
use ollily\Tools\String\ToStringTrait;
/**
* @phpstan-import-type TaskKey from ITaskItem
* @phpstan-import-type TaskData from ITaskItem
*/
class TaskItem implements ITaskItem
{
use ToStringTrait;
/** @phpstan-var TaskKey */
private mixed $key;
/** @phpstan-var TaskData */
private array $data;
/**
* @param mixed $key
* @param array<mixed,mixed> $data
*
* @phpstan-param TaskKey $key
* @phpstan-param TaskData $data
*/
public function __construct(mixed $key, array $data)
{
$this->key = $key;
$this->data = $data;
}
#[\Override]
public function getKey(): mixed
{
return $this->key;
}
#[\Override]
public function getData(): array
{
return $this->data;
}
/**
* @SuppressWarnings("PHPMD.CamelCaseMethodName")
*/
#[\Override]
protected function __toStringValues(): mixed // NOSONAR: php:S100
{
return $this->data;
}
}