| Total Complexity | 8 |
| Total Lines | 120 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class GamePlay |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | protected $gameId; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $playerId; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | protected $contextType; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | protected $contextId; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var int |
||
| 31 | */ |
||
| 32 | protected $score; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @var string |
||
| 36 | */ |
||
| 37 | protected $payload; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * GamePlay constructor. |
||
| 41 | * |
||
| 42 | * @param string $gameId |
||
| 43 | * @param string $playerId |
||
| 44 | * @param string $contextType |
||
| 45 | * @param string $contextId |
||
| 46 | * @param int $score |
||
| 47 | * @param string $payload |
||
| 48 | */ |
||
| 49 | 2 | public function __construct( |
|
| 50 | string $gameId, |
||
| 51 | string $playerId, |
||
| 52 | string $contextType, |
||
| 53 | string $contextId, |
||
| 54 | int $score, |
||
| 55 | string $payload |
||
| 56 | ) { |
||
| 57 | 2 | $this->gameId = $gameId; |
|
| 58 | 2 | $this->playerId = $playerId; |
|
| 59 | 2 | $this->contextType = $contextType; |
|
| 60 | 2 | $this->contextId = $contextId; |
|
| 61 | 2 | $this->score = $score; |
|
| 62 | 2 | $this->payload = $payload; |
|
| 63 | 2 | } |
|
| 64 | |||
| 65 | /** |
||
| 66 | * @return string |
||
| 67 | */ |
||
| 68 | 1 | public function getGameId(): string |
|
| 69 | { |
||
| 70 | 1 | return $this->gameId; |
|
| 71 | } |
||
| 72 | |||
| 73 | /** |
||
| 74 | * @return string |
||
| 75 | */ |
||
| 76 | 1 | public function getPlayerId(): string |
|
| 77 | { |
||
| 78 | 1 | return $this->playerId; |
|
| 79 | } |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @return string |
||
| 83 | */ |
||
| 84 | 1 | public function getContextType(): string |
|
| 85 | { |
||
| 86 | 1 | return $this->contextType; |
|
| 87 | } |
||
| 88 | |||
| 89 | /** |
||
| 90 | * @return string |
||
| 91 | */ |
||
| 92 | 1 | public function getContextId(): string |
|
| 93 | { |
||
| 94 | 1 | return $this->contextId; |
|
| 95 | } |
||
| 96 | |||
| 97 | /** |
||
| 98 | * @return int |
||
| 99 | */ |
||
| 100 | 1 | public function getScore(): int |
|
| 101 | { |
||
| 102 | 1 | return $this->score; |
|
| 103 | } |
||
| 104 | |||
| 105 | /** |
||
| 106 | * @return string |
||
| 107 | */ |
||
| 108 | 1 | public function getPayload(): string |
|
| 109 | { |
||
| 110 | 1 | return $this->payload; |
|
| 111 | } |
||
| 112 | |||
| 113 | /** |
||
| 114 | * @param array $callbackData |
||
| 115 | * |
||
| 116 | * @return \Kerox\Messenger\Model\Callback\GamePlay |
||
| 117 | */ |
||
| 118 | 1 | public static function create(array $callbackData): self |
|
| 127 | ); |
||
| 128 | } |
||
| 129 | } |
||
| 130 |