KJ\Magento\Command\Order\Create\DummyCommand::_loadRandomCustomer PHP Method

_loadRandomCustomer() protected method

protected _loadRandomCustomer ( )
    protected function _loadRandomCustomer()
    {
        /** @var \Mage_Customer_Model_Resource_Customer_Collection $customers */
        $customers = \Mage::getModel('customer/customer')->getCollection();
        $customers->setPageSize(1);
        $customers->getSelect()->order(new \Zend_Db_Expr('RAND()'));
        /** @var \Mage_Customer_Model_Customer $customer */
        $customer = $customers->getFirstItem();
        return $customer;
    }