Laravel AT Protocol Client (alpha & unstable)
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

Allow BackedEnum for collection parameter in Scope::repo()

+5 -2
+5 -2
src/Enums/Scope.php
··· 2 2 3 3 namespace SocialDept\AtpClient\Enums; 4 4 5 + use BackedEnum; 6 + 5 7 enum Scope: string 6 8 { 7 9 // Transition scopes (current) ··· 13 15 /** 14 16 * Build a repo scope string for record operations. 15 17 * 16 - * @param string $collection The collection NSID (e.g., 'app.bsky.feed.post') 18 + * @param string|BackedEnum $collection The collection NSID (e.g., 'app.bsky.feed.post') 17 19 * @param array|null $actions The action (create, update, delete) 18 20 * 19 21 * @return string 20 22 */ 21 - public static function repo(string $collection, ?array $actions = []): string 23 + public static function repo(string|BackedEnum $collection, ?array $actions = []): string 22 24 { 25 + $collection = $collection instanceof BackedEnum ? $collection->value : $collection; 23 26 $scope = "repo:{$collection}"; 24 27 25 28 if (!empty($actions)) {