diff --git a/RoboFile.php b/RoboFile.php index ed2f185..12a9279 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -4,14 +4,10 @@ use Robo\{Result, Tasks}; // Load the dependencies. require_once __DIR__.'/vendor/autoload.php'; -/** - * Provides tasks for the build system. - */ +/** Provides tasks for the build system. */ class RoboFile extends Tasks { - /** - * Creates a new task runner. - */ + /** Creates a new task runner. */ function __construct() { $path = (string) getenv('PATH'); $vendor = (string) realpath('vendor/bin'); @@ -100,8 +96,6 @@ class RoboFile extends Tasks { * @return Result The task result. */ function watch(): Result { - return $this->taskWatch() - ->monitor('test', function() { $this->test(); }) - ->run(); + return $this->taskWatch()->monitor('test', function() { $this->test(); })->run(); } } diff --git a/src/PushEvent.php b/src/PushEvent.php index 5b876e6..82210c7 100644 --- a/src/PushEvent.php +++ b/src/PushEvent.php @@ -5,59 +5,37 @@ use Gitea\Models\{PayloadCommit, Repository, User}; use GuzzleHttp\Psr7\{Uri}; use Psr\Http\Message\{UriInterface}; -/** - * Represents a Gitea push event. - */ +/** Represents a Gitea push event. */ class PushEvent implements \JsonSerializable { - /** - * @var string The hash of the new Git revision. - */ + /** @var string The hash of the new Git revision. */ private $after = ''; - /** - * @var string The hash of the previous Git revision. - */ + /** @var string The hash of the previous Git revision. */ private $before = ''; - /** - * @var \ArrayObject The revision commits. - */ + /** @var \ArrayObject The revision commits. */ private $commits; - /** - * @var UriInterface|null The URL for comparing the revisions. - */ + /** @var UriInterface|null The URL for comparing the revisions. */ private $compareUrl; - /** - * @var User|null The user who pushed the commits. - */ + /** @var User|null The user who pushed the commits. */ private $pusher; - /** - * @var string The Git reference. - */ + /** @var string The Git reference. */ private $ref = ''; - /** - * @var Repository|null The repository where the commits were pushed. - */ + /** @var Repository|null The repository where the commits were pushed. */ private $repository; - /** - * @var string The secret used to validate this event. - */ + /** @var string The secret used to validate this event. */ private $secret = ''; - /** - * @var User|null The user who sent this event. - */ + /** @var User|null The user who sent this event. */ private $sender; - /** - * Creates a new event. - */ + /** Creates a new event. */ function __construct() { $this->commits = new \ArrayObject; } diff --git a/src/models/PayloadCommit.php b/src/models/PayloadCommit.php index 675f930..cb043a0 100644 --- a/src/models/PayloadCommit.php +++ b/src/models/PayloadCommit.php @@ -4,44 +4,28 @@ namespace Gitea\Models; use GuzzleHttp\Psr7\{Uri}; use Psr\Http\Message\{UriInterface}; -/** - * Represents a commit. - */ +/** Represents a commit. */ class PayloadCommit implements \JsonSerializable { - /** - * @var PayloadUser|null The person who authored the commit. - */ + /** @var PayloadUser|null The person who authored the commit. */ private $author; - /** - * @var PayloadUser|null The person who committed the code. - */ + /** @var PayloadUser|null The person who committed the code. */ private $committer; - /** - * @var string The commit hash. - */ + /** @var string The commit hash. */ private $id; - /** - * @var string The commit message. - */ + /** @var string The commit message. */ private $message; - /** - * @var \DateTime|null The commit date. - */ + /** @var \DateTime|null The commit date. */ private $timestamp; - /** - * @var UriInterface|null The URL to the commit's history. - */ + /** @var UriInterface|null The URL to the commit's history. */ private $url; - /** - * @var PayloadCommitVerification|null The GPG verification of this commit. - */ + /** @var PayloadCommitVerification|null The GPG verification of this commit. */ private $verification; /** diff --git a/src/models/PayloadCommitVerification.php b/src/models/PayloadCommitVerification.php index 29cd7f2..8b463b3 100644 --- a/src/models/PayloadCommitVerification.php +++ b/src/models/PayloadCommitVerification.php @@ -1,29 +1,19 @@