@param StripeLocalSubscription $localSubscription

@return bool
481114
public function cancelSubscription(StripeLocalSubscription $localSubscription)
    {
        // Get the stripe object
        $stripeSubscription = $this->retrieveSubscription($localSubscription);

        // The retrieving failed: return false
        if (false === $stripeSubscription) {
            return false;
        }

        // Save the subscription object
        $stripeSubscription = $this->callStripeObject($stripeSubscription, 'cancel');

        // If the update failed, return false
        if (false === $stripeSubscription) {
            return false;
        }

        return true;
    }
322759
public function onTrial($subscription = 'default', $plan = null)
    {
        if (func_num_args() === 0 && $this->onGenericTrial()) {
            return true;
        }

        $subscription = $this->subscription($subscription);

        if (is_null($plan)) {
            return $subscription && $subscription->onTrial();
        }

        return $subscription && $subscription->onTrial() &&
               $subscription->stripe_plan === $plan;
    }
1017945
public function onTrial(string $subscription = 'default', ?string $plan = null): bool
    {
        if (func_num_args() === 0 && $this->onGenericTrial()) {
            return true;
        }
        $subscription = $this->subscription($subscription);
        if (is_null($plan)) {
            return $subscription && $subscription->onTrial();
        }

        return $subscription && $subscription->onTrial() &&
            $subscription->stripePlan === $plan;
    }
1240900
public function updatePlan(StripeLocalPlan $localPlan, $syncSources)
    {
        // Get the stripe object
        $stripePlan = $this->retrievePlan($localPlan);

        // The retrieving failed: return false
        if (false === $stripePlan) {
            return false;
        }

        // Update the stripe object with info set in the local object
        $this->planSyncer->syncStripeFromLocal($stripePlan, $localPlan);

        // Save the plan object
        $stripePlan = $this->callStripeObject($stripePlan, 'save');

        // If the update failed, return false
        if (false === $stripePlan) {
            return false;
        }

        // Set the data returned by Stripe in the LocalPlan object
        $this->planSyncer->syncLocalFromStripe($localPlan, $stripePlan);

        if (true === $syncSources) {
            $this->planSyncer->syncLocalSources($localPlan, $stripePlan);
        }

        return true;
    }
759074
function DetectSonyMylo()
   {
      if ((stripos($this->useragent, $this->manuSony) > -1) &&
         ((stripos($this->useragent, $this->qtembedded) > -1) ||
          (stripos($this->useragent, $this->mylocom2) > -1)))
         return $this->true; 
      else
         return $this->false; 
   }
533485
public function createCharge(StripeLocalCharge $localCharge)
    {
        // Get the object as an array
        $params = $localCharge->toStripe('create');

        // If the statement descriptor is not set and the default one is not null...
        if (false === isset($params['statement_descriptor']) && false === is_null($this->statementDescriptor)) {
            // Set it
            $params['statement_descriptor'] = $this->statementDescriptor;
        }

        $arguments = [
            'params'  => $params,
            'options' => [],
        ];

        $stripeCharge = $this->callStripeApi(Charge::class, 'create', $arguments);

        // If the creation failed...
        if (false === $stripeCharge) {
            // ... Check if it was due to a fraudulent detection
            if (isset($this->error['error']['type'])) {
                $this->chargeSyncer->handleFraudDetection($localCharge, $this->error);
            }

            // ... return false as the payment anyway failed
            return false;
        }

        // Set the data returned by Stripe in the LocalCustomer object
        $this->chargeSyncer->syncLocalFromStripe($localCharge, $stripeCharge);

        // The creation was successful: return true
        return true;
    }
1081735
public function isLocal() : bool
   {

      if ( $this->states[ 'LOCAL' ] ) { return true; }
      if ( null === $this->_sld ) { return false; }
      return $this->_sld->isLocal();

   }
255518
public ApiResponse<SubscriptionEnvelope> getSubscriptionWithHttpInfo(String subId) throws ApiException {
        com.squareup.okhttp.Call call = getSubscriptionValidateBeforeCall(subId, null, null);
        Type localVarReturnType = new TypeToken<SubscriptionEnvelope>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }
1128260
function isSubmitterValid($shortCode, $newSubmitter){
		$getSubmittersRequest = new getSubmitters ();
		$getSubmittersRequest->projectShortCode = $shortCode;
		$submitters = $this->userProfileService->getSubmitters ( $getSubmittersRequest )->return;
		if(isset($submitters)){
			foreach ($submitters as &$submitter){
				if(isset($submitter)){
					$info = $submitter;
					if(isset($submitter->userInfo)){
						$info = $submitter->userInfo;
					}
					if($info->userName == $newSubmitter && ($info->enabled=='1' || $info->enabled==1 || $info->enabled=='true' || $info->enabled==true)){
						return true;
					}
				}
			}
		}
		return false;
	}
826553
public function checkSubscription()
    {
        if (!$this->subscriberSocket) {
            $this->subscriberSocket = $this->context->getSocket(\ZMQ::SOCKET_SUB);
            $this->subscriberSocket->connect($this->publisherPmSocketAddress);
            $this->subscriberSocket->setSockOpt(\ZMQ::SOCKOPT_SUBSCRIBE, "");
        }

        $this->subscriptionMessage = @json_decode($this->subscriberSocket->recv(\ZMQ::MODE_DONTWAIT), true);

        if (($this->subscriptionMessage !== false) && ($this->subscriptionMessage !== null)
            && (is_array($this->subscriptionMessage) === false)
        ) {
            throw new ProcessManagerException("Not correct param from ProcessManager to TerminatorPauseStander: "
                . serialize($this->subscriptionMessage));
        }

        if (isset($this->subscriptionMessage)) {
            $this->logger->info("Receive subscription message: " . serialize($this->subscriptionMessage));
            $this->resolveAction();
        }

        return null;
    }
145240
public void setLocalSubnet(String localSubnet) {
        IPAddressType currSubnetType = IPAddressCompare.getAddressType(localSubnet);
        this.currSubnetType = currSubnetType;
        this.localSubnetString = localSubnet;

        if (currSubnetType == IPAddressType.IPV4) {
            this.localSubnet = IPAddressCompare.addressToByteArrayV4(localSubnet);
        } else if (currSubnetType == IPAddressType.IPV6) {
            this.localSubnet = IPAddressCompare.addressToByteArrayV6(localSubnet);
        }
    }
1197107
public function delete($key, $localOnly = false)
    {
        $cacheKey = $this->cacheKey($key);
        if($this->keepLocalCache)
            unset($this->localCache[$cacheKey]);
        if(!$localOnly)
            return $this->cacheStore->delete($cacheKey);

        return true;
    }
388280
private function _saveSubscriptionInvoice(array $stripeInvoice, Subscription $subscription): Invoice
    {
        $invoiceService = StripePlugin::getInstance()->getInvoices();
        $invoice = $invoiceService->getInvoiceByReference($stripeInvoice['id']) ?: new Invoice();
        $invoice->subscriptionId = $subscription->id;
        $invoice->reference = $stripeInvoice['id'];
        $invoice->invoiceData = $stripeInvoice;
        $invoiceService->saveInvoice($invoice);

        return $invoice;
    }
341867
private function checkAllSubscribersAreStatic(array $subscribers): bool
    {
        $result = true;
        foreach ($subscribers as $eventName => $callableList) {
            if (is_string($eventName) === false || is_array($callableList) === false) {
                $result = false;
                break;
            }
            foreach ($callableList as $mightBeCallable) {
                $method = $this->parseStaticMethod($mightBeCallable);
                if ($method === null || $method->isStatic() === false) {
                    $result = false;
                    break;
                }
            }
        }

        return $result;
    }
1071594
public function retrieveCustomer(StripeLocalCustomer $localCustomer)
    {
        // If no ID is set, return false
        if (null === $localCustomer->getId()) {
            return false;
        }

        $arguments = [
            'id'      => $localCustomer->getId(),
            'options' => [],
        ];

        // Return the stripe object that can be "false" or "Customer"
        return $this->callStripeApi(Customer::class, 'retrieve', $arguments);
    }
1309650
public function has_subscriber($subscriptions)
    {
        $enabled_components = $this->wrappedObject->enabled_components()->orderBy('order')->pluck('id')->toArray();
        $intersected = array_intersect($enabled_components, $subscriptions);

        return count($intersected) != 0;
    }
1141606
public final void markAsWriteTransaction(GlobalTransaction globalTransaction, boolean local) {
      TransactionStatistics txs = getTransactionStatistic(globalTransaction, local);
      if (txs == null) {
         log.markUnexistingTransactionAsWriteTransaction(globalTransaction == null ? "null" : globalTransaction.globalId());
         return;
      }
      txs.markAsUpdateTransaction();
   }