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,13 +1,11 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
namespace yii\gitea\models;
|
||||
|
||||
use yii\base\{Model};
|
||||
namespace Gitea\Models;
|
||||
|
||||
/**
|
||||
* Represents the GPG verification of a commit.
|
||||
*/
|
||||
class PayloadCommitVerification extends Model {
|
||||
class PayloadCommitVerification {
|
||||
|
||||
/**
|
||||
* @var bool Value indicating whether the verification has succeeded.
|
||||
@ -55,15 +53,4 @@ class PayloadCommitVerification extends Model {
|
||||
'verified' => 'isVerified'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the validation rules for attributes.
|
||||
* @return array[] The validation rules.
|
||||
*/
|
||||
function rules(): array {
|
||||
return [
|
||||
[['payload', 'reason', 'signature'], 'trim'],
|
||||
['isVerified', 'boolean', 'falseValue' => false, 'trueValue' => true]
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user