The \Magento\Swatches\Controller\Adminhtml\Product\Attribute\Plugin\Save beforeDispatch() method can be simplified by returning void instead of it's arguments

This can be simplified to:

/**
 * @param Attribute\Save $subject
 * @param RequestInterface $request
 * @return void
 */
public function beforeDispatch(Attribute\Save $subject, RequestInterface $request)
{
	$data = $request->getPostValue();
	if (isset($data['frontend_input'])) {
		switch ($data['frontend_input']) {
			case 'swatch_visual':
				$data[Swatch::SWATCH_INPUT_TYPE_KEY] = Swatch::SWATCH_INPUT_TYPE_VISUAL;
				$data['frontend_input'] = 'select';
				$request->setPostValue($data);
				break;
			case 'swatch_text':
				$data[Swatch::SWATCH_INPUT_TYPE_KEY] = Swatch::SWATCH_INPUT_TYPE_TEXT;
				$data['use_product_image_for_swatch'] = 0;
				$data['frontend_input'] = 'select';
				$request->setPostValue($data);
				break;
			case 'select':
				$data[Swatch::SWATCH_INPUT_TYPE_KEY] = Swatch::SWATCH_INPUT_TYPE_DROPDOWN;
				$data['frontend_input'] = 'select';
				$request->setPostValue($data);
				break;
		}
	}
}

A trick: a Ā«beforeĀ» plugin can return nothing if it needs not modify any argument