protected function targetSiteId(ElementInterface $element = null): int
    {
        /** @var Element $element */
        if (Craft::$app->getIsMultiSite() === true && $element !== null) {
            return $element->siteId;
        }

        return Craft::$app->getSites()->currentSite->id;
    }
protected function targetSiteId(ElementInterface $element = null): int
    {
        /** @var Element $element */
        if (Craft::$app->getIsMultiSite() === true && $element !== null) {
            return $element->siteId;
        }

        return Craft::$app->getSites()->currentSite->id;
    }
protected function targetSiteId ( ElementInterface $ element = null ) : int { /** @var Element $element */ if ( Craft :: $ app -> getIsMultiSite ( ) === true && $ element !== null ) { return $ element -> siteId ; } return Craft :: $ app -> getSites ( ) -> currentSite -> id ; }
Returns the site ID that target elements should have.

@param ElementInterface|Element|null $element

@return int
Returns the site ID that target elements should have .