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/DateFilter.php 1 location

@@ 160-166 (lines=7) @@
157
     *
158
     * @return bool
159
     */
160
    protected function isDateField(string $property, string $resourceClass): bool
161
    {
162
        $propertyParts = $this->splitPropertyParts($property, $resourceClass);
163
        $metadata = $this->getNestedMetadata($resourceClass, $propertyParts['associations']);
164
165
        return isset(self::DOCTRINE_DATE_TYPES[$metadata->getTypeOfField($propertyParts['field'])]);
166
    }
167
168
    /**
169
     * Gets filter description.

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