@@ -32,7 +32,7 @@ public function handle(ServerRequestInterface $request) : ResponseInterface
3232 $ this ->signature = $ headers ['x-hub-signature ' ][0 ] ?? '' ;
3333
3434 if (isset ($ this ->config ['token ' ]) && !empty ($ this ->config ['token ' ])) {
35- $ sha1 = hash_hmac ('sha1 ' , (string )$ request ->getBody (), $ this ->config ['token ' ]);
35+ $ sha1 = hash_hmac ('sha1 ' , (string ) $ request ->getBody (), $ this ->config ['token ' ]);
3636
3737 if (hash_equals ('sha1= ' .$ sha1 , $ this ->signature ) !== true ) {
3838 return new TextResponse ('ERROR: Invalid signature! ' , 401 );
@@ -54,15 +54,17 @@ public function handle(ServerRequestInterface $request) : ResponseInterface
5454 }
5555 }
5656
57- private function ping () {
57+ private function ping ()
58+ {
5859 return new TextResponse ('pong ' );
5960 }
6061
61- private function push () {
62+ private function push ()
63+ {
6264 $ repository = $ this ->payload ['repository ' ]['full_name ' ];
6365 $ branch = substr ($ this ->payload ['ref ' ], 11 );
6466
65- $ out = 'DELIVERY: ' .$ this ->delivery .PHP_EOL ;
67+ $ out = 'DELIVERY: ' .$ this ->delivery .PHP_EOL ;
6668 $ out .= 'BY: ' .$ this ->payload ['pusher ' ]['name ' ].PHP_EOL ;
6769 $ out .= '-------------------------------------------------- ' .PHP_EOL ;
6870
@@ -95,7 +97,6 @@ private function push() {
9597 $ out .= '-------------------------------------------------- ' .PHP_EOL ;
9698 }
9799
98-
99100 return new TextResponse ($ out , $ status );
100101 }
101102 }
0 commit comments