seregazhuk/php-pinterest-bot

View on GitHub
src/Api/Forms/Form.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace seregazhuk\PinterestBot\Api\Forms;

abstract class Form
{
    /**
     * @return array
     */
    abstract protected function getData();

    /**
     * @return array
     */
    public function toArray()
    {
        return array_filter($this->getData(), function ($item) {
            return !is_null($item);
        });
    }
}