public function authorizeUpgradePackage(AnCommandContext $context)
    {
        $viewer = $context->viewer;

        if (!$viewer->hasSubscription()) {
            return false;
        }

        $package = $viewer->subscription->package;

        return !$this->eql($package) &&
        (
            $package->duration < $this->duration ||
            $package->price < $this->price
        );
    }
public function authorizeUpgradePackage(AnCommandContext $context)
    {
        $viewer = $context->viewer;

        if (!$viewer->hasSubscription()) {
            return false;
        }

        $package = $viewer->subscription->package;

        return !$this->eql($package) &&
        (
            $package->duration < $this->duration ||
            $package->price < $this->price
        );
    }
public function authorizeUpgradePackage ( AnCommandContext $ context ) { $ viewer = $ context -> viewer ; if ( ! $ viewer -> hasSubscription ( ) ) { return false ; } $ package = $ viewer -> subscription -> package ; return ! $ this -> eql ( $ package ) && ( $ package -> duration < $ this -> duration || $ package -> price < $ this -> price ) ; }
Authorizers upgrading to a package.

@param AnCommandContext $context Context parameter

@return bool
Authorizers upgrading to a package .