Skip to content

Commit dc3e6a4

Browse files
xurshudyanXurshudyan
andauthored
Add class-string type annotations to ModelObserver (#952)
Co-authored-by: Xurshudyan <[email protected]>
1 parent af36d69 commit dc3e6a4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ModelObserver.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class ModelObserver
3232
/**
3333
* The class names that syncing is disabled for.
3434
*
35-
* @var array
35+
* @var array<class-string<\Illuminate\Database\Eloquent\Model>, bool>
3636
*/
3737
protected static $syncingDisabledFor = [];
3838

@@ -50,7 +50,7 @@ public function __construct()
5050
/**
5151
* Enable syncing for the given class.
5252
*
53-
* @param string $class
53+
* @param class-string<\Illuminate\Database\Eloquent\Model> $class
5454
* @return void
5555
*/
5656
public static function enableSyncingFor($class)
@@ -61,7 +61,7 @@ public static function enableSyncingFor($class)
6161
/**
6262
* Disable syncing for the given class.
6363
*
64-
* @param string $class
64+
* @param class-string<\Illuminate\Database\Eloquent\Model> $class
6565
* @return void
6666
*/
6767
public static function disableSyncingFor($class)
@@ -72,7 +72,7 @@ public static function disableSyncingFor($class)
7272
/**
7373
* Determine if syncing is disabled for the given class or model.
7474
*
75-
* @param object|string $class
75+
* @param object|class-string<\Illuminate\Database\Eloquent\Model> $class
7676
* @return bool
7777
*/
7878
public static function syncingDisabledFor($class)

0 commit comments

Comments
 (0)