<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

namespace MNM\Spitzner\Block\Magento\Review\Adminhtml\Edit;

/**
 * Adminhtml Review Edit Form
 */
class Form extends \Magento\Review\Block\Adminhtml\Edit\Form
{
    /**
     * Prepare edit review form
     *
     * @return $this
     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
     */
    protected function _prepareForm()
    {
        $return = parent::_prepareForm();

        //set fields to be non required
        $this->getForm()->getElements()->searchById('review_details')->getElements()->searchById('title')->setRequired(false);
        $this->getForm()->getElements()->searchById('review_details')->getElements()->searchById('detail')->setRequired(false);

        return $return;
    }
}
