PIM-3319: Added abstract class to make code more clean

Refactoring

| Q                    | A
| -------------------- | ---
| Bug fix?             | No
| New feature?         | No
| BC breaks?           | No
| CI currently passes? | Yes
| Tests pass?          | Running
| Scenarios pass?      | Running
| Checkstyle issues?*  | No
| PMD issues?**        | No
| Changelog updated?   | No
| Fixed tickets        | -
| DB schema updated?   | -
| Migration script?    | -
| Doc PR               | -
you ca ntake inspiration here https://github.com/akeneo/pim-community-dev/blob/master/src/Pim/Bundle/CatalogBundle/Doctrine/ORM/Filter/AbstractFilter.php