Code Duplication    Length = 7-7 lines in 3 locations

src/Bridge/Doctrine/Orm/Filter/BooleanFilter.php 1 location

@@ 114-120 (lines=7) @@
111
     *
112
     * @return bool
113
     */
114
    protected function isBooleanField(string $property, string $resourceClass): bool
115
    {
116
        $propertyParts = $this->splitPropertyParts($property, $resourceClass);
117
        $metadata = $this->getNestedMetadata($resourceClass, $propertyParts['associations']);
118
119
        return DBALType::BOOLEAN === $metadata->getTypeOfField($propertyParts['field']);
120
    }
121
}
122

src/Bridge/Doctrine/Orm/Filter/NumericFilter.php 1 location

@@ 138-144 (lines=7) @@
135
     *
136
     * @return bool
137
     */
138
    protected function isNumericField(string $property, string $resourceClass): bool
139
    {
140
        $propertyParts = $this->splitPropertyParts($property, $resourceClass);
141
        $metadata = $this->getNestedMetadata($resourceClass, $propertyParts['associations']);
142
143
        return isset(self::DOCTRINE_NUMERIC_TYPES[$metadata->getTypeOfField($propertyParts['field'])]);
144
    }
145
}
146

src/Bridge/Doctrine/Orm/Filter/DateFilter.php 1 location

@@ 195-201 (lines=7) @@
192
     *
193
     * @return bool
194
     */
195
    protected function isDateField(string $property, string $resourceClass): bool
196
    {
197
        $propertyParts = $this->splitPropertyParts($property, $resourceClass);
198
        $metadata = $this->getNestedMetadata($resourceClass, $propertyParts['associations']);
199
200
        return isset(self::DOCTRINE_DATE_TYPES[$metadata->getTypeOfField($propertyParts['field'])]);
201
    }
202
203
    /**
204
     * Gets filter description.