friendship ended with social-app. php is my new best friend
1<?php declare(strict_types = 1);
2
3namespace Contributte\Logging\Slack\Formatter;
4
5final class SlackContextField
6{
7
8 /** @var mixed[] */
9 private $data = [];
10
11 public function setTitle(string $title): void
12 {
13 $this->data['title'] = $title;
14 }
15
16 public function setValue(string $value): void
17 {
18 $this->data['value'] = $value;
19 }
20
21 public function setShort(bool $short = true): void
22 {
23 $this->data['short'] = $short;
24 }
25
26 /**
27 * @return mixed[]
28 */
29 public function toArray(): array
30 {
31 return $this->data;
32 }
33
34}