<commit_before><?php

namespace AppBundle\Repository;

use Doctrine\ORM\EntityRepository;

/**
 * Class PaymentGatewayRepository
 * @package AppBundle\Repository
 */
class PaymentGatewayRepository extends EntityRepository
{
    /**
     * Aktif payment gateway i slug => value şeklinde döndürür
     * 
     * @return array
     */
    public function getActivePaymentGatewayChoices()
    {
        $choices = array();
        $gateways = $this->getEntityManager()
            ->getRepository('AppBundle:PaymentGateway')
            ->findBy(array(
                'isActive' => 1
            ));

        foreach ($gateways as $gateway) {
            $choices[$gateway->getSlug()] = $gateway->getName();
        }

        return $choices;
    }
}<commit_msg>tümünü değil de sadece gerekli alanlar çekilecek şekilde repository düzenlendi<commit_after><?php

namespace AppBundle\Repository;

use Doctrine\ORM\EntityRepository;

/**
 * Class PaymentGatewayRepository
 * @package AppBundle\Repository
 */
class PaymentGatewayRepository extends EntityRepository
{
    /**
     * Aktif payment gateway i slug => value şeklinde döndürür
     *
     * @return array
     */
    public function getActivePaymentGatewayChoices()
    {
        $choices = array();
        $gateways = $this->createQueryBuilder('pg')
            ->select('pg.slug, pg.name')
            ->where('pg.isActive = 1')
            ->getQuery()
            ->getArrayResult();

        if (count($gateways) > 0) {
            foreach ($gateways as $gateway) {
                $choices[$gateway['slug']] = $gateway['name'];
            }
        }

        return $choices;
    }
}
{'fraction_non_alphanumeric': 0.11900425015179114, 'fraction_numerical': 0.0018214936247723133, 'mean_word_length': 2.3564154786150713, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '975352', 'n_tokens_mistral': 489, 'n_tokens_neox': 476, 'n_words': 98}