for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Canvas\Models;
class PaymentMethods extends AbstractModel
{
/**
*
* @var integer
*/
public $id;
* @var string
public $name;
public $is_default;
public $created_at;
public $updated_at;
public $is_deleted;
* Initialize method for model.
public function initialize()
$this->setSource('payment_methods');
}
* Returns table name mapped in the model.
* @return string
public function getSource(): string
return 'payment_methods';
public static function getDefault(): self
return self::findFirst(['conditions' => 'is_default = 1 and is_deleted = 0']);
* @return int
public function getId(): int
return (int) $this->id;