mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-22 14:33:11 -06:00
39 lines
693 B
PHP
39 lines
693 B
PHP
<?php
|
|
|
|
namespace FireflyIII\Helpers\Csv\PostProcessing;
|
|
|
|
/**
|
|
* Class Description
|
|
*
|
|
* @package FireflyIII\Helpers\Csv\PostProcessing
|
|
*/
|
|
class Description implements PostProcessorInterface
|
|
{
|
|
|
|
/** @var array */
|
|
protected $data;
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
public function process()
|
|
{
|
|
$this->data['description'] = trim($this->data['description']);
|
|
if (strlen($this->data['description']) == 0) {
|
|
$this->data['description'] = trans('firefly.csv_empty_description');
|
|
}
|
|
|
|
|
|
return $this->data;
|
|
}
|
|
|
|
/**
|
|
* @param array $data
|
|
*/
|
|
public function setData(array $data)
|
|
{
|
|
|
|
$this->data = $data;
|
|
}
|
|
}
|