/** * 2016-04-04 * @param AA|CA|QA|OA $a * @return Customer|Quote|Order|null */ function df_address_owner($a) { return $a instanceof CA ? $a->getCustomer() : ($a instanceof QA ? $a->getQuote() : ($a instanceof OA ? $a->getOrder() : null)); }