<?php
namespace Olegnax\Athlete2\Model\Config\Settings\StockInfo;

use Magento\Framework\Option\ArrayInterface;

class Show implements ArrayInterface
{
	public function toOptionArray() {
		$optionArray = [ ];
		$array		 = $this->toArray();
		foreach ( $array as $key => $value ) {
			$optionArray[] = [ 'value' => $key, 'label' => $value ];
		}

		return $optionArray;
	}

    public function toArray()
    {
        return [
			'low_stock' => __('Show low stock only'),
			'always' => __('Show stock info always'),
        ];
    }
}
