@@ 68-79 (lines=12) @@ | ||
65 | * @return string |
|
66 | * @throws WebhookManagerException |
|
67 | */ |
|
68 | public function getEvent(): string |
|
69 | { |
|
70 | if (empty($this->headers)) { |
|
71 | $this->getHeaders(); |
|
72 | } |
|
73 | ||
74 | if (!isset($this->headers['X-Event-Key'])) { |
|
75 | throw new WebhookManagerException("No event specified."); |
|
76 | } |
|
77 | ||
78 | return $this->headers['X-Event-Key']; |
|
79 | } |
|
80 | ||
81 | /** |
|
82 | * @return mixed |
@@ 93-104 (lines=12) @@ | ||
90 | * @return string |
|
91 | * @throws WebhookManagerException |
|
92 | */ |
|
93 | public function getEvent(): string |
|
94 | { |
|
95 | if (empty($this->headers)) { |
|
96 | $this->getHeaders(); |
|
97 | } |
|
98 | ||
99 | if (!isset($this->headers['X-Event-Key'])) { |
|
100 | throw new WebhookManagerException("No event specified."); |
|
101 | } |
|
102 | ||
103 | return $this->headers['X-Event-Key']; |
|
104 | } |
|
105 | ||
106 | /** |
|
107 | * @return mixed |
@@ 118-129 (lines=12) @@ | ||
115 | * @return string |
|
116 | * @throws WebhookManagerException |
|
117 | */ |
|
118 | public function getEvent(): string |
|
119 | { |
|
120 | if (empty($this->headers)) { |
|
121 | $this->getHeaders(); |
|
122 | } |
|
123 | ||
124 | if (!isset($this->headers['X-GitHub-Event'])) { |
|
125 | throw new WebhookManagerException("No event specified."); |
|
126 | } |
|
127 | ||
128 | return $this->headers['X-GitHub-Event']; |
|
129 | } |
|
130 | ||
131 | /** |
|
132 | * @return mixed |