for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Oc\Postfix;
class LogEntity
{
/**
* @var int
*/
public $id;
* @var \DateTimeInterface
public $created;
* @var string
public $status;
public $email;
* @return array
public function toDatabaseArray()
return [
'id' => (int) $this->id,
'email' => $this->email,
'status' => $this->status,
'created' => $this->created,
];
}
* @param array $data
* @return $this
public function fromDatabaseArray(array $data)
$this->id = (int) $data['id'];
$this->email = $data['email'];
$this->status = $data['status'];
$this->created = $data['created'];
return $this;
public function setData(array $data)
foreach ($data as $key => $value) {
if (!property_exists($this, $key)) {
continue;
$this->{$key} = $value;
public function toArray()
return get_object_vars($this);