Skip to content

Commit 0f57d79

Browse files
committed
Merge branch '9.x'
# Conflicts: # src/Illuminate/Foundation/Application.php
2 parents 2ff0764 + 4a474ce commit 0f57d79

File tree

32 files changed

+215
-63
lines changed

32 files changed

+215
-63
lines changed

src/Illuminate/Auth/Console/stubs/make/views/layouts/app.stub

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
<!-- Scripts -->
1313
<script src="{{ asset('js/app.js') }}" defer></script>
1414

15-
<!-- Fonts -->
16-
<link rel="preconnect" href="https://fonts.gstatic.com">
17-
<link href="https://fonts.googleapis.com/css2?family=Nunito&display=swap" rel="stylesheet">
18-
1915
<!-- Styles -->
2016
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
2117
</head>

src/Illuminate/Cache/DynamoDbStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public function put($key, $value, $seconds)
211211
}
212212

213213
/**
214-
* Store multiple items in the cache for a given number of $seconds.
214+
* Store multiple items in the cache for a given number of seconds.
215215
*
216216
* @param array $values
217217
* @param int $seconds

src/Illuminate/Collections/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1528,7 +1528,7 @@ public function undot()
15281528
/**
15291529
* Return only unique items from the collection array.
15301530
*
1531-
* @param (callable(TValue, TKey): bool)|string|null $key
1531+
* @param (callable(TValue, TKey): mixed)|string|null $key
15321532
* @param bool $strict
15331533
* @return static
15341534
*/

src/Illuminate/Collections/Enumerable.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ public function duplicatesStrict($callback = null);
259259
/**
260260
* Execute a callback over each item.
261261
*
262-
* @param callable(TValue): mixed $callback
262+
* @param callable(TValue, TKey): mixed $callback
263263
* @return $this
264264
*/
265265
public function each(callable $callback);
@@ -1099,7 +1099,7 @@ public function pluck($value, $key = null);
10991099
/**
11001100
* Create a collection of all elements that do not pass a given truth test.
11011101
*
1102-
* @param (callable(TValue): bool)|bool $callback
1102+
* @param (callable(TValue, TKey): bool)|bool $callback
11031103
* @return static
11041104
*/
11051105
public function reject($callback = true);
@@ -1114,7 +1114,7 @@ public function undot();
11141114
/**
11151115
* Return only unique items from the collection array.
11161116
*
1117-
* @param (callable(TValue, TKey): bool)|string|null $key
1117+
* @param (callable(TValue, TKey): mixed)|string|null $key
11181118
* @param bool $strict
11191119
* @return static
11201120
*/
@@ -1123,7 +1123,7 @@ public function unique($key = null, $strict = false);
11231123
/**
11241124
* Return only unique items from the collection array using strict comparison.
11251125
*
1126-
* @param (callable(TValue, TKey): bool)|string|null $key
1126+
* @param (callable(TValue, TKey): mixed)|string|null $key
11271127
* @return static
11281128
*/
11291129
public function uniqueStrict($key = null);

src/Illuminate/Collections/LazyCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1464,7 +1464,7 @@ public function undot()
14641464
/**
14651465
* Return only unique items from the collection array.
14661466
*
1467-
* @param (callable(TValue, TKey): bool)|string|null $key
1467+
* @param (callable(TValue, TKey): mixed)|string|null $key
14681468
* @param bool $strict
14691469
* @return static
14701470
*/

src/Illuminate/Collections/Traits/EnumeratesValues.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public function dump()
252252
/**
253253
* Execute a callback over each item.
254254
*
255-
* @param callable(TValue): mixed $callback
255+
* @param callable(TValue, TKey): mixed $callback
256256
* @return $this
257257
*/
258258
public function each(callable $callback)
@@ -803,7 +803,7 @@ public function reduceWithKeys(callable $callback, $initial = null)
803803
/**
804804
* Create a collection of all elements that do not pass a given truth test.
805805
*
806-
* @param (callable(TValue): bool)|bool $callback
806+
* @param (callable(TValue, TKey): bool)|bool $callback
807807
* @return static
808808
*/
809809
public function reject($callback = true)
@@ -833,7 +833,7 @@ public function tap(callable $callback)
833833
/**
834834
* Return only unique items from the collection array.
835835
*
836-
* @param (callable(TValue, TKey): bool)|string|null $key
836+
* @param (callable(TValue, TKey): mixed)|string|null $key
837837
* @param bool $strict
838838
* @return static
839839
*/
@@ -855,7 +855,7 @@ public function unique($key = null, $strict = false)
855855
/**
856856
* Return only unique items from the collection array using strict comparison.
857857
*
858-
* @param (callable(TValue, TKey): bool)|string|null $key
858+
* @param (callable(TValue, TKey): mixed)|string|null $key
859859
* @return static
860860
*/
861861
public function uniqueStrict($key = null)

src/Illuminate/Conditionable/Traits/Conditionable.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public function when($value, callable $callback = null, callable $default = null
2626
}
2727

2828
if ($value) {
29-
return $callback($this, $value) ?: $this;
29+
return $callback($this, $value) ?? $this;
3030
} elseif ($default) {
31-
return $default($this, $value) ?: $this;
31+
return $default($this, $value) ?? $this;
3232
}
3333

3434
return $this;
@@ -53,9 +53,9 @@ public function unless($value, callable $callback = null, callable $default = nu
5353
}
5454

5555
if (! $value) {
56-
return $callback($this, $value) ?: $this;
56+
return $callback($this, $value) ?? $this;
5757
} elseif ($default) {
58-
return $default($this, $value) ?: $this;
58+
return $default($this, $value) ?? $this;
5959
}
6060

6161
return $this;

src/Illuminate/Database/Connection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,7 @@ protected function fireConnectionEvent($event)
869869
'beganTransaction' => new TransactionBeginning($this),
870870
'committed' => new TransactionCommitted($this),
871871
'rollingBack' => new TransactionRolledBack($this),
872+
default => null,
872873
});
873874
}
874875

src/Illuminate/Database/Eloquent/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ public function intersect($items)
458458
/**
459459
* Return only unique items from the collection.
460460
*
461-
* @param (callable(TModel, TKey): bool)|string|null $key
461+
* @param (callable(TModel, TKey): mixed)|string|null $key
462462
* @param bool $strict
463463
* @return static<int, TModel>
464464
*/

src/Illuminate/Database/Eloquent/Factories/Factory.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ abstract public function definition();
148148
/**
149149
* Get a new factory instance for the given attributes.
150150
*
151-
* @param (callable(): array<string, mixed>)|array<string, mixed> $attributes
151+
* @param (callable(array<string, mixed>): array<string, mixed>)|array<string, mixed> $attributes
152152
* @return static
153153
*/
154154
public static function new($attributes = [])
@@ -180,7 +180,7 @@ public function configure()
180180
/**
181181
* Get the raw attributes generated by the factory.
182182
*
183-
* @param array<string, mixed> $attributes
183+
* @param (callable(array<string, mixed>): array<string, mixed>)|array<string, mixed> $attributes
184184
* @param \Illuminate\Database\Eloquent\Model|null $parent
185185
* @return array<int|string, mixed>
186186
*/
@@ -198,7 +198,7 @@ public function raw($attributes = [], ?Model $parent = null)
198198
/**
199199
* Create a single model and persist it to the database.
200200
*
201-
* @param array<string, mixed> $attributes
201+
* @param (callable(array<string, mixed>): array<string, mixed>)|array<string, mixed> $attributes
202202
* @return \Illuminate\Database\Eloquent\Model|TModel
203203
*/
204204
public function createOne($attributes = [])
@@ -209,7 +209,7 @@ public function createOne($attributes = [])
209209
/**
210210
* Create a single model and persist it to the database.
211211
*
212-
* @param array<string, mixed> $attributes
212+
* @param (callable(array<string, mixed>): array<string, mixed>)|array<string, mixed> $attributes
213213
* @return \Illuminate\Database\Eloquent\Model|TModel
214214
*/
215215
public function createOneQuietly($attributes = [])
@@ -248,7 +248,7 @@ public function createManyQuietly(iterable $records)
248248
/**
249249
* Create a collection of models and persist them to the database.
250250
*
251-
* @param array<string, mixed> $attributes
251+
* @param (callable(array<string, mixed>): array<string, mixed>)|array<string, mixed> $attributes
252252
* @param \Illuminate\Database\Eloquent\Model|null $parent
253253
* @return \Illuminate\Database\Eloquent\Collection<int, \Illuminate\Database\Eloquent\Model|TModel>|\Illuminate\Database\Eloquent\Model|TModel
254254
*/
@@ -338,7 +338,7 @@ protected function createChildren(Model $model)
338338
/**
339339
* Make a single instance of the model.
340340
*
341-
* @param (callable(): array<string, mixed>)|array<string, mixed> $attributes
341+
* @param (callable(array<string, mixed>): array<string, mixed>)|array<string, mixed> $attributes
342342
* @return \Illuminate\Database\Eloquent\Model|TModel
343343
*/
344344
public function makeOne($attributes = [])
@@ -349,7 +349,7 @@ public function makeOne($attributes = [])
349349
/**
350350
* Create a collection of models.
351351
*
352-
* @param array<string, mixed> $attributes
352+
* @param (callable(array<string, mixed>): array<string, mixed>)|array<string, mixed> $attributes
353353
* @param \Illuminate\Database\Eloquent\Model|null $parent
354354
* @return \Illuminate\Database\Eloquent\Collection<int, \Illuminate\Database\Eloquent\Model|TModel>|\Illuminate\Database\Eloquent\Model|TModel
355355
*/
@@ -469,7 +469,7 @@ protected function expandAttributes(array $definition)
469469
/**
470470
* Add a new state transformation to the model definition.
471471
*
472-
* @param (callable(): array<string, mixed>)|array<string, mixed> $state
472+
* @param (callable(array<string, mixed>): array<string, mixed>)|array<string, mixed> $state
473473
* @return static
474474
*/
475475
public function state($state)

0 commit comments

Comments
 (0)