X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FGlobalStack.php;h=b6d4a089ccf105ea2bc06fb27b8118a5205086c2;hb=8671b4f2efb228dc654123b391fd794b23b99d49;hp=9452405b70494c534312ed90bf0eb3cc7e5ff4e3;hpb=1024e1784fb68b8529a77143f5191a60d70837cf;p=civicrm-core.git diff --git a/CRM/Utils/GlobalStack.php b/CRM/Utils/GlobalStack.php index 9452405b70..b6d4a089cc 100644 --- a/CRM/Utils/GlobalStack.php +++ b/CRM/Utils/GlobalStack.php @@ -22,7 +22,7 @@ | GNU Affero General Public License or the licensing of CiviCRM, | | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ -*/ + */ /** * Temporarily change a global variable. @@ -46,7 +46,6 @@ class CRM_Utils_GlobalStack { * We don't have a container or dependency-injection, so use singleton instead * * @var object - * @static */ private static $_singleton = NULL; @@ -77,8 +76,10 @@ class CRM_Utils_GlobalStack { } /** - * @param array $new the new, incoming frame - * @return array frame + * @param array $new + * The new, incoming frame. + * @return array + * frame */ public function createBackup($new) { $frame = array(); @@ -87,7 +88,8 @@ class CRM_Utils_GlobalStack { foreach ($values as $key => $value) { $frame[$globalKey][$key] = CRM_Utils_Array::value($key, $GLOBALS[$globalKey]); } - } else { + } + else { $frame[$globalKey] = CRM_Utils_Array::value($globalKey, $GLOBALS); } } @@ -103,9 +105,11 @@ class CRM_Utils_GlobalStack { foreach ($values as $key => $value) { $GLOBALS[$globalKey][$key] = $value; } - } else { + } + else { $GLOBALS[$globalKey] = $values; } } } + }