/**
  * Execute the check
  *
  * The regex can become quite large. We try to reduce the size by making the
  * keys unique and splitting the array in several parts.
  *
  * @return void
  */
 public function execute()
 {
     /** @var Tx_Smoothmigration_Service_ClassAliasProvider $classAliasProvider */
     $classAliasProvider = t3lib_div::makeInstance('Tx_Smoothmigration_Service_ClassAliasProvider');
     $legacyClasses = array_keys($classAliasProvider->getLegacyClasses());
     $classAaliases = array_keys($classAliasProvider->getClassAliasMap());
     $classes = array_unique(array_merge($legacyClasses, $classAaliases), SORT_REGULAR);
     $count = count($classes);
     $classChunks = array_chunk($classes, $count / 4);
     if ($this->getExtensionKey()) {
         foreach ($classChunks as $chunk) {
             $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtension($this->getExtensionKey(), '.*\\.(php|inc)$', '(?:^|\\s+|[^\\/\\.a-zA-Z0-9_]+)(' . implode('|', $chunk) . ')(?:[^\\/\\.a-zA-Z0-9_]+)');
             foreach ($locations as $location) {
                 $this->issues[] = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
             }
         }
     } else {
         foreach ($classChunks as $chunk) {
             $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtensions('.*\\.(php|inc)$', '(?:^|\\s+|[^\\/\\.a-zA-Z0-9_]+)(' . implode('|', $chunk) . ')(?:[^\\/\\.a-zA-Z0-9_]+)');
             foreach ($locations as $location) {
                 $this->issues[] = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
             }
         }
     }
 }
    /**
     * @return void
     */
    public function execute()
    {
        $regularExpression = '(?x)
		^\\s*
		(
			(?:require|require_once|include|include_once)
			(?:\\s*\\(?\\s*|\\s+)
			(?:
				(?:\\$BACK_PATH|PATH_t3lib|PATH_tslib|PATH_typo3|PATH_txdam|PATH_site\\s*\\.\\s*TYPO3_mainDir)
				\\s?\\.\\s?
				(?![\'"]init\\.php[\'"])
				|
				t3lib_extMgm::extPath[^\\)]*\\)
			)
			.*\\)?\\s*;?
		)';
        if ($this->getExtensionKey()) {
            $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtension($this->getExtensionKey(), '.*\\.(php|inc)$', $regularExpression);
        } else {
            $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtensions('.*\\.(php|inc)$', $regularExpression);
        }
        foreach ($locations as $location) {
            $this->issues[] = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
        }
    }
 /**
  * Execute the check
  *
  * @return void
  */
 public function execute()
 {
     $list = Tx_Smoothmigration_Utility_ExtensionUtility::getLoadedExtensionsFiltered(TRUE, FALSE, TRUE);
     foreach ($list as $extensionKey) {
         $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtension($extensionKey, '.*[^ext_tables]\\.(php|inc)$', '(addPlugin\\s*\\(\\s*(array\\s*\\([^\\)]*\\)[^\\,]*\\,|\\$[^\\,]*\\,)[^\\)\\,]*\\))');
         foreach ($locations as $location) {
             $this->issues[] = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
         }
     }
 }
 /**
  * @return void
  */
 public function execute()
 {
     if ($this->getExtensionKey()) {
         $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtension($this->getExtensionKey(), '.*\\.(php|inc)$', $this->generateRegularExpression());
     } else {
         $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtensions('.*\\.(php|inc)$', $this->generateRegularExpression(), array('dam', 'dam_catedit', 'dam_cron', 'dam_filelinks', 'dam_index', 'dam_pages', 'dam_ttcontent', 'dam_ttnews', 'extbase_dam'));
     }
     foreach ($locations as $location) {
         $this->issues[] = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
     }
 }
 /**
  * Execute the check
  *
  * @return void
  */
 public function execute()
 {
     if ($this->getExtensionKey()) {
         $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtension($this->getExtensionKey(), '.*\\.(html)$', $this->generateRegularExpression());
     } else {
         $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtensions('.*\\.(html)$', $this->generateRegularExpression());
     }
     foreach ($locations as $location) {
         $this->issues[] = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
     }
 }
 /**
  * @return void
  */
 public function execute()
 {
     $regularExpression = '/[^>\\*#]\\s*(mysql_[a-z_]*)\\s?\\(/';
     if ($this->getExtensionKey()) {
         $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtension($this->getExtensionKey(), '.*\\.(php|inc)$', $regularExpression);
     } else {
         $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtensions('.*\\.(php|inc)$', $regularExpression);
     }
     foreach ($locations as $location) {
         $this->issues[] = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
     }
 }
 /**
  * Execute the check
  *
  * @return void
  */
 public function execute()
 {
     $regularExpression = $this->generateRegularExpression();
     if (trim($regularExpression)) {
         if ($this->getExtensionKey()) {
             $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtension($this->getExtensionKey(), '.*\\.(php|inc)$', $regularExpression);
         } else {
             $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtensions('.*\\.(php|inc)$', $regularExpression);
         }
         foreach ($locations as $location) {
             $issue = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
             $issue->setAdditionalInformation($this->getRepleacabilityReport($location));
             $this->issues[] = $issue;
         }
     }
 }