Added an example code

This commit is contained in:
Cédric Belin
2018-11-02 00:03:45 +01:00
parent 3891e435c1
commit 3ffe5d6b9c
6 changed files with 27 additions and 58 deletions

View File

@ -1,17 +1,16 @@
<?php
declare(strict_types=1);
namespace yii\gitea\models;
namespace Gitea\Models;
use GuzzleHttp\Psr7\{Uri};
use Psr\Http\Message\{UriInterface};
use yii\base\{Model};
/**
* Represents a commit.
* @property \DateTime|null $timestamp The commit date.
* @property UriInterface|null $url The URL to the commit's history.
*/
class PayloadCommit extends Model {
class PayloadCommit {
/**
* @var PayloadUser|null The person who authored the commit.
@ -97,16 +96,6 @@ class PayloadCommit extends Model {
return $this->url;
}
/**
* Returns the validation rules for attributes.
* @return array[] The validation rules.
*/
function rules(): array {
return [
[['id', 'message'], 'trim']
];
}
/**
* Sets the commit date.
* @param \DateTime|string|null $value The new commit date.