@@ -86,11 +86,6 @@ class PHP_CodeCoverage
8686 */
8787 protected $ processUncoveredFilesFromWhitelist = TRUE ;
8888
89- /**
90- * @var boolean
91- */
92- protected $ promoteGlobals = FALSE ;
93-
9489 /**
9590 * @var mixed
9691 */
@@ -455,19 +450,6 @@ public function setProcessUncoveredFilesFromWhitelist($flag)
455450 $ this ->processUncoveredFilesFromWhitelist = $ flag ;
456451 }
457452
458- /**
459- * @param boolean $flag
460- * @throws InvalidArgumentException
461- */
462- public function setPromoteGlobals ($ flag )
463- {
464- if (!is_bool ($ flag )) {
465- throw new InvalidArgumentException ;
466- }
467-
468- $ this ->promoteGlobals = $ flag ;
469- }
470-
471453 /**
472454 * Filters sourcecode files from PHP_CodeCoverage, PHP_TokenStream,
473455 * Text_Template, and File_Iterator.
@@ -588,35 +570,11 @@ protected function processUncoveredFilesFromWhitelist()
588570 $ this ->filter ->getWhitelist (), $ this ->coveredFiles
589571 );
590572
591- $ newVariables = array ();
592- $ newVariableNames = array ();
593- $ oldVariableNames = array ();
594- $ uncoveredFile = NULL ;
595- $ variableName = NULL ;
596-
597573 foreach ($ uncoveredFiles as $ uncoveredFile ) {
598- if ($ this ->promoteGlobals ) {
599- $ oldVariableNames = array_keys (get_defined_vars ());
600- }
601-
602574 $ this ->driver ->start ();
603575 include_once $ uncoveredFile ;
604576 $ coverage = $ this ->driver ->stop ();
605577
606- if ($ this ->promoteGlobals ) {
607- $ newVariables = get_defined_vars ();
608-
609- $ newVariableNames = array_diff (
610- array_keys ($ newVariables ), $ oldVariableNames
611- );
612-
613- foreach ($ newVariableNames as $ variableName ) {
614- if ($ variableName != 'oldVariableNames ' ) {
615- $ GLOBALS [$ variableName ] = $ newVariables [$ variableName ];
616- }
617- }
618- }
619-
620578 foreach ($ coverage as $ file => $ fileCoverage ) {
621579 if (!isset ($ data [$ file ])) {
622580 foreach (array_keys ($ fileCoverage ) as $ key ) {
0 commit comments