for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Smalot\Github\Webhook\Event;
/**
* Class EventBase
* @package Smalot\Github\Webhook\Event
*/
abstract class EventBase
{
* @var string
protected $eventName;
* @var array
protected $payload;
protected $delivery;
* EventBase constructor.
* @param string $eventName
* @param string $payload
* @param string $delivery
public function __construct($eventName, $payload, $delivery = null)
$this->eventName = $eventName;
$this->payload = json_decode($payload, true);
json_decode($payload, true)
*
array
$payload
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..
$this->delivery = $delivery;
}
* @return string
abstract public function getEventName();
* @return array
public function getPayload()
return $this->payload;
public function getDelivery()
return $this->delivery;
public function getRepository()
return $this->payload['repository'];
public function getSender()
return $this->payload['sender'];
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..