Page MenuHomeDevCentral

D804.diff
No OneTemporary

D804.diff

diff --git a/app/Http/Controllers/Gate/DockerHubGateController.php b/app/Http/Controllers/Gate/DockerHubGateController.php
--- a/app/Http/Controllers/Gate/DockerHubGateController.php
+++ b/app/Http/Controllers/Gate/DockerHubGateController.php
@@ -45,10 +45,10 @@
/**
* Handles POST requests
*
- * @param Request $request the HTTP request
+ * @param string $door The door, matching the project for this payload
* @return \Symfony\Component\HttpFoundation\Response
*/
- public function onPost ($door) : Response {
+ public function onPost (string $door) : Response {
// Parses the request and check if it's legit
$this->door = $door;
@@ -67,7 +67,7 @@
/**
* Extracts payload from the request
*/
- protected function extractPayload () {
+ protected function extractPayload () : void {
$request = Request::instance();
$this->rawRequestContent = $request->getContent();
$this->payload = json_decode($this->rawRequestContent);
@@ -77,7 +77,7 @@
/// Payload processing
///
- protected function onPayload () {
+ protected function onPayload () : void {
$this->initializeReport();
Event::fire(new DockerHubPayloadEvent(
diff --git a/app/Http/Controllers/Gate/GitHubGateController.php b/app/Http/Controllers/Gate/GitHubGateController.php
--- a/app/Http/Controllers/Gate/GitHubGateController.php
+++ b/app/Http/Controllers/Gate/GitHubGateController.php
@@ -67,10 +67,10 @@
/**
* Handles POST requests
*
- * @param Request $request the HTTP request
+ * @param string $door The door, matching the project for this payload
* @return \Symfony\Component\HttpFoundation\Response
*/
- public function onPost ($door) : Response {
+ public function onPost (string $door) : Response {
// Parses the request and check if it's legit
$this->door = $door;
@@ -98,7 +98,7 @@
/**
* Extracts headers from the request
*/
- protected function extractHeaders () {
+ protected function extractHeaders () : void {
$this->signature = $this->getSignature();
$this->event = Request::header('X-Github-Event');
$this->delivery = Request::header('X-Github-Delivery');
@@ -107,9 +107,9 @@
/**
* Gets the signature from an X-Hub-Signature header
*
- * @param string the signature part of the header
+ * @return string The signature part of the header
*/
- private function getSignature () {
+ private function getSignature () : string {
$headerSignature = Request::header('X-Hub-Signature');
return XHubSignature::parseSignature($headerSignature);
}
@@ -117,7 +117,7 @@
/**
* Extracts payload from the request
*/
- protected function extractPayload () {
+ protected function extractPayload () : void {
$request = Request::instance();
$this->rawRequestContent = $request->getContent();
$this->payload = json_decode($this->rawRequestContent);
@@ -129,7 +129,7 @@
*
* @return bool true if the request looks valid; otherwise, false.
*/
- protected function isValidRequest () {
+ protected function isValidRequest () : bool {
if (empty($this->event)) {
return false;
}
@@ -147,7 +147,7 @@
*
* @return bool true if the request looks legit; otherwise, false.
*/
- protected function isLegitRequest () {
+ protected function isLegitRequest () : bool {
$secret = $this->getSecret();
// If the secret is not defined, request legitimation is bypassed
diff --git a/app/Http/Controllers/Gate/JenkinsGateController.php b/app/Http/Controllers/Gate/JenkinsGateController.php
--- a/app/Http/Controllers/Gate/JenkinsGateController.php
+++ b/app/Http/Controllers/Gate/JenkinsGateController.php
@@ -45,10 +45,10 @@
/**
* Handles POST requests
*
- * @param Request $request the HTTP request
+ * @param string $door The door, matching the project for this payload
* @return \Symfony\Component\HttpFoundation\Response
*/
- public function onPost ($door) : Response {
+ public function onPost (string $door) : Response {
// Parses the request and check if it's legit
$this->door = $door;
diff --git a/app/Http/Controllers/Gate/PhabricatorGateController.php b/app/Http/Controllers/Gate/PhabricatorGateController.php
--- a/app/Http/Controllers/Gate/PhabricatorGateController.php
+++ b/app/Http/Controllers/Gate/PhabricatorGateController.php
@@ -38,10 +38,10 @@
/**
* Handles POST requests
*
- * @param Request $request the HTTP request
+ * @param string $door The door, matching the project for this payload
* @return \Symfony\Component\HttpFoundation\Response
*/
- public function onPost ($door) : Response {
+ public function onPost (string $door) : Response {
$this->door = $door;
if (!$this->doesServiceExist()) {
@@ -59,7 +59,7 @@
/**
* Extracts payload from the request
*/
- protected function extractPayload () {
+ protected function extractPayload () : void {
$this->payload = Request::all();
}
@@ -67,7 +67,7 @@
/// Payload processing
///
- protected function onPayload () {
+ protected function onPayload () : void {
$this->initializeReport();
Event::fire(new PhabricatorPayloadEvent(
diff --git a/composer.json b/composer.json
--- a/composer.json
+++ b/composer.json
@@ -14,7 +14,7 @@
"laravel/framework": "5.2.*",
"guzzlehttp/guzzle": "^6.2",
"keruald/dockerhub": "^0.0.3",
- "keruald/github": "^0.2.0",
+ "keruald/github": "^0.2.1",
"keruald/broker": "^0.4.1",
"keruald/mailgun": "^0.0.1",
"netresearch/jsonmapper": "~0.1.0",

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 01:29 (16 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259334
Default Alt Text
D804.diff (5 KB)

Event Timeline