mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-17 23:28:20 +00:00
Code clean up.
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Export\Exporter;
|
||||
@@ -27,13 +26,11 @@ use FireflyIII\Models\ExportJob;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class BasicExporter
|
||||
*
|
||||
* @package FireflyIII\Export\Exporter
|
||||
* Class BasicExporter.
|
||||
*/
|
||||
class BasicExporter
|
||||
{
|
||||
/** @var ExportJob */
|
||||
/** @var ExportJob */
|
||||
protected $job;
|
||||
/** @var Collection */
|
||||
private $entries;
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Export\Exporter;
|
||||
@@ -28,13 +27,11 @@ use League\Csv\Writer;
|
||||
use SplFileObject;
|
||||
|
||||
/**
|
||||
* Class CsvExporter
|
||||
*
|
||||
* @package FireflyIII\Export\Exporter
|
||||
* Class CsvExporter.
|
||||
*/
|
||||
class CsvExporter extends BasicExporter implements ExporterInterface
|
||||
{
|
||||
/** @var string */
|
||||
/** @var string */
|
||||
private $fileName;
|
||||
|
||||
/**
|
||||
@@ -69,7 +66,7 @@ class CsvExporter extends BasicExporter implements ExporterInterface
|
||||
// get field names for header row:
|
||||
$first = $this->getEntries()->first();
|
||||
$headers = [];
|
||||
if (!is_null($first)) {
|
||||
if (null !== $first) {
|
||||
$headers = array_keys(get_object_vars($first));
|
||||
}
|
||||
|
||||
@@ -88,7 +85,6 @@ class CsvExporter extends BasicExporter implements ExporterInterface
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private function tempFile()
|
||||
{
|
||||
$this->fileName = $this->job->key . '-records.csv';
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Export\Exporter;
|
||||
@@ -27,9 +26,7 @@ use FireflyIII\Models\ExportJob;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Interface ExporterInterface
|
||||
*
|
||||
* @package FireflyIII\Export\Exporter
|
||||
* Interface ExporterInterface.
|
||||
*/
|
||||
interface ExporterInterface
|
||||
{
|
||||
@@ -50,9 +47,6 @@ interface ExporterInterface
|
||||
|
||||
/**
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
public function setEntries(Collection $entries);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user