The expression \craft\elements\Category::findOne($element); of type craft\base\Element|null|craft\base\Element[] adds the type craft\base\Element[] to the return on line 54 which is incompatible with the return type declared by the interface flipbox\craft\element\li...terface::resolveElement of type craft\base\ElementInterface|null.