mirror of
https://github.com/sitelease/sugar-cube-client.git
synced 2025-10-31 20:12:29 +01:00
Added an example code
This commit is contained in:
@ -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.
|
||||
|
||||
Reference in New Issue
Block a user