diff --git a/src/Support/PathGenerator/PathGeneratorFactory.php b/src/Support/PathGenerator/PathGeneratorFactory.php index e58b90d61..63d770e6b 100644 --- a/src/Support/PathGenerator/PathGeneratorFactory.php +++ b/src/Support/PathGenerator/PathGeneratorFactory.php @@ -22,7 +22,7 @@ protected static function getPathGeneratorClass(Media $media) $defaultPathGeneratorClass = config('media-library.path_generator'); foreach (config('media-library.custom_path_generators', []) as $modelClass => $customPathGeneratorClass) { - if (static::assertMediaModelTypeEqualsTo($media, $modelClass)) { + if (static::mediaBelongToModelClass($media, $modelClass)) { return $customPathGeneratorClass; } } @@ -30,7 +30,7 @@ protected static function getPathGeneratorClass(Media $media) return $defaultPathGeneratorClass; } - protected static function assertMediaModelTypeEqualsTo(Media $media, string $modelClass): bool + protected static function mediaBelongToModelClass(Media $media, string $modelClass): bool { // model doesn't have morphMap, so morph type and class are equal if (is_a($media->model_type, $modelClass, true)) {