Both ContentTypeMatchesPlatform and ContentTypeMatchesPostPlatform
were using preg_replace to swap the leaf segment of a dotted attribute
path ("platforms.0.content_type" -> "platforms.0.social_account_id").
Cleaner with Str::beforeLast: derive the parent path once, then look
up the sibling under it. Same intent, no regex, and the rule no longer
encodes its own attribute name.
|
||
|---|---|---|
| .. | ||
| ContentTypeCompatibleWithMedia.php | ||
| ContentTypeMatchesPlatform.php | ||
| ContentTypeMatchesPostPlatform.php | ||
| Timezone.php | ||