scope = $scope; } /** * @since 2.32.0 */ public function isDonation(): bool { return $this->scope === self::DONATION; } /** * @since 3.0.0 */ public function isSubscription(): bool { return $this->scope === self::SUBSCRIPTION; } /** * @since 2.32.0 */ public function isDonor(): bool { return $this->scope === self::DONOR; } /** * @since 2.32.0 */ public function isCallback(): bool { return $this->scope === self::CALLBACK; } /** * @since 2.32.0 * * @param self|string $scope */ public function is($scope): bool { if ($scope instanceof self) { $scope = $scope->scope; } return $this->scope === $scope; } /** * @since 2.32.0 */ public function __toString() { return $this->scope; } }