You are here

private function SpiController::checkFilesPresent in Acquia Connector 8

Same name and namespace in other branches
  1. 8.2 src/Controller/SpiController.php \Drupal\acquia_connector\Controller\SpiController::checkFilesPresent()
  2. 3.x src/Controller/SpiController.php \Drupal\acquia_connector\Controller\SpiController::checkFilesPresent()

Check to see if the unneeded release files with Drupal are removed.

Return value

int 1 if they are removed, 0 if they aren't.

1 call to SpiController::checkFilesPresent()
SpiController::get in src/Controller/SpiController.php
Gather site profile information about this site.

File

src/Controller/SpiController.php, line 294

Class

SpiController
SPI Controller class.

Namespace

Drupal\acquia_connector\Controller

Code

private function checkFilesPresent() {
  $files_exist = FALSE;
  $files_to_remove = [
    'CHANGELOG.txt',
    'COPYRIGHT.txt',
    'INSTALL.mysql.txt',
    'INSTALL.pgsql.txt',
    'INSTALL.txt',
    'LICENSE.txt',
    'MAINTAINERS.txt',
    'README.txt',
    'UPGRADE.txt',
    'PRESSFLOW.txt',
    'install.php',
  ];
  foreach ($files_to_remove as $file) {
    $path = DRUPAL_ROOT . DIRECTORY_SEPARATOR . $file;
    if (file_exists($path)) {
      $files_exist = TRUE;
    }
  }
  return $files_exist ? 1 : 0;
}