|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpDocWithTypedScopeParameter\Models; |
| 6 | + |
| 7 | +use Illuminate\Database\Eloquent\Builder; |
| 8 | +use Illuminate\Database\Eloquent\Model; |
| 9 | + |
| 10 | +class Comment extends Model |
| 11 | +{ |
| 12 | + /** |
| 13 | + * @comment Scope with required boolean parameter |
| 14 | + */ |
| 15 | + protected function scopeTyped01(Builder $query, bool $value) |
| 16 | + { |
| 17 | + $query->where('type', $value); |
| 18 | + } |
| 19 | + |
| 20 | + /** |
| 21 | + * @comment Scope with optional boolean parameter and default true |
| 22 | + */ |
| 23 | + protected function scopeTyped02(Builder $query, bool $value = true) |
| 24 | + { |
| 25 | + $query->where('type', $value); |
| 26 | + } |
| 27 | + |
| 28 | + /** |
| 29 | + * @comment Scope with optional boolean parameter and default false |
| 30 | + */ |
| 31 | + protected function scopeTyped03(Builder $query, bool $value = false) |
| 32 | + { |
| 33 | + $query->where('type', $value); |
| 34 | + } |
| 35 | + |
| 36 | + /** |
| 37 | + * @comment Scope with required string parameter |
| 38 | + */ |
| 39 | + protected function scopeTyped04(Builder $query, string $value) |
| 40 | + { |
| 41 | + $query->where('type', $value); |
| 42 | + } |
| 43 | + |
| 44 | + /** |
| 45 | + * @comment Scope with optional string parameter and default value |
| 46 | + */ |
| 47 | + protected function scopeTyped05(Builder $query, string $value = 'dummy123') |
| 48 | + { |
| 49 | + $query->where('type', $value); |
| 50 | + } |
| 51 | + |
| 52 | + /** |
| 53 | + * @comment Scope with required integer parameter |
| 54 | + */ |
| 55 | + protected function scopeTyped06(Builder $query, int $value) |
| 56 | + { |
| 57 | + $query->where('type', $value); |
| 58 | + } |
| 59 | + |
| 60 | + /** |
| 61 | + * @comment Scope with optional integer parameter and default positive value |
| 62 | + */ |
| 63 | + protected function scopeTyped07(Builder $query, int $value = 123) |
| 64 | + { |
| 65 | + $query->where('type', $value); |
| 66 | + } |
| 67 | + |
| 68 | + /** |
| 69 | + * @comment Scope with optional integer parameter and default negative value |
| 70 | + */ |
| 71 | + protected function scopeTyped08(Builder $query, int $value = -123) |
| 72 | + { |
| 73 | + $query->where('type', $value); |
| 74 | + } |
| 75 | + |
| 76 | + /** |
| 77 | + * @comment Scope with required float parameter |
| 78 | + */ |
| 79 | + protected function scopeTyped09(Builder $query, float $value) |
| 80 | + { |
| 81 | + $query->where('type', $value); |
| 82 | + } |
| 83 | + |
| 84 | + /** |
| 85 | + * @comment Scope with optional float parameter and default positive integer value |
| 86 | + */ |
| 87 | + protected function scopeTyped10(Builder $query, float $value = 123) |
| 88 | + { |
| 89 | + $query->where('type', $value); |
| 90 | + } |
| 91 | + |
| 92 | + /** |
| 93 | + * @comment Scope with optional float parameter and default negative integer value |
| 94 | + */ |
| 95 | + protected function scopeTyped11(Builder $query, float $value = -123) |
| 96 | + { |
| 97 | + $query->where('type', $value); |
| 98 | + } |
| 99 | + |
| 100 | + /** |
| 101 | + * @comment Scope with optional float parameter and default positive float value |
| 102 | + */ |
| 103 | + protected function scopeTyped12(Builder $query, float $value = 1.23) |
| 104 | + { |
| 105 | + $query->where('type', $value); |
| 106 | + } |
| 107 | + |
| 108 | + /** |
| 109 | + * @comment Scope with optional float parameter and default negative float value |
| 110 | + */ |
| 111 | + protected function scopeTyped13(Builder $query, float $value = -1.23) |
| 112 | + { |
| 113 | + $query->where('type', $value); |
| 114 | + } |
| 115 | + |
| 116 | + /** |
| 117 | + * @comment Scope with required nullable boolean parameter |
| 118 | + */ |
| 119 | + protected function scopeTyped14(Builder $query, ?bool $value) |
| 120 | + { |
| 121 | + $query->where('type', $value); |
| 122 | + } |
| 123 | + |
| 124 | + /** |
| 125 | + * @comment Scope with optional nullable boolean parameter and default true |
| 126 | + */ |
| 127 | + protected function scopeTyped15(Builder $query, ?bool $value = true) |
| 128 | + { |
| 129 | + $query->where('type', $value); |
| 130 | + } |
| 131 | + |
| 132 | + /** |
| 133 | + * @comment Scope with optional nullable boolean parameter and default false |
| 134 | + */ |
| 135 | + protected function scopeTyped16(Builder $query, ?bool $value = false) |
| 136 | + { |
| 137 | + $query->where('type', $value); |
| 138 | + } |
| 139 | + |
| 140 | + /** |
| 141 | + * @comment Scope with optional nullable boolean parameter and default null |
| 142 | + */ |
| 143 | + protected function scopeTyped17(Builder $query, ?bool $value = null) |
| 144 | + { |
| 145 | + $query->where('type', $value); |
| 146 | + } |
| 147 | + |
| 148 | + /** |
| 149 | + * @comment Scope with required nullable string parameter |
| 150 | + */ |
| 151 | + protected function scopeTyped18(Builder $query, ?string $value) |
| 152 | + { |
| 153 | + $query->where('type', $value); |
| 154 | + } |
| 155 | + |
| 156 | + /** |
| 157 | + * @comment Scope with optional nullable string parameter and default value |
| 158 | + */ |
| 159 | + protected function scopeTyped19(Builder $query, ?string $value = 'dummy123') |
| 160 | + { |
| 161 | + $query->where('type', $value); |
| 162 | + } |
| 163 | + |
| 164 | + /** |
| 165 | + * @comment Scope with optional nullable string parameter and default null |
| 166 | + */ |
| 167 | + protected function scopeTyped20(Builder $query, ?string $value = null) |
| 168 | + { |
| 169 | + $query->where('type', $value); |
| 170 | + } |
| 171 | + |
| 172 | + /** |
| 173 | + * @comment Scope with required nullable integer parameter |
| 174 | + */ |
| 175 | + protected function scopeTyped21(Builder $query, ?int $value) |
| 176 | + { |
| 177 | + $query->where('type', $value); |
| 178 | + } |
| 179 | + |
| 180 | + /** |
| 181 | + * @comment Scope with optional nullable integer parameter and default positive value |
| 182 | + */ |
| 183 | + protected function scopeTyped22(Builder $query, ?int $value = 123) |
| 184 | + { |
| 185 | + $query->where('type', $value); |
| 186 | + } |
| 187 | + |
| 188 | + /** |
| 189 | + * @comment Scope with optional nullable integer parameter and default negative value |
| 190 | + */ |
| 191 | + protected function scopeTyped23(Builder $query, ?int $value = -123) |
| 192 | + { |
| 193 | + $query->where('type', $value); |
| 194 | + } |
| 195 | + |
| 196 | + /** |
| 197 | + * @comment Scope with optional nullable integer parameter and default null |
| 198 | + */ |
| 199 | + protected function scopeTyped24(Builder $query, ?int $value = null) |
| 200 | + { |
| 201 | + $query->where('type', $value); |
| 202 | + } |
| 203 | + |
| 204 | + /** |
| 205 | + * @comment Scope with required float nullable parameter |
| 206 | + */ |
| 207 | + protected function scopeTyped25(Builder $query, ?float $value) |
| 208 | + { |
| 209 | + $query->where('type', $value); |
| 210 | + } |
| 211 | + |
| 212 | + /** |
| 213 | + * @comment Scope with optional nullable float parameter and default positive integer value |
| 214 | + */ |
| 215 | + protected function scopeTyped26(Builder $query, ?float $value = 123) |
| 216 | + { |
| 217 | + $query->where('type', $value); |
| 218 | + } |
| 219 | + |
| 220 | + /** |
| 221 | + * @comment Scope with optional nullable float parameter and default negative integer value |
| 222 | + */ |
| 223 | + protected function scopeTyped27(Builder $query, ?float $value = -123) |
| 224 | + { |
| 225 | + $query->where('type', $value); |
| 226 | + } |
| 227 | + |
| 228 | + /** |
| 229 | + * @comment Scope with optional float parameter and default positive float value |
| 230 | + */ |
| 231 | + protected function scopeTyped28(Builder $query, ?float $value = 1.23) |
| 232 | + { |
| 233 | + $query->where('type', $value); |
| 234 | + } |
| 235 | + |
| 236 | + /** |
| 237 | + * @comment Scope with optional float parameter and default negative float value |
| 238 | + */ |
| 239 | + protected function scopeTyped29(Builder $query, ?float $value = -1.23) |
| 240 | + { |
| 241 | + $query->where('type', $value); |
| 242 | + } |
| 243 | + |
| 244 | + /** |
| 245 | + * @comment Scope with optional float parameter and default null |
| 246 | + */ |
| 247 | + protected function scopeTyped30(Builder $query, ?float $value = null) |
| 248 | + { |
| 249 | + $query->where('type', $value); |
| 250 | + } |
| 251 | +} |
0 commit comments