src/Repositories/CustomerGroupRepository.php
public function findAll()
    {

        // initialize the array for the customer groups
        $customerGroups = [];

        // execute the prepared statement
        $this->customerGroupsStmt->execute();

        // load the available customer groups
        $availableCustomerGroups = $this->customerGroupsStmt->fetchAll();

        // fetch the customer groups and assemble them as array with the codes as key
        foreach ($availableCustomerGroups as $customerGroup) {
            $customerGroups[$customerGroup[MemberNames::CUSTOMER_GROUP_CODE]] = $customerGroup;
        }

        // return the customer groups
        return $customerGroups;
    }
public function findAll()
    {

        // initialize the array for the customer groups
        $customerGroups = [];

        // execute the prepared statement
        $this->customerGroupsStmt->execute();

        // load the available customer groups
        $availableCustomerGroups = $this->customerGroupsStmt->fetchAll();

        // fetch the customer groups and assemble them as array with the codes as key
        foreach ($availableCustomerGroups as $customerGroup) {
            $customerGroups[$customerGroup[MemberNames::CUSTOMER_GROUP_CODE]] = $customerGroup;
        }

        // return the customer groups
        return $customerGroups;
    }
Returns an array with the available customer groups and their code as keys.

@return array The array with the customer groups