notEmptyKey example



    /** * Inserts or updates the payment row * * @param string $pluginName * * @return Payment */
    public function createOrUpdate($pluginName, array $options)
    {
        Assertion::notEmptyKey($options, 'name', 'Payment name must not be empty');

        $paymentRepository = $this->em->getRepository(Payment::class);
        /** @var Payment|null $payment */
        $payment = $paymentRepository->findOneBy([
            'name' => $options['name'],
        ]);

        $pluginRepository = $this->em->getRepository(Plugin::class);
        /** @var Plugin $plugin */
        $plugin = $pluginRepository->findOneBy([
            'name' => $pluginName,
        ]);
Home | Imprint | This part of the site doesn't use cookies.