Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Update) Automatically add model docblocks #3831

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/ide-helper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Laravel IDE Helper
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
operating-system:
- ubuntu-22.04
php-version:
- '8.3'
name: php ${{ matrix.php-version }} on ${{ matrix.operating-system }}
services:
mysql:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: unit3d
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis:7.2.1
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: bcmath, ctype, dom, fileinfo, json, libxml, mbstring, openssl, pdo, tokenizer, xml, zip
coverage: none
- name: Install Composer Dependencies
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Prepare The Laravel Environment
run: cp .env.example .env
- name: Generate Application Key
run: php artisan key:generate
- name: Run Migrations
run: php artisan migrate --force
- name: Clear Application Cache
run: php artisan optimize:clear
- name: Run Laravel IDE Helper
run: php artisan ide-helper:models --write --reset
- name: Run Pint
uses: aglipanci/[email protected]
with:
preset: psr12
verboseMode: true
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update model docblocks (Laravel IDE Helper CI)
commit_user_name: HDVinne
commit_user_email: [email protected]
commit_author: HDVinnie <[email protected]>
8 changes: 7 additions & 1 deletion app/Models/Announce.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,18 @@
* @property int $downloaded
* @property int $left
* @property int $corrupt
* @property mixed $peer_id
* @property string $peer_id
* @property int $port
* @property int $numwant
* @property string $created_at
* @property string $event
* @property string $key
* @property-read User|null $requests
* @property-read Torrent|null $torrents
* @method static \Illuminate\Database\Eloquent\Builder|Announce newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Announce newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Announce query()
* @mixin \Eloquent
*/
class Announce extends Model
{
Expand Down
5 changes: 5 additions & 0 deletions app/Models/Apikey.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
* @property string $content
* @property string|null $created_at
* @property \Illuminate\Support\Carbon|null $deleted_at
* @property-read User $user
* @method static \Illuminate\Database\Eloquent\Builder|Apikey newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Apikey newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Apikey query()
* @mixin \Eloquent
*/
class Apikey extends Model
{
Expand Down
9 changes: 9 additions & 0 deletions app/Models/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@
* @property int|null $accepted_by
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ApplicationImageProof> $imageProofs
* @property-read User|null $moderated
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ApplicationUrlProof> $urlProofs
* @property-read User|null $user
* @method static \Database\Factories\ApplicationFactory factory($count = null, $state = [])
* @method static \Illuminate\Database\Eloquent\Builder|Application newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Application newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Application query()
* @mixin \Eloquent
*/
class Application extends Model
{
Expand Down
6 changes: 6 additions & 0 deletions app/Models/ApplicationImageProof.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
* @property string $image
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read Application|null $application
* @method static \Database\Factories\ApplicationImageProofFactory factory($count = null, $state = [])
* @method static \Illuminate\Database\Eloquent\Builder|ApplicationImageProof newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|ApplicationImageProof newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|ApplicationImageProof query()
* @mixin \Eloquent
*/
class ApplicationImageProof extends Model
{
Expand Down
6 changes: 6 additions & 0 deletions app/Models/ApplicationUrlProof.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
* @property string $url
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read Application|null $application
* @method static \Database\Factories\ApplicationUrlProofFactory factory($count = null, $state = [])
* @method static \Illuminate\Database\Eloquent\Builder|ApplicationUrlProof newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|ApplicationUrlProof newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|ApplicationUrlProof query()
* @mixin \Eloquent
*/
class ApplicationUrlProof extends Model
{
Expand Down
7 changes: 7 additions & 0 deletions app/Models/Article.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property int $user_id
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Comment> $comments
* @property-read User $user
* @method static \Database\Factories\ArticleFactory factory($count = null, $state = [])
* @method static \Illuminate\Database\Eloquent\Builder|Article newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Article newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Article query()
* @mixin \Eloquent
*/
class Article extends Model
{
Expand Down
8 changes: 7 additions & 1 deletion app/Models/Audit.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,15 @@
* @property string $model_name
* @property int $model_entry_id
* @property string $action
* @property mixed $record
* @property string $record
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read User|null $user
* @method static \Database\Factories\AuditFactory factory($count = null, $state = [])
* @method static \Illuminate\Database\Eloquent\Builder|Audit newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Audit newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Audit query()
* @mixin \Eloquent
*/
class Audit extends Model
{
Expand Down
19 changes: 19 additions & 0 deletions app/Models/AutomaticTorrentFreeleech.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,25 @@
use App\Traits\Auditable;
use Illuminate\Database\Eloquent\Model;

/**
* @property int $id
* @property int $position
* @property string|null $name_regex
* @property int|null $size
* @property int|null $category_id
* @property int|null $type_id
* @property int|null $resolution_id
* @property int $freeleech_percentage
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read Category|null $category
* @property-read Resolution|null $resolution
* @property-read Type|null $type
* @method static \Illuminate\Database\Eloquent\Builder|AutomaticTorrentFreeleech newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|AutomaticTorrentFreeleech newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|AutomaticTorrentFreeleech query()
* @mixin \Eloquent
*/
class AutomaticTorrentFreeleech extends Model
{
use Auditable;
Expand Down
7 changes: 7 additions & 0 deletions app/Models/Ban.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
* @property string|null $removed_at
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read User $banneduser
* @property-read User|null $staffuser
* @method static \Database\Factories\BanFactory factory($count = null, $state = [])
* @method static \Illuminate\Database\Eloquent\Builder|Ban newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Ban newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Ban query()
* @mixin \Eloquent
*/
class Ban extends Model
{
Expand Down
17 changes: 11 additions & 6 deletions app/Models/BlacklistClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@
/**
* App\Models\BlacklistClient.
*
* @property int $id
* @property string $name
* @property string|null $reason
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property string $peer_id_prefix
* @property int $id
* @property string $name
* @property string|null $reason
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property string $peer_id_prefix
* @method static \Database\Factories\BlacklistClientFactory factory($count = null, $state = [])
* @method static \Illuminate\Database\Eloquent\Builder|BlacklistClient newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|BlacklistClient newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|BlacklistClient query()
* @mixin \Eloquent
*/
class BlacklistClient extends Model
{
Expand Down
6 changes: 6 additions & 0 deletions app/Models/BlockedIp.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
* @property string|null $expires_at
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read User $user
* @method static \Database\Factories\BlockedIpFactory factory($count = null, $state = [])
* @method static \Illuminate\Database\Eloquent\Builder|BlockedIp newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|BlockedIp newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|BlockedIp query()
* @mixin \Eloquent
*/
class BlockedIp extends Model
{
Expand Down
21 changes: 13 additions & 8 deletions app/Models/BonExchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,19 @@
/**
* App\Models\BonExchange.
*
* @property int $id
* @property string|null $description
* @property int $value
* @property int $cost
* @property bool $upload
* @property bool $download
* @property bool $personal_freeleech
* @property bool $invite
* @property int $id
* @property string|null $description
* @property int $value
* @property int $cost
* @property bool $upload
* @property bool $download
* @property bool $personal_freeleech
* @property bool $invite
* @method static \Database\Factories\BonExchangeFactory factory($count = null, $state = [])
* @method static \Illuminate\Database\Eloquent\Builder|BonExchange newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|BonExchange newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|BonExchange query()
* @mixin \Eloquent
*/
class BonExchange extends Model
{
Expand Down
13 changes: 9 additions & 4 deletions app/Models/BonTransactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,18 @@
* @property int $id
* @property int $bon_exchange_id
* @property string $name
* @property float $cost
* @property string $cost
* @property int|null $sender_id
* @property int|null $receiver_id
* @property int|null $torrent_id
* @property int|null $post_id
* @property string $comment
* @property string $created_at
* @property-read BonExchange|null $exchange
* @property-read User|null $receiver
* @property-read User|null $sender
* @method static \Database\Factories\BonTransactionsFactory factory($count = null, $state = [])
* @method static \Illuminate\Database\Eloquent\Builder|BonTransactions newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|BonTransactions newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|BonTransactions query()
* @mixin \Eloquent
*/
class BonTransactions extends Model
{
Expand Down
7 changes: 7 additions & 0 deletions app/Models/Bookmark.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
* @property int $torrent_id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read Torrent $torrent
* @property-read User $user
* @method static \Database\Factories\BookmarkFactory factory($count = null, $state = [])
* @method static \Illuminate\Database\Eloquent\Builder|Bookmark newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Bookmark newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Bookmark query()
* @mixin \Eloquent
*/
class Bookmark extends Model
{
Expand Down
47 changes: 26 additions & 21 deletions app/Models/Bot.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,32 @@
/**
* App\Models\Bot.
*
* @property int $id
* @property int $position
* @property string $name
* @property string $command
* @property string|null $color
* @property string|null $icon
* @property string|null $emoji
* @property string|null $info
* @property string|null $about
* @property string|null $help
* @property int $active
* @property int $is_protected
* @property int $is_nerdbot
* @property int $is_systembot
* @property int $uploaded
* @property int $downloaded
* @property int $fl_tokens
* @property float $seedbonus
* @property int $invites
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property int $id
* @property int $position
* @property string $name
* @property string $command
* @property string|null $color
* @property string|null $icon
* @property string|null $emoji
* @property string|null $info
* @property string|null $about
* @property string|null $help
* @property int $active
* @property int $is_protected
* @property int $is_nerdbot
* @property int $is_systembot
* @property int $uploaded
* @property int $downloaded
* @property int $fl_tokens
* @property string $seedbonus
* @property int $invites
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @method static \Database\Factories\BotFactory factory($count = null, $state = [])
* @method static \Illuminate\Database\Eloquent\Builder|Bot newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Bot newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Bot query()
* @mixin \Eloquent
*/
class Bot extends Model
{
Expand Down
7 changes: 7 additions & 0 deletions app/Models/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
* @property bool $tv_meta
* @property bool $movie_meta
* @property int $num_torrent
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\TorrentRequest> $requests
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Torrent> $torrents
* @method static \Database\Factories\CategoryFactory factory($count = null, $state = [])
* @method static \Illuminate\Database\Eloquent\Builder|Category newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Category newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Category query()
* @mixin \Eloquent
*/
class Category extends Model
{
Expand Down
6 changes: 6 additions & 0 deletions app/Models/ChatStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
* @property string|null $icon
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $users
* @method static \Database\Factories\ChatStatusFactory factory($count = null, $state = [])
* @method static \Illuminate\Database\Eloquent\Builder|ChatStatus newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|ChatStatus newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|ChatStatus query()
* @mixin \Eloquent
*/
class ChatStatus extends Model
{
Expand Down
Loading