diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 34006cc..7937a03 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -477,7 +477,7 @@ function conf_path($require_settings = TRUE, $reset = FALSE) {
  */
 function find_conf_path($http_host, $script_name, $require_settings = TRUE) {
   // Determine whether multi-site functionality is enabled.
-  if (!file_exists(DRUPAL_ROOT . '/sites/sites.php')) {
+  if (!is_file(DRUPAL_ROOT . '/sites/sites.php')) {
     return 'sites/default';
   }
 
@@ -489,10 +489,10 @@ function find_conf_path($http_host, $script_name, $require_settings = TRUE) {
   for ($i = count($uri) - 1; $i > 0; $i--) {
     for ($j = count($server); $j > 0; $j--) {
       $dir = implode('.', array_slice($server, -$j)) . implode('.', array_slice($uri, 0, $i));
-      if (isset($sites[$dir]) && file_exists(DRUPAL_ROOT . '/sites/' . $sites[$dir])) {
+      if (isset($sites[$dir]) && is_file(DRUPAL_ROOT . '/sites/' . $sites[$dir])) {
         $dir = $sites[$dir];
       }
-      if (file_exists(DRUPAL_ROOT . '/sites/' . $dir . '/settings.php') || (!$require_settings && file_exists(DRUPAL_ROOT . '/sites/' . $dir))) {
+      if (is_file(DRUPAL_ROOT . '/sites/' . $dir . '/settings.php') || (!$require_settings && is_file(DRUPAL_ROOT . '/sites/' . $dir))) {
         return "sites/$dir";
       }
     }
@@ -880,7 +880,7 @@ function drupal_get_filename($type, $name, $filename = NULL) {
     $files[$type] = array();
   }
 
-  if (!empty($filename) && file_exists($filename)) {
+  if (!empty($filename) && is_file($filename)) {
     $files[$type][$name] = $filename;
   }
   elseif (isset($files[$type][$name])) {
@@ -893,7 +893,7 @@ function drupal_get_filename($type, $name, $filename = NULL) {
     if (($container = drupal_container()) && $container->has('keyvalue') && function_exists('db_query')) {
       try {
         $file_list = state()->get('system.' . $type . '.files');
-        if ($file_list && isset($file_list[$name]) && file_exists(DRUPAL_ROOT . '/' . $file_list[$name])) {
+        if ($file_list && isset($file_list[$name]) && is_file(DRUPAL_ROOT . '/' . $file_list[$name])) {
           $files[$type][$name] = $file_list[$name];
         }
       }
diff --git a/core/includes/common.inc b/core/includes/common.inc
index bd263ec..a2ea157 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -3101,7 +3101,7 @@ function drupal_build_css_cache($css) {
     $uri = $map[$key];
   }
 
-  if (empty($uri) || !file_exists($uri)) {
+  if (empty($uri) || !is_file($uri)) {
     // Build aggregate CSS file.
     foreach ($css as $stylesheet) {
       // Only 'file' stylesheets can be aggregated.
@@ -3139,7 +3139,7 @@ function drupal_build_css_cache($css) {
     $uri = $csspath . '/' . $filename;
     // Create the CSS file.
     file_prepare_directory($csspath, FILE_CREATE_DIRECTORY);
-    if (!file_exists($uri) && !file_unmanaged_save_data($data, $uri, FILE_EXISTS_REPLACE)) {
+    if (!is_file($uri) && !file_unmanaged_save_data($data, $uri, FILE_EXISTS_REPLACE)) {
       return FALSE;
     }
     // If CSS gzip compression is enabled and the zlib extension is available
@@ -3151,7 +3151,7 @@ function drupal_build_css_cache($css) {
     // aren't working can set css.gzip to FALSE in order to skip
     // generating a file that won't be used.
     if (config('system.performance')->get('css.gzip') && extension_loaded('zlib')) {
-      if (!file_exists($uri . '.gz') && !file_unmanaged_save_data(gzencode($data, 9, FORCE_GZIP), $uri . '.gz', FILE_EXISTS_REPLACE)) {
+      if (!is_file($uri . '.gz') && !file_unmanaged_save_data(gzencode($data, 9, FORCE_GZIP), $uri . '.gz', FILE_EXISTS_REPLACE)) {
         return FALSE;
       }
     }
@@ -4635,7 +4635,7 @@ function drupal_build_js_cache($files) {
     $uri = $map[$key];
   }
 
-  if (empty($uri) || !file_exists($uri)) {
+  if (empty($uri) || !is_file($uri)) {
     // Build aggregate JS file.
     foreach ($files as $info) {
       if ($info['preprocess']) {
@@ -4651,7 +4651,7 @@ function drupal_build_js_cache($files) {
     $uri = $jspath . '/' . $filename;
     // Create the JS file.
     file_prepare_directory($jspath, FILE_CREATE_DIRECTORY);
-    if (!file_exists($uri) && !file_unmanaged_save_data($contents, $uri, FILE_EXISTS_REPLACE)) {
+    if (!is_file($uri) && !file_unmanaged_save_data($contents, $uri, FILE_EXISTS_REPLACE)) {
       return FALSE;
     }
     // If JS gzip compression is enabled and the zlib extension is available
@@ -4663,7 +4663,7 @@ function drupal_build_js_cache($files) {
     // aren't working can set js.gzip to FALSE in order to skip
     // generating a file that won't be used.
     if (config('system.performance')->get('js.gzip') && extension_loaded('zlib')) {
-      if (!file_exists($uri . '.gz') && !file_unmanaged_save_data(gzencode($contents, 9, FORCE_GZIP), $uri . '.gz', FILE_EXISTS_REPLACE)) {
+      if (!is_file($uri . '.gz') && !file_unmanaged_save_data(gzencode($contents, 9, FORCE_GZIP), $uri . '.gz', FILE_EXISTS_REPLACE)) {
         return FALSE;
       }
     }
@@ -6121,7 +6121,7 @@ function drupal_parse_info_file($filename) {
   $info = &drupal_static(__FUNCTION__, array());
 
   if (!isset($info[$filename])) {
-    if (!file_exists($filename)) {
+    if (!is_file($filename)) {
       $info[$filename] = array();
     }
     else {
diff --git a/core/includes/file.inc b/core/includes/file.inc
index c66a2e0..dd05819 100644
--- a/core/includes/file.inc
+++ b/core/includes/file.inc
@@ -545,7 +545,7 @@ function file_save_htaccess($directory, $private = TRUE) {
   }
   $htaccess_path =  $directory . '/.htaccess';
 
-  if (file_exists($htaccess_path)) {
+  if (is_file($htaccess_path)) {
     // Short circuit if the .htaccess file already exists.
     return;
   }
@@ -630,7 +630,7 @@ function file_unmanaged_copy($source, $destination = NULL, $replace = FILE_EXIST
   $original_destination = $destination;
 
   // Assert that the source file actually exists.
-  if (!file_exists($source)) {
+  if (!is_file($source)) {
     // @todo Replace drupal_set_message() calls with exceptions instead.
     drupal_set_message(t('The specified file %file could not be copied because no file by that name exists. Please check that you supplied the correct filename.', array('%file' => $original_source)), 'error');
     if (($realpath = drupal_realpath($original_source)) !== FALSE) {
@@ -723,7 +723,7 @@ function file_build_uri($path) {
  *   and FILE_EXISTS_ERROR is specified.
  */
 function file_destination($destination, $replace) {
-  if (file_exists($destination)) {
+  if (is_file($destination)) {
     switch ($replace) {
       case FILE_EXISTS_REPLACE:
         // Do nothing here, we want to overwrite the existing file.
@@ -886,7 +886,7 @@ function file_create_filename($basename, $directory) {
 
   $destination = $directory . $separator . $basename;
 
-  if (file_exists($destination)) {
+  if (is_file($destination)) {
     // Destination file already exists, generate an alternative.
     $pos = strrpos($basename, '.');
     if ($pos !== FALSE) {
@@ -901,7 +901,7 @@ function file_create_filename($basename, $directory) {
     $counter = 0;
     do {
       $destination = $directory . $separator . $name . '_' . $counter++ . $ext;
-    } while (file_exists($destination));
+    } while (is_file($destination));
   }
 
   return $destination;
@@ -967,7 +967,7 @@ function file_unmanaged_delete($path) {
   }
   // Return TRUE for non-existent file, but log that nothing was actually
   // deleted, as the current state is the intended result.
-  if (!file_exists($path)) {
+  if (!is_file($path)) {
     watchdog('file', 'The file %path was not deleted because it does not exist.', array('%path' => $path), WATCHDOG_NOTICE);
     return TRUE;
   }
@@ -1317,7 +1317,7 @@ function file_unmanaged_save_data($data, $destination = NULL, $replace = FILE_EX
 function file_transfer($uri, $headers) {
   return new StreamedResponse(function() use ($uri) {
     // Transfer file in 1024 byte chunks to save memory usage.
-    if (file_exists($uri) && $fd = fopen($uri, 'rb')) {
+    if (is_file($uri) && $fd = fopen($uri, 'rb')) {
       while (!feof($fd)) {
         print fread($fd, 1024);
       }
@@ -1345,7 +1345,7 @@ function file_download() {
   $scheme = array_shift($args);
   $target = implode('/', $args);
   $uri = $scheme . '://' . $target;
-  if (file_stream_wrapper_valid_scheme($scheme) && file_exists($uri)) {
+  if (file_stream_wrapper_valid_scheme($scheme) && is_file($uri)) {
     // Let other modules provide headers and controls access to the file.
     $headers = module_invoke_all('file_download', $uri);
     foreach ($headers as $result) {
diff --git a/core/includes/form.inc b/core/includes/form.inc
index 0ef70f8..ec2016e 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -517,7 +517,7 @@ function form_get_cache($form_build_id, &$form_state) {
             $file += array('type' => 'inc', 'name' => $file['module']);
             module_load_include($file['type'], $file['module'], $file['name']);
           }
-          elseif (file_exists($file)) {
+          elseif (is_file($file)) {
             require_once DRUPAL_ROOT . '/' . $file;
           }
         }
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index 5223cc5..c0f6834 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -674,7 +674,7 @@ function install_tasks($install_state) {
     // hook_install_tasks() is invoked (e.g. batch processing).
     $profile = $install_state['parameters']['profile'];
     $profile_install_file = dirname($install_state['profiles'][$profile]->uri) . '/' . $profile . '.install';
-    if (file_exists($profile_install_file)) {
+    if (is_file($profile_install_file)) {
       include_once $profile_install_file;
     }
     $function = $install_state['parameters']['profile'] . '_install_tasks';
@@ -703,7 +703,7 @@ function install_tasks($install_state) {
   if (!empty($install_state['parameters']['profile'])) {
     $profile = $install_state['parameters']['profile'];
     $profile_file = $install_state['profiles'][$profile]->uri;
-    if (file_exists($profile_file)) {
+    if (is_file($profile_file)) {
       include_once $profile_file;
       $function = $install_state['parameters']['profile'] . '_install_tasks_alter';
       if (function_exists($function)) {
@@ -1480,7 +1480,7 @@ function install_already_done_error() {
 function install_load_profile(&$install_state) {
   $profile = $install_state['parameters']['profile'];
   $profile_file = $install_state['profiles'][$profile]->uri;
-  if (file_exists($profile_file)) {
+  if (is_file($profile_file)) {
     include_once $profile_file;
     $install_state['profile_info'] = install_profile_info($install_state['parameters']['profile'], $install_state['parameters']['langcode']);
   }
diff --git a/core/includes/install.inc b/core/includes/install.inc
index aada754..5400ce0 100644
--- a/core/includes/install.inc
+++ b/core/includes/install.inc
@@ -135,7 +135,7 @@ function drupal_get_database_types() {
   // without modifying the installer.
   require_once DRUPAL_ROOT . '/core/includes/database.inc';
   foreach (file_scan_directory(DRUPAL_ROOT . '/core/lib/Drupal/Core/Database/Driver', '/^[a-z]*$/i', array('recurse' => FALSE)) as $file) {
-    if (file_exists($file->uri . '/Install/Tasks.php')) {
+    if (is_file($file->uri . '/Install/Tasks.php')) {
       $drivers[$file->filename] = $file->uri;
     }
   }
@@ -359,7 +359,7 @@ function drupal_verify_profile($install_state) {
   $profile = $install_state['parameters']['profile'];
   $profile_file = $install_state['profiles'][$profile]->uri;
 
-  if (!isset($profile) || !file_exists($profile_file)) {
+  if (!isset($profile) || !is_file($profile_file)) {
     throw new Exception(install_no_profile_error());
   }
   $info = $install_state['profile_info'];
@@ -448,17 +448,25 @@ function drupal_install_system() {
  *   TRUE on success or FALSE on failure. A message is set for the latter.
  */
 function drupal_verify_install_file($file, $mask = NULL, $type = 'file') {
+  // If type is not set, we cannot try to set the check function.
+  if (!isset($type)) {
+    return FALSE;
+  }
+  // Use is_file(), is_dir() or is_link() according to the type of file.
+  $check = 'is_' . $type;
+  // If it is not a type we can check for, return.
+  if (!function_exists($check)) {
+    return FALSE;
+  }
+
   $return = TRUE;
   // Check for files that shouldn't be there.
-  if (isset($mask) && ($mask & FILE_NOT_EXIST) && file_exists($file)) {
+  if (isset($mask) && ($mask & FILE_NOT_EXIST) && $check($file)) {
     return FALSE;
   }
   // Verify that the file is the type of file it is supposed to be.
-  if (isset($type) && file_exists($file)) {
-    $check = 'is_' . $type;
-    if (!function_exists($check) || !$check($file)) {
-      $return = FALSE;
-    }
+  if (!$check($file)) {
+    return FALSE;
   }
 
   // Verify file permissions.
@@ -468,11 +476,11 @@ function drupal_verify_install_file($file, $mask = NULL, $type = 'file') {
       if ($mask & $current_mask) {
         switch ($current_mask) {
           case FILE_EXIST:
-            if (!file_exists($file)) {
+            if (!$check($file)) {
               if ($type == 'dir') {
                 drupal_install_mkdir($file, $mask);
               }
-              if (!file_exists($file)) {
+              if (!$check($file)) {
                 $return = FALSE;
               }
             }
@@ -577,6 +585,9 @@ function drupal_install_mkdir($file, $mask, $message = TRUE) {
  *  TRUE/FALSE whether or not we were able to fix the file's permissions.
  */
 function drupal_install_fix_file($file, $mask, $message = TRUE) {
+  // Use file_exists() since with will return true also for directories and
+  // these checks are should be done for any type: file, dir, link.
+
   // If $file does not exist, fileperms() issues a PHP warning.
   if (!file_exists($file)) {
     return FALSE;
@@ -790,7 +801,7 @@ function drupal_check_profile($profile, array $install_state) {
 
   $profile_file = $install_state['profiles'][$profile]->uri;
 
-  if (!isset($profile) || !file_exists($profile_file)) {
+  if (!isset($profile) || !is_file($profile_file)) {
     throw new Exception(install_no_profile_error());
   }
 
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 35b9cd3..80a8561 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -524,7 +524,7 @@ function _theme_process_registry(&$cache, $name, $type, $theme, $path) {
             if (isset($info['path'])) {
               $template_file = $info['path'] . '/' . $template_file;
             }
-            if (file_exists($template_file)) {
+            if (is_file($template_file)) {
               $result[$hook]['template_file'] = $template_file;
               $result[$hook]['engine'] = $engine;
               break;
@@ -1454,7 +1454,7 @@ function theme_get_setting($setting_name, $theme = NULL) {
       // Generate the path to the favicon.
       if ($cache[$theme]['toggle_favicon']) {
         if ($cache[$theme]['default_favicon']) {
-          if (file_exists($favicon = dirname($theme_object->filename) . '/favicon.ico')) {
+          if (is_file($favicon = dirname($theme_object->filename) . '/favicon.ico')) {
             $cache[$theme]['favicon'] = file_create_url($favicon);
           }
           else {
diff --git a/core/lib/Drupal/Component/Archiver/ArchiveTar.php b/core/lib/Drupal/Component/Archiver/ArchiveTar.php
index 180422a..012d632 100644
--- a/core/lib/Drupal/Component/Archiver/ArchiveTar.php
+++ b/core/lib/Drupal/Component/Archiver/ArchiveTar.php
@@ -112,7 +112,7 @@ function __construct($p_tarname, $p_compress = null)
         $this->_compress = false;
         $this->_compress_type = 'none';
         if (($p_compress === null) || ($p_compress == '')) {
-            if (@file_exists($p_tarname)) {
+            if (@is_file($p_tarname)) {
                 if ($fp = @fopen($p_tarname, "rb")) {
                     // look for gzip magic cookie
                     $data = fread($fp, 2);
@@ -926,7 +926,7 @@ function _addList($p_list, $p_add_dir, $p_remove_dir)
         if ($v_filename == '')
             continue;
 
-        if (!file_exists($v_filename)) {
+        if (!is_file($v_filename)) {
             $this->_warning("File '$v_filename' does not exist");
             continue;
         }
@@ -1562,7 +1562,7 @@ function _extractList($p_path, &$p_list_detail, $p_mode,
           else
             $v_header['filename'] = $p_path.'/'.$v_header['filename'];
         }
-        if (file_exists($v_header['filename'])) {
+        if (is_file($v_header['filename'])) {
           if (   (@is_dir($v_header['filename']))
 		      && ($v_header['typeflag'] == '')) {
             $this->_error('File '.$v_header['filename']
@@ -1596,7 +1596,7 @@ function _extractList($p_path, &$p_list_detail, $p_mode,
 
         if ($v_extract_file) {
           if ($v_header['typeflag'] == "5") {
-            if (!@file_exists($v_header['filename'])) {
+            if (!@is_file($v_header['filename'])) {
                 // Drupal integration.
                 // Changed the code to use drupal_mkdir() instead of mkdir().
                 if (!@drupal_mkdir($v_header['filename'], 0777)) {
@@ -1606,7 +1606,7 @@ function _extractList($p_path, &$p_list_detail, $p_mode,
                 }
             }
           } elseif ($v_header['typeflag'] == "2") {
-              if (@file_exists($v_header['filename'])) {
+              if (@is_file($v_header['filename'])) {
                   @drupal_unlink($v_header['filename']);
               }
               if (!@symlink($v_header['link'], $v_header['filename'])) {
diff --git a/core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php b/core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php
index bfb7a2a..0796099 100644
--- a/core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php
+++ b/core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php
@@ -37,7 +37,7 @@ public function __construct(array $configuration) {
    * Implements Drupal\Component\PhpStorage\PhpStorageInterface::exists().
    */
   public function exists($name) {
-    return file_exists($this->getFullPath($name));
+    return is_file($this->getFullPath($name));
   }
 
   /**
diff --git a/core/lib/Drupal/Component/PhpStorage/FileStorage.php b/core/lib/Drupal/Component/PhpStorage/FileStorage.php
index b8c3aad..581a200 100644
--- a/core/lib/Drupal/Component/PhpStorage/FileStorage.php
+++ b/core/lib/Drupal/Component/PhpStorage/FileStorage.php
@@ -36,7 +36,7 @@ public function __construct(array $configuration) {
    * Implements Drupal\Component\PhpStorage\PhpStorageInterface::exists().
    */
   public function exists($name) {
-    return file_exists($this->getFullPath($name));
+    return is_file($this->getFullPath($name));
   }
 
   /**
@@ -62,7 +62,7 @@ public function save($name, $code) {
    */
   public function delete($name) {
     $path = $this->getFullPath($name);
-    if (file_exists($path)) {
+    if (is_file($path)) {
       return $this->unlink($path);
     }
     return FALSE;
@@ -104,7 +104,7 @@ public function deleteAll() {
    *   error.
    */
   protected function unlink($path) {
-    if (file_exists($path)) {
+    if (is_file($path)) {
       // Ensure the file / folder is writable.
       chmod($path, 0700);
       if (is_dir($path)) {
diff --git a/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php b/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php
index 4d564fb..acff092 100644
--- a/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php
+++ b/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php
@@ -88,7 +88,7 @@ public function save($name, $data) {
     // mtime remains the same (unless the clock ticks to the next second during
     // the rename, in which case we'll try again).
     $directory = $this->getContainingDirectoryFullPath($name);
-    if (file_exists($directory)) {
+    if (is_file($directory)) {
       $this->cleanDirectory($directory);
       touch($directory);
     }
@@ -135,7 +135,7 @@ public function save($name, $data) {
    */
   public function delete($name) {
     $directory = dirname($this->getFullPath($name));
-    if (file_exists($directory)) {
+    if (is_file($directory)) {
       $this->cleanDirectory($directory);
       return rmdir($directory);
     }
@@ -146,12 +146,12 @@ public function delete($name) {
    * Ensures the root directory exists and has correct permissions.
    */
   protected function ensureDirectory() {
-    if (!file_exists($this->directory)) {
+    if (!is_file($this->directory)) {
       mkdir($this->directory, 0700, TRUE);
     }
     chmod($this->directory, 0700);
     $htaccess_path =  $this->directory . '/.htaccess';
-    if (!file_exists($htaccess_path) && file_put_contents($htaccess_path, self::HTACCESS)) {
+    if (!is_file($htaccess_path) && file_put_contents($htaccess_path, self::HTACCESS)) {
       @chmod($htaccess_path, 0444);
     }
   }
@@ -198,7 +198,7 @@ protected function getFullPath($name, &$directory = NULL, &$directory_mtime = NU
       $directory = $this->getContainingDirectoryFullPath($name);
     }
     if (!isset($directory_mtime)) {
-      $directory_mtime = file_exists($directory) ? filemtime($directory) : 0;
+      $directory_mtime = is_file($directory) ? filemtime($directory) : 0;
     }
     return $directory . '/' . hash_hmac('sha256', $name, $this->secret . $directory_mtime) . '.php';
   }
diff --git a/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php b/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php
index b9dd5b0..4c9bf0a 100644
--- a/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php
+++ b/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php
@@ -63,6 +63,6 @@ public function exists($name) {
    */
   protected function checkFile($name) {
     $filename = $this->getFullPath($name, $directory, $directory_mtime);
-    return file_exists($filename) && filemtime($filename) <= $directory_mtime ? $filename : FALSE;
+    return is_file($filename) && filemtime($filename) <= $directory_mtime ? $filename : FALSE;
   }
 }
diff --git a/core/lib/Drupal/Component/Plugin/Discovery/AnnotatedClassDiscovery.php b/core/lib/Drupal/Component/Plugin/Discovery/AnnotatedClassDiscovery.php
index 7e31231..e5bec64 100644
--- a/core/lib/Drupal/Component/Plugin/Discovery/AnnotatedClassDiscovery.php
+++ b/core/lib/Drupal/Component/Plugin/Discovery/AnnotatedClassDiscovery.php
@@ -76,7 +76,7 @@ public function getDefinitions() {
     foreach ($this->getPluginNamespaces() as $namespace => $dirs) {
       foreach ($dirs as $dir) {
         $dir .= DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $namespace);
-        if (file_exists($dir)) {
+        if (is_file($dir)) {
           foreach (new DirectoryIterator($dir) as $fileinfo) {
             // @todo Once core requires 5.3.6, use $fileinfo->getExtension().
             if (pathinfo($fileinfo->getFilename(), PATHINFO_EXTENSION) == 'php') {
diff --git a/core/lib/Drupal/Core/Config/FileStorage.php b/core/lib/Drupal/Core/Config/FileStorage.php
index 6422e9d..180dc50 100644
--- a/core/lib/Drupal/Core/Config/FileStorage.php
+++ b/core/lib/Drupal/Core/Config/FileStorage.php
@@ -70,7 +70,7 @@ public static function getFileExtension() {
    * Implements Drupal\Core\Config\StorageInterface::exists().
    */
   public function exists($name) {
-    return file_exists($this->getFilePath($name));
+    return is_file($this->getFilePath($name));
   }
 
   /**
@@ -109,7 +109,7 @@ public function write($name, array $data) {
    */
   public function delete($name) {
     if (!$this->exists($name)) {
-      if (!file_exists($this->directory)) {
+      if (!is_file($this->directory)) {
         throw new StorageException($this->directory . '/ not found.');
       }
       return FALSE;
@@ -186,7 +186,7 @@ public function decode($raw) {
   public function listAll($prefix = '') {
     // glob() silently ignores the error of a non-existing search directory,
     // even with the GLOB_ERR flag.
-    if (!file_exists($this->directory)) {
+    if (!is_file($this->directory)) {
       throw new StorageException($this->directory . '/ not found.');
     }
     $extension = '.' . static::getFileExtension();
diff --git a/core/lib/Drupal/Core/Config/InstallStorage.php b/core/lib/Drupal/Core/Config/InstallStorage.php
index 5a7044b..a0ac46e 100644
--- a/core/lib/Drupal/Core/Config/InstallStorage.php
+++ b/core/lib/Drupal/Core/Config/InstallStorage.php
@@ -45,7 +45,7 @@ public function getFilePath($name) {
     foreach (array('profile', 'module', 'theme') as $type) {
       if ($path = drupal_get_path($type, $owner)) {
         $file = $path . '/config/' . $name . '.' . static::getFileExtension();
-        if (file_exists($file)) {
+        if (is_file($file)) {
           return $file;
         }
       }
diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Insert.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Insert.php
index e584943..c242042 100644
--- a/core/lib/Drupal/Core/Database/Driver/sqlite/Insert.php
+++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Insert.php
@@ -46,4 +46,4 @@ public function __toString() {
     return $comments . 'INSERT INTO {' . $this->table . '} (' . implode(', ', $this->insertFields) . ') VALUES (' . implode(', ', $placeholders) . ')';
   }
 
-}
\ No newline at end of file
+}
diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Select.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Select.php
index 5403611..105af86 100644
--- a/core/lib/Drupal/Core/Database/Driver/sqlite/Select.php
+++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Select.php
@@ -14,4 +14,4 @@ public function forUpdate($set = TRUE) {
     // SQLite does not support FOR UPDATE so nothing to do.
     return $this;
   }
-}
\ No newline at end of file
+}
diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Truncate.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Truncate.php
index bc63540..d06d27e 100644
--- a/core/lib/Drupal/Core/Database/Driver/sqlite/Truncate.php
+++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Truncate.php
@@ -22,4 +22,4 @@ public function __toString() {
 
     return $comments . 'DELETE FROM {' . $this->connection->escapeTable($this->table) . '} ';
   }
-}
\ No newline at end of file
+}
diff --git a/core/lib/Drupal/Core/Entity/Field/FieldItemBase.php b/core/lib/Drupal/Core/Entity/Field/FieldItemBase.php
index a1fdc6b..6413f62 100644
--- a/core/lib/Drupal/Core/Entity/Field/FieldItemBase.php
+++ b/core/lib/Drupal/Core/Entity/Field/FieldItemBase.php
@@ -239,4 +239,4 @@ public function __clone() {
       }
     }
   }
-}
\ No newline at end of file
+}
diff --git a/core/lib/Drupal/Core/Routing/RouteBuilder.php b/core/lib/Drupal/Core/Routing/RouteBuilder.php
index 6f7a86e..80e3bcd 100644
--- a/core/lib/Drupal/Core/Routing/RouteBuilder.php
+++ b/core/lib/Drupal/Core/Routing/RouteBuilder.php
@@ -81,7 +81,7 @@ public function rebuild() {
     foreach (module_list() as $module) {
       $collection = new RouteCollection();
       $routing_file = DRUPAL_ROOT . '/' . drupal_get_path('module', $module) . '/' . $module . '.routing.yml';
-      if (file_exists($routing_file)) {
+      if (is_file($routing_file)) {
         $routes = $parser->parse(file_get_contents($routing_file));
         if (!empty($routes)) {
           foreach ($routes as $name => $route_info) {
diff --git a/core/lib/Drupal/Core/StreamWrapper/LocalStream.php b/core/lib/Drupal/Core/StreamWrapper/LocalStream.php
index 24b8938..1eba192 100644
--- a/core/lib/Drupal/Core/StreamWrapper/LocalStream.php
+++ b/core/lib/Drupal/Core/StreamWrapper/LocalStream.php
@@ -474,7 +474,7 @@ public function url_stat($uri, $flags) {
     $path = $this->getLocalPath();
     // Suppress warnings if requested or if the file or directory does not
     // exist. This is consistent with PHP's plain filesystem stream wrapper.
-    if ($flags & STREAM_URL_STAT_QUIET || !file_exists($path)) {
+    if ($flags & STREAM_URL_STAT_QUIET || !is_file($path)) {
       return @stat($path);
     }
     else {
diff --git a/core/lib/Drupal/Core/SystemListing.php b/core/lib/Drupal/Core/SystemListing.php
index 6390f2b..5899987 100644
--- a/core/lib/Drupal/Core/SystemListing.php
+++ b/core/lib/Drupal/Core/SystemListing.php
@@ -101,7 +101,7 @@ function scan($mask, $directory, $key = 'name') {
     $searchdir[] = $directory;
     $searchdir[] = 'sites/all/' . $directory;
 
-    if (file_exists("$config/$directory")) {
+    if (is_file("$config/$directory")) {
       $searchdir[] = "$config/$directory";
     }
     // @todo Find a way to skip ./config directories (but not modules/config).
diff --git a/core/lib/Drupal/Core/SystemListingInfo.php b/core/lib/Drupal/Core/SystemListingInfo.php
index 8d45e1d..5a2718d 100644
--- a/core/lib/Drupal/Core/SystemListingInfo.php
+++ b/core/lib/Drupal/Core/SystemListingInfo.php
@@ -54,7 +54,7 @@ protected function process(array $files, array $files_to_add) {
     foreach (array_intersect_key($files_to_add, $files) as $file_key => $file) {
       // If it has no info file, then we just behave liberally and accept the
       // new resource on the list for merging.
-      if (file_exists($info_file = dirname($file->uri) . '/' . $file->name . '.info')) {
+      if (is_file($info_file = dirname($file->uri) . '/' . $file->name . '.info')) {
         // Get the .info file for the module or theme this file belongs to.
         $info = drupal_parse_info_file($info_file);
 
diff --git a/core/modules/color/color.module b/core/modules/color/color.module
index 87d0a37..c267a6c 100644
--- a/core/modules/color/color.module
+++ b/core/modules/color/color.module
@@ -117,7 +117,7 @@ function color_get_info($theme) {
 
   $path = drupal_get_path('theme', $theme);
   $file = DRUPAL_ROOT . '/' . $path . '/color/color.inc';
-  if ($path && file_exists($file)) {
+  if ($path && is_file($file)) {
     include $file;
     $theme_info[$theme] = $info;
     return $info;
@@ -384,11 +384,11 @@ function color_scheme_form_submit($form, &$form_state) {
   foreach ($info['css'] as $stylesheet) {
     // Build a temporary array with LTR and RTL files.
     $files = array();
-    if (file_exists($paths['source'] . $stylesheet)) {
+    if (is_file($paths['source'] . $stylesheet)) {
       $files[] = $stylesheet;
 
       $rtl_file = str_replace('.css', '-rtl.css', $stylesheet);
-      if (file_exists($paths['source'] . $rtl_file)) {
+      if (is_file($paths['source'] . $rtl_file)) {
         $files[] = $rtl_file;
       }
     }
diff --git a/core/modules/file/file.module b/core/modules/file/file.module
index 5f56a9f..f9f3b2d 100644
--- a/core/modules/file/file.module
+++ b/core/modules/file/file.module
@@ -706,7 +706,7 @@ function file_cron() {
     if ($file = file_load($row->fid)) {
       $references = file_usage()->listUsage($file);
       if (empty($references)) {
-        if (file_exists($file->uri)) {
+        if (is_file($file->uri)) {
           $file->delete();
         }
         else {
@@ -1317,14 +1317,14 @@ function file_icon_path(File $file, $icon_directory = NULL) {
   // If there's an icon matching the exact mimetype, go for it.
   $dashed_mime = strtr($file->filemime, array('/' => '-'));
   $icon_path = $icon_directory . '/' . $dashed_mime . '.png';
-  if (file_exists($icon_path)) {
+  if (is_file($icon_path)) {
     return $icon_path;
   }
 
   // For a few mimetypes, we can "manually" map to a generic icon.
   $generic_mime = (string) file_icon_map($file);
   $icon_path = $icon_directory . '/' . $generic_mime . '.png';
-  if ($generic_mime && file_exists($icon_path)) {
+  if ($generic_mime && is_file($icon_path)) {
     return $icon_path;
   }
 
@@ -1332,7 +1332,7 @@ function file_icon_path(File $file, $icon_directory = NULL) {
   foreach (array('audio', 'image', 'text', 'video') as $category) {
     if (strpos($file->filemime, $category . '/') === 0) {
       $icon_path = $icon_directory . '/' . $category . '-x-generic.png';
-      if (file_exists($icon_path)) {
+      if (is_file($icon_path)) {
         return $icon_path;
       }
     }
@@ -1340,7 +1340,7 @@ function file_icon_path(File $file, $icon_directory = NULL) {
 
   // Try application-octet-stream as last fallback.
   $icon_path = $icon_directory . '/application-octet-stream.png';
-  if (file_exists($icon_path)) {
+  if (is_file($icon_path)) {
     return $icon_path;
   }
 
diff --git a/core/modules/file/lib/Drupal/file/Tests/CopyTest.php b/core/modules/file/lib/Drupal/file/Tests/CopyTest.php
index 7f20c9f..991e1d0 100644
--- a/core/modules/file/lib/Drupal/file/Tests/CopyTest.php
+++ b/core/modules/file/lib/Drupal/file/Tests/CopyTest.php
@@ -40,8 +40,8 @@ function testNormal() {
 
     $this->assertDifferentFile($source, $result);
     $this->assertEqual($result->uri, $desired_uri, t('The copied file entity has the desired filepath.'));
-    $this->assertTrue(file_exists($source->uri), t('The original file still exists.'));
-    $this->assertTrue(file_exists($result->uri), t('The copied file exists.'));
+    $this->assertTrue(is_file($source->uri), t('The original file still exists.'));
+    $this->assertTrue(is_file($result->uri), t('The copied file exists.'));
 
     // Reload the file from the database and check that the changes were
     // actually saved.
diff --git a/core/modules/file/lib/Drupal/file/Tests/DeleteTest.php b/core/modules/file/lib/Drupal/file/Tests/DeleteTest.php
index 6adafdb..ece69f1 100644
--- a/core/modules/file/lib/Drupal/file/Tests/DeleteTest.php
+++ b/core/modules/file/lib/Drupal/file/Tests/DeleteTest.php
@@ -29,7 +29,7 @@ function testUnused() {
     $this->assertTrue(is_file($file->uri), t('File exists.'));
     $file->delete();
     $this->assertFileHooksCalled(array('delete'));
-    $this->assertFalse(file_exists($file->uri), t('Test file has actually been deleted.'));
+    $this->assertFalse(is_file($file->uri), t('Test file has actually been deleted.'));
     $this->assertFalse(file_load($file->fid), t('File was removed from the database.'));
   }
 
@@ -44,7 +44,7 @@ function testInUse() {
     file_usage()->delete($file, 'testing', 'test', 1);
     $usage = file_usage()->listUsage($file);
     $this->assertEqual($usage['testing']['test'], array(1 => 1), t('Test file is still in use.'));
-    $this->assertTrue(file_exists($file->uri), t('File still exists on the disk.'));
+    $this->assertTrue(is_file($file->uri), t('File still exists on the disk.'));
     $this->assertTrue(file_load($file->fid), t('File still exists in the database.'));
 
     // Clear out the call to hook_file_load().
@@ -54,7 +54,7 @@ function testInUse() {
     $usage = file_usage()->listUsage($file);
     $this->assertFileHooksCalled(array('load', 'update'));
     $this->assertTrue(empty($usage), t('File usage data was removed.'));
-    $this->assertTrue(file_exists($file->uri), 'File still exists on the disk.');
+    $this->assertTrue(is_file($file->uri), 'File still exists on the disk.');
     $file = file_load($file->fid);
     $this->assertTrue($file, 'File still exists in the database.');
     $this->assertEqual($file->status, 0, 'File is temporary.');
@@ -72,7 +72,7 @@ function testInUse() {
 
     // system_cron() loads
     $this->assertFileHooksCalled(array('load', 'delete'));
-    $this->assertFalse(file_exists($file->uri), t('File has been deleted after its last usage was removed.'));
+    $this->assertFalse(is_file($file->uri), t('File has been deleted after its last usage was removed.'));
     $this->assertFalse(file_load($file->fid), t('File was removed from the database.'));
   }
 }
diff --git a/core/modules/file/lib/Drupal/file/Tests/MoveTest.php b/core/modules/file/lib/Drupal/file/Tests/MoveTest.php
index 15868b1..187ca7e 100644
--- a/core/modules/file/lib/Drupal/file/Tests/MoveTest.php
+++ b/core/modules/file/lib/Drupal/file/Tests/MoveTest.php
@@ -33,7 +33,7 @@ function testNormal() {
 
     // Check the return status and that the contents changed.
     $this->assertTrue($result, t('File moved successfully.'));
-    $this->assertFalse(file_exists($source->uri));
+    $this->assertFalse(is_file($source->uri));
     $this->assertEqual($contents, file_get_contents($result->uri), t('Contents of file correctly written.'));
 
     // Check that the correct hooks were called.
@@ -65,7 +65,7 @@ function testExistingRename() {
 
     // Check the return status and that the contents changed.
     $this->assertTrue($result, t('File moved successfully.'));
-    $this->assertFalse(file_exists($source->uri));
+    $this->assertFalse(is_file($source->uri));
     $this->assertEqual($contents, file_get_contents($result->uri), t('Contents of file correctly written.'));
 
     // Check that the correct hooks were called.
@@ -100,7 +100,7 @@ function testExistingReplace() {
 
     // Look at the results.
     $this->assertEqual($contents, file_get_contents($result->uri), t('Contents of file were overwritten.'));
-    $this->assertFalse(file_exists($source->uri));
+    $this->assertFalse(is_file($source->uri));
     $this->assertTrue($result, t('File moved successfully.'));
 
     // Check that the correct hooks were called.
@@ -154,7 +154,7 @@ function testExistingError() {
 
     // Check the return status and that the contents did not change.
     $this->assertFalse($result, t('File move failed.'));
-    $this->assertTrue(file_exists($source->uri));
+    $this->assertTrue(is_file($source->uri));
     $this->assertEqual($contents, file_get_contents($target->uri), t('Contents of file were not altered.'));
 
     // Check that no hooks were called while failing.
diff --git a/core/modules/file/lib/Drupal/file/Tests/UsageTest.php b/core/modules/file/lib/Drupal/file/Tests/UsageTest.php
index 00c82ef..2eaed5d 100644
--- a/core/modules/file/lib/Drupal/file/Tests/UsageTest.php
+++ b/core/modules/file/lib/Drupal/file/Tests/UsageTest.php
@@ -136,7 +136,7 @@ function testTempFileCleanup() {
       ))
       ->condition('fid', $temp_old->fid)
       ->execute();
-    $this->assertTrue(file_exists($temp_old->uri), t('Old temp file was created correctly.'));
+    $this->assertTrue(is_file($temp_old->uri), t('Old temp file was created correctly.'));
 
     // Temporary file that is less than DRUPAL_MAXIMUM_TEMP_FILE_AGE.
     $temp_new = file_save_data('');
@@ -144,7 +144,7 @@ function testTempFileCleanup() {
       ->fields(array('status' => 0))
       ->condition('fid', $temp_new->fid)
       ->execute();
-    $this->assertTrue(file_exists($temp_new->uri), t('New temp file was created correctly.'));
+    $this->assertTrue(is_file($temp_new->uri), t('New temp file was created correctly.'));
 
     // Permanent file that is older than DRUPAL_MAXIMUM_TEMP_FILE_AGE.
     $perm_old = file_save_data('');
@@ -152,17 +152,17 @@ function testTempFileCleanup() {
       ->fields(array('timestamp' => 1))
       ->condition('fid', $temp_old->fid)
       ->execute();
-    $this->assertTrue(file_exists($perm_old->uri), t('Old permanent file was created correctly.'));
+    $this->assertTrue(is_file($perm_old->uri), t('Old permanent file was created correctly.'));
 
     // Permanent file that is newer than DRUPAL_MAXIMUM_TEMP_FILE_AGE.
     $perm_new = file_save_data('');
-    $this->assertTrue(file_exists($perm_new->uri), t('New permanent file was created correctly.'));
+    $this->assertTrue(is_file($perm_new->uri), t('New permanent file was created correctly.'));
 
     // Run cron and then ensure that only the old, temp file was deleted.
     $this->cronRun();
-    $this->assertFalse(file_exists($temp_old->uri), t('Old temp file was correctly removed.'));
-    $this->assertTrue(file_exists($temp_new->uri), t('New temp file was correctly ignored.'));
-    $this->assertTrue(file_exists($perm_old->uri), t('Old permanent file was correctly ignored.'));
-    $this->assertTrue(file_exists($perm_new->uri), t('New permanent file was correctly ignored.'));
+    $this->assertFalse(is_file($temp_old->uri), t('Old temp file was correctly removed.'));
+    $this->assertTrue(is_file($temp_new->uri), t('New temp file was correctly ignored.'));
+    $this->assertTrue(is_file($perm_old->uri), t('Old permanent file was correctly ignored.'));
+    $this->assertTrue(is_file($perm_new->uri), t('New permanent file was correctly ignored.'));
   }
 }
diff --git a/core/modules/file/lib/Drupal/file/Tests/ValidatorTest.php b/core/modules/file/lib/Drupal/file/Tests/ValidatorTest.php
index eeaa47b..1728594 100644
--- a/core/modules/file/lib/Drupal/file/Tests/ValidatorTest.php
+++ b/core/modules/file/lib/Drupal/file/Tests/ValidatorTest.php
@@ -48,11 +48,11 @@ function testFileValidateExtensions() {
    *  This ensures a specific file is actually an image.
    */
   function testFileValidateIsImage() {
-    $this->assertTrue(file_exists($this->image->uri), t('The image being tested exists.'), 'File');
+    $this->assertTrue(is_file($this->image->uri), t('The image being tested exists.'), 'File');
     $errors = file_validate_is_image($this->image);
     $this->assertEqual(count($errors), 0, t('No error reported for our image file.'), 'File');
 
-    $this->assertTrue(file_exists($this->non_image->uri), t('The non-image being tested exists.'), 'File');
+    $this->assertTrue(is_file($this->non_image->uri), t('The non-image being tested exists.'), 'File');
     $errors = file_validate_is_image($this->non_image);
     $this->assertEqual(count($errors), 1, t('An error reported for our non-image file.'), 'File');
   }
diff --git a/core/modules/image/image.admin.inc b/core/modules/image/image.admin.inc
index 933a4ad..4318681 100644
--- a/core/modules/image/image.admin.inc
+++ b/core/modules/image/image.admin.inc
@@ -717,7 +717,7 @@ function theme_image_style_preview($variables) {
 
   // Set up preview file information.
   $preview_file = image_style_path($style->id(), $original_path);
-  if (!file_exists($preview_file)) {
+  if (!is_file($preview_file)) {
     image_style_create_derivative($style, $original_path, $preview_file);
   }
   $preview_image = image_get_info($preview_file);
diff --git a/core/modules/image/image.module b/core/modules/image/image.module
index 556467b..b7d26b8 100644
--- a/core/modules/image/image.module
+++ b/core/modules/image/image.module
@@ -496,7 +496,7 @@ function image_path_flush($path) {
   $styles = entity_load_multiple('image_style');
   foreach ($styles as $style) {
     $image_path = image_style_path($style->id(), $path);
-    if (file_exists($image_path)) {
+    if (is_file($image_path)) {
       file_unmanaged_delete($image_path);
     }
   }
@@ -610,7 +610,7 @@ function image_style_deliver($style, $scheme) {
   // If using the private scheme, let other modules provide headers and
   // control access to the file.
   if ($scheme == 'private') {
-    if (file_exists($derivative_uri)) {
+    if (is_file($derivative_uri)) {
       file_download($scheme, file_uri_target($derivative_uri));
     }
     else {
@@ -627,7 +627,7 @@ function image_style_deliver($style, $scheme) {
   }
 
   // Don't try to generate file if source is missing.
-  if (!file_exists($image_uri)) {
+  if (!is_file($image_uri)) {
     watchdog('image', 'Unable to generate the derived image from image at %path.', array('%path' => $derivative_uri));
     return new Response(t('Error generating image, missing source file.'), 404);
   }
@@ -635,7 +635,7 @@ function image_style_deliver($style, $scheme) {
   // Don't start generating the image if the derivative already exists or if
   // generation is in progress in another thread.
   $lock_name = 'image_style_deliver:' . $style->id() . ':' . drupal_hash_base64($image_uri);
-  if (!file_exists($derivative_uri)) {
+  if (!is_file($derivative_uri)) {
     $lock_acquired = lock()->acquire($lock_name);
     if (!$lock_acquired) {
       // Tell client to retry again in 3 seconds. Currently no browsers are known
@@ -649,7 +649,7 @@ function image_style_deliver($style, $scheme) {
 
   // Try to generate the image, unless another thread just did it while we were
   // acquiring the lock.
-  $success = file_exists($derivative_uri) || image_style_create_derivative($style, $image_uri, $derivative_uri);
+  $success = is_file($derivative_uri) || image_style_create_derivative($style, $image_uri, $derivative_uri);
 
   if (!empty($lock_acquired)) {
     lock()->release($lock_name);
@@ -711,7 +711,7 @@ function image_style_create_derivative($style, $source, $destination) {
   }
 
   if (!image_save($image, $destination)) {
-    if (file_exists($destination)) {
+    if (is_file($destination)) {
       watchdog('image', 'Cached image file %destination already exists. There may be an issue with your rewrite configuration.', array('%destination' => $destination), WATCHDOG_ERROR);
     }
     return FALSE;
@@ -802,7 +802,7 @@ function image_style_url($style_name, $path) {
   // with the script path. If the file does not exist, use url() to ensure
   // that it is included. Once the file exists it's fine to fall back to the
   // actual file path, this avoids bootstrapping PHP once the files are built.
-  if ($GLOBALS['script_path'] && file_uri_scheme($uri) == 'public' && !file_exists($uri)) {
+  if ($GLOBALS['script_path'] && file_uri_scheme($uri) == 'public' && !is_file($uri)) {
     $directory_path = file_stream_wrapper_get_instance_by_uri($uri)->getDirectoryPath();
     return url($directory_path . '/' . file_uri_target($uri), array('absolute' => TRUE));
   }
diff --git a/core/modules/image/lib/Drupal/image/Tests/ImageDimensionsTest.php b/core/modules/image/lib/Drupal/image/Tests/ImageDimensionsTest.php
index e7552d2..c39866f 100644
--- a/core/modules/image/lib/Drupal/image/Tests/ImageDimensionsTest.php
+++ b/core/modules/image/lib/Drupal/image/Tests/ImageDimensionsTest.php
@@ -71,10 +71,10 @@ function testImageDimensions() {
     image_effect_save($style, $effect);
     $img_tag = theme_image_style($variables);
     $this->assertEqual($img_tag, '<img class="image-style-test" src="' . $url . '" width="120" height="60" alt="" />');
-    $this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.');
+    $this->assertFalse(is_file($generated_uri), 'Generated file does not exist.');
     $this->drupalGet($url);
     $this->assertResponse(200, 'Image was generated at the URL.');
-    $this->assertTrue(file_exists($generated_uri), 'Generated file does exist after we accessed it.');
+    $this->assertTrue(is_file($generated_uri), 'Generated file does exist after we accessed it.');
     $image_info = image_get_info($generated_uri);
     $this->assertEqual($image_info['width'], 120);
     $this->assertEqual($image_info['height'], 60);
@@ -92,10 +92,10 @@ function testImageDimensions() {
     image_effect_save($style, $effect);
     $img_tag = theme_image_style($variables);
     $this->assertEqual($img_tag, '<img class="image-style-test" src="' . $url . '" width="60" height="120" alt="" />');
-    $this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.');
+    $this->assertFalse(is_file($generated_uri), 'Generated file does not exist.');
     $this->drupalGet($url);
     $this->assertResponse(200, 'Image was generated at the URL.');
-    $this->assertTrue(file_exists($generated_uri), 'Generated file does exist after we accessed it.');
+    $this->assertTrue(is_file($generated_uri), 'Generated file does exist after we accessed it.');
     $image_info = image_get_info($generated_uri);
     $this->assertEqual($image_info['width'], 60);
     $this->assertEqual($image_info['height'], 120);
@@ -114,10 +114,10 @@ function testImageDimensions() {
     image_effect_save($style, $effect);
     $img_tag = theme_image_style($variables);
     $this->assertEqual($img_tag, '<img class="image-style-test" src="' . $url . '" width="45" height="90" alt="" />');
-    $this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.');
+    $this->assertFalse(is_file($generated_uri), 'Generated file does not exist.');
     $this->drupalGet($url);
     $this->assertResponse(200, 'Image was generated at the URL.');
-    $this->assertTrue(file_exists($generated_uri), 'Generated file does exist after we accessed it.');
+    $this->assertTrue(is_file($generated_uri), 'Generated file does exist after we accessed it.');
     $image_info = image_get_info($generated_uri);
     $this->assertEqual($image_info['width'], 45);
     $this->assertEqual($image_info['height'], 90);
@@ -136,10 +136,10 @@ function testImageDimensions() {
     image_effect_save($style, $effect);
     $img_tag = theme_image_style($variables);
     $this->assertEqual($img_tag, '<img class="image-style-test" src="' . $url . '" width="45" height="90" alt="" />');
-    $this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.');
+    $this->assertFalse(is_file($generated_uri), 'Generated file does not exist.');
     $this->drupalGet($url);
     $this->assertResponse(200, 'Image was generated at the URL.');
-    $this->assertTrue(file_exists($generated_uri), 'Generated file does exist after we accessed it.');
+    $this->assertTrue(is_file($generated_uri), 'Generated file does exist after we accessed it.');
     $image_info = image_get_info($generated_uri);
     $this->assertEqual($image_info['width'], 45);
     $this->assertEqual($image_info['height'], 90);
@@ -154,10 +154,10 @@ function testImageDimensions() {
     image_effect_save($style, $effect);
     $img_tag = theme_image_style($variables);
     $this->assertEqual($img_tag, '<img class="image-style-test" src="' . $url . '" width="45" height="90" alt="" />');
-    $this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.');
+    $this->assertFalse(is_file($generated_uri), 'Generated file does not exist.');
     $this->drupalGet($url);
     $this->assertResponse(200, 'Image was generated at the URL.');
-    $this->assertTrue(file_exists($generated_uri), 'Generated file does exist after we accessed it.');
+    $this->assertTrue(is_file($generated_uri), 'Generated file does exist after we accessed it.');
     $image_info = image_get_info($generated_uri);
     $this->assertEqual($image_info['width'], 45);
     $this->assertEqual($image_info['height'], 90);
@@ -175,10 +175,10 @@ function testImageDimensions() {
     image_effect_save($style, $effect);
     $img_tag = theme_image_style($variables);
     $this->assertEqual($img_tag, '<img class="image-style-test" src="' . $url . '" alt="" />');
-    $this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.');
+    $this->assertFalse(is_file($generated_uri), 'Generated file does not exist.');
     $this->drupalGet($url);
     $this->assertResponse(200, 'Image was generated at the URL.');
-    $this->assertTrue(file_exists($generated_uri), 'Generated file does exist after we accessed it.');
+    $this->assertTrue(is_file($generated_uri), 'Generated file does exist after we accessed it.');
 
 
     // Add a crop effect.
@@ -195,10 +195,10 @@ function testImageDimensions() {
     image_effect_save($style, $effect);
     $img_tag = theme_image_style($variables);
     $this->assertEqual($img_tag, '<img class="image-style-test" src="' . $url . '" width="30" height="30" alt="" />');
-    $this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.');
+    $this->assertFalse(is_file($generated_uri), 'Generated file does not exist.');
     $this->drupalGet($url);
     $this->assertResponse(200, 'Image was generated at the URL.');
-    $this->assertTrue(file_exists($generated_uri), 'Generated file does exist after we accessed it.');
+    $this->assertTrue(is_file($generated_uri), 'Generated file does exist after we accessed it.');
     $image_info = image_get_info($generated_uri);
     $this->assertEqual($image_info['width'], 30);
     $this->assertEqual($image_info['height'], 30);
@@ -216,10 +216,10 @@ function testImageDimensions() {
     image_effect_save($style, $effect);
     $img_tag = theme_image_style($variables);
     $this->assertEqual($img_tag, '<img class="image-style-test" src="' . $url . '" alt="" />');
-    $this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.');
+    $this->assertFalse(is_file($generated_uri), 'Generated file does not exist.');
     $this->drupalGet($url);
     $this->assertResponse(200, 'Image was generated at the URL.');
-    $this->assertTrue(file_exists($generated_uri), 'Generated file does exist after we accessed it.');
+    $this->assertTrue(is_file($generated_uri), 'Generated file does exist after we accessed it.');
 
     image_effect_delete($style, $effect);
 
diff --git a/core/modules/image/lib/Drupal/image/Tests/ImageStylesPathAndUrlTest.php b/core/modules/image/lib/Drupal/image/Tests/ImageStylesPathAndUrlTest.php
index 1138f18..f536872 100644
--- a/core/modules/image/lib/Drupal/image/Tests/ImageStylesPathAndUrlTest.php
+++ b/core/modules/image/lib/Drupal/image/Tests/ImageStylesPathAndUrlTest.php
@@ -111,7 +111,7 @@ function _testImageStyleUrlAndPath($scheme, $clean_url = TRUE) {
 
     // Get the URL of a file that has not been generated and try to create it.
     $generated_uri = $scheme . '://styles/' . $this->style_name . '/' . $scheme . '/'. drupal_basename($original_uri);
-    $this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.');
+    $this->assertFalse(is_file($generated_uri), 'Generated file does not exist.');
     $generate_url = image_style_url($this->style_name, $original_uri);
 
     if ($GLOBALS['script_path']) {
@@ -121,7 +121,7 @@ function _testImageStyleUrlAndPath($scheme, $clean_url = TRUE) {
     // Fetch the URL that generates the file.
     $this->drupalGet($generate_url);
     $this->assertResponse(200, 'Image was generated at the URL.');
-    $this->assertTrue(file_exists($generated_uri), 'Generated file does exist after we accessed it.');
+    $this->assertTrue(is_file($generated_uri), 'Generated file does exist after we accessed it.');
     $this->assertRaw(file_get_contents($generated_uri), 'URL returns expected file.');
     $generated_image_info = image_get_info($generated_uri);
     $this->assertEqual($this->drupalGetHeader('Content-Type'), $generated_image_info['mime_type'], 'Expected Content-Type was reported.');
@@ -141,7 +141,7 @@ function _testImageStyleUrlAndPath($scheme, $clean_url = TRUE) {
       $file_noaccess = array_shift($files);
       $original_uri_noaccess = file_unmanaged_copy($file_noaccess->uri, $scheme . '://', FILE_EXISTS_RENAME);
       $generated_uri_noaccess = $scheme . '://styles/' . $this->style_name . '/' . $scheme . '/'. drupal_basename($original_uri_noaccess);
-      $this->assertFalse(file_exists($generated_uri_noaccess), 'Generated file does not exist.');
+      $this->assertFalse(is_file($generated_uri_noaccess), 'Generated file does not exist.');
       $generate_url_noaccess = image_style_url($this->style_name, $original_uri_noaccess);
 
       $this->drupalGet($generate_url_noaccess);
diff --git a/core/modules/language/language.module b/core/modules/language/language.module
index c2356be..26ce250 100644
--- a/core/modules/language/language.module
+++ b/core/modules/language/language.module
@@ -584,7 +584,7 @@ function language_css_alter(&$css) {
       // Only provide RTL overrides for files.
       if ($item['type'] == 'file') {
         $rtl_path = str_replace('.css', '-rtl.css', $item['data']);
-        if (file_exists($rtl_path) && !isset($css[$rtl_path])) {
+        if (is_file($rtl_path) && !isset($css[$rtl_path])) {
           // Replicate the same item, but with the RTL path and a little larger
           // weight so that it appears directly after the original CSS file.
           $item['data'] = $rtl_path;
diff --git a/core/modules/layout/lib/Drupal/layout/Plugin/Derivative/Layout.php b/core/modules/layout/lib/Drupal/layout/Plugin/Derivative/Layout.php
index a6c4ea9..f371f08 100644
--- a/core/modules/layout/lib/Drupal/layout/Plugin/Derivative/Layout.php
+++ b/core/modules/layout/lib/Drupal/layout/Plugin/Derivative/Layout.php
@@ -80,7 +80,7 @@ public function getDerivativeDefinitions(array $base_plugin_definition) {
       // There could be subdirectories under there with one layout defined
       // in each.
       $dir = $provider['dir'] . DIRECTORY_SEPARATOR . 'layouts' . DIRECTORY_SEPARATOR . $this->type;
-      if (file_exists($dir)) {
+      if (is_file($dir)) {
         $this->iterateDirectories($dir, $provider);
       }
     }
diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationTest.php
index e3b6777..8392b7f 100644
--- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationTest.php
+++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationTest.php
@@ -260,14 +260,14 @@ function testJavaScriptTranslation() {
 
     $locale_javascripts = variable_get('locale_translation_javascript', array());
     $js_file = 'public://' . variable_get('locale_js_directory', 'languages') . '/' . $langcode . '_' . $locale_javascripts[$langcode] . '.js';
-    $this->assertTrue($result = file_exists($js_file), t('JavaScript file created: %file', array('%file' => $result ? $js_file : t('not found'))));
+    $this->assertTrue($result = is_file($js_file), t('JavaScript file created: %file', array('%file' => $result ? $js_file : t('not found'))));
 
     // Test JavaScript translation rebuilding.
     file_unmanaged_delete($js_file);
-    $this->assertTrue($result = !file_exists($js_file), t('JavaScript file deleted: %file', array('%file' => $result ? $js_file : t('found'))));
+    $this->assertTrue($result = !is_file($js_file), t('JavaScript file deleted: %file', array('%file' => $result ? $js_file : t('found'))));
     cache_invalidate_tags(array('content' => TRUE));
     _locale_rebuild_js($langcode);
-    $this->assertTrue($result = file_exists($js_file), t('JavaScript file rebuilt: %file', array('%file' => $result ? $js_file : t('not found'))));
+    $this->assertTrue($result = is_file($js_file), t('JavaScript file rebuilt: %file', array('%file' => $result ? $js_file : t('not found'))));
   }
 
   /**
diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleUninstallTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleUninstallTest.php
index 06583de..f196548 100644
--- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleUninstallTest.php
+++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleUninstallTest.php
@@ -80,7 +80,7 @@ function testUninstallProcess() {
     _locale_rebuild_js('fr');
     $locale_javascripts = variable_get('locale_translation_javascript', array());
     $js_file = 'public://' . variable_get('locale_js_directory', 'languages') . '/fr_' . $locale_javascripts['fr'] . '.js';
-    $this->assertTrue($result = file_exists($js_file), t('JavaScript file created: %file', array('%file' => $result ? $js_file : t('none'))));
+    $this->assertTrue($result = is_file($js_file), t('JavaScript file created: %file', array('%file' => $result ? $js_file : t('none'))));
 
     // Disable string caching.
     variable_set('locale_cache_strings', 0);
@@ -111,7 +111,7 @@ function testUninstallProcess() {
     $this->assertEqual(language(LANGUAGE_TYPE_INTERFACE)->langcode, 'en', t('Language after uninstall: %lang', array('%lang' => language(LANGUAGE_TYPE_INTERFACE)->langcode)));
 
     // Check JavaScript files deletion.
-    $this->assertTrue($result = !file_exists($js_file), t('JavaScript file deleted: %file', array('%file' => $result ? $js_file : t('found'))));
+    $this->assertTrue($result = !is_file($js_file), t('JavaScript file deleted: %file', array('%file' => $result ? $js_file : t('found'))));
 
     // Check language count.
     $language_count = variable_get('language_count', 1);
diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module
index c8ccc37..bcac15f 100644
--- a/core/modules/locale/locale.module
+++ b/core/modules/locale/locale.module
@@ -1242,7 +1242,7 @@ function _locale_rebuild_js($langcode = NULL) {
   // Only create a new file if the content has changed or the original file got
   // lost.
   $dest = $dir . '/' . $language->langcode . '_' . $data_hash . '.js';
-  if ($data && ($changed_hash || !file_exists($dest))) {
+  if ($data && ($changed_hash || !is_file($dest))) {
     // Ensure that the directory exists and is writable, if possible.
     file_prepare_directory($dir, FILE_CREATE_DIRECTORY);
 
diff --git a/core/modules/node/tests/modules/node_access_test/node_access_test.install b/core/modules/node/tests/modules/node_access_test/node_access_test.install
index 6b3ef5d..1f33d51 100644
--- a/core/modules/node/tests/modules/node_access_test/node_access_test.install
+++ b/core/modules/node/tests/modules/node_access_test/node_access_test.install
@@ -39,4 +39,4 @@ function node_access_test_schema() {
   );
 
   return $schema;
-}
\ No newline at end of file
+}
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
index 4d72998..64388fd 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
@@ -655,7 +655,7 @@ public function run(array $methods = array()) {
       $this->verbose = TRUE;
       $this->verboseDirectory = variable_get('file_public_path', conf_path() . '/files') . '/simpletest/verbose';
       $this->verboseDirectoryUrl = file_create_url($this->verboseDirectory);
-      if (file_prepare_directory($this->verboseDirectory, FILE_CREATE_DIRECTORY) && !file_exists($this->verboseDirectory . '/.htaccess')) {
+      if (file_prepare_directory($this->verboseDirectory, FILE_CREATE_DIRECTORY) && !is_file($this->verboseDirectory . '/.htaccess')) {
         file_put_contents($this->verboseDirectory . '/.htaccess', "<IfModule mod_expires.c>\nExpiresActive Off\n</IfModule>\n");
       }
       $this->verboseClassName = str_replace("\\", "_", $class);
diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module
index d7adb65..a134609 100644
--- a/core/modules/simpletest/simpletest.module
+++ b/core/modules/simpletest/simpletest.module
@@ -264,7 +264,7 @@ function simpletest_last_test_get($test_id) {
 function simpletest_log_read($test_id, $prefix, $test_class, $during_test = FALSE) {
   $log = 'public://' . ($during_test ? '' : '/simpletest/' . substr($prefix, 10)) . '/error.log';
   $found = FALSE;
-  if (file_exists($log)) {
+  if (is_file($log)) {
     foreach (file($log) as $line) {
       if (preg_match('/\[.*?\] (.*?): (.*?) in (.*) on line (\d+)/', $line, $match)) {
         // Parse PHP fatal errors for example: PHP Fatal error: Call to
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/SystemListingTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/SystemListingTest.php
index ee1f12b..13eb15a 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/SystemListingTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/SystemListingTest.php
@@ -49,7 +49,7 @@ function testDirectoryPrecedence() {
     foreach ($expected_directories as $module => $directories) {
       foreach ($directories as $directory) {
         $filename = "$directory/$module/$module.module";
-        $this->assertTrue(file_exists(DRUPAL_ROOT . '/' . $filename), format_string('@filename exists.', array('@filename' => $filename)));
+        $this->assertTrue(is_file(DRUPAL_ROOT . '/' . $filename), format_string('@filename exists.', array('@filename' => $filename)));
       }
     }
 
diff --git a/core/modules/system/lib/Drupal/system/Tests/File/ReadOnlyStreamWrapperTest.php b/core/modules/system/lib/Drupal/system/Tests/File/ReadOnlyStreamWrapperTest.php
index 909fe1c..ef07b63 100644
--- a/core/modules/system/lib/Drupal/system/Tests/File/ReadOnlyStreamWrapperTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/File/ReadOnlyStreamWrapperTest.php
@@ -77,7 +77,7 @@ function testWriteFunctions() {
     $this->assertFalse(@rename($uri, $this->scheme . '://newname.txt'), 'Unable to rename files using the read-only stream wrapper.');
     // Test the unlink() function
     $this->assertTrue(@drupal_unlink($uri), 'Able to unlink file using read-only stream wrapper.');
-    $this->assertTrue(file_exists($filepath), 'Unlink File was not actually deleted.');
+    $this->assertTrue(is_file($filepath), 'Unlink File was not actually deleted.');
 
     // Test the mkdir() function by attempting to create a directory.
     $dirname = $this->randomName();
diff --git a/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedCopyTest.php b/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedCopyTest.php
index 7056946..2bbb708 100644
--- a/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedCopyTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedCopyTest.php
@@ -31,8 +31,8 @@ function testNormal() {
     $new_filepath = file_unmanaged_copy($uri, $desired_filepath, FILE_EXISTS_ERROR);
     $this->assertTrue($new_filepath, 'Copy was successful.');
     $this->assertEqual($new_filepath, $desired_filepath, 'Returned expected filepath.');
-    $this->assertTrue(file_exists($uri), 'Original file remains.');
-    $this->assertTrue(file_exists($new_filepath), 'New file exists.');
+    $this->assertTrue(is_file($uri), 'Original file remains.');
+    $this->assertTrue(is_file($new_filepath), 'New file exists.');
     $this->assertFilePermissions($new_filepath, variable_get('file_chmod_file', 0664));
 
     // Copying with rename.
@@ -41,8 +41,8 @@ function testNormal() {
     $newer_filepath = file_unmanaged_copy($uri, $desired_filepath, FILE_EXISTS_RENAME);
     $this->assertTrue($newer_filepath, 'Copy was successful.');
     $this->assertNotEqual($newer_filepath, $desired_filepath, 'Returned expected filepath.');
-    $this->assertTrue(file_exists($uri), 'Original file remains.');
-    $this->assertTrue(file_exists($newer_filepath), 'New file exists.');
+    $this->assertTrue(is_file($uri), 'Original file remains.');
+    $this->assertTrue(is_file($newer_filepath), 'New file exists.');
     $this->assertFilePermissions($newer_filepath, variable_get('file_chmod_file', 0664));
 
     // TODO: test copying to a directory (rather than full directory/file path)
@@ -55,7 +55,7 @@ function testNormal() {
   function testNonExistent() {
     // Copy non-existent file
     $desired_filepath = $this->randomName();
-    $this->assertFalse(file_exists($desired_filepath), "Randomly named file doesn't exists.");
+    $this->assertFalse(is_file($desired_filepath), "Randomly named file doesn't exists.");
     $new_filepath = file_unmanaged_copy($desired_filepath, $this->randomName());
     $this->assertFalse($new_filepath, 'Copying a missing file fails.');
   }
@@ -71,26 +71,26 @@ function testOverwriteSelf() {
     $new_filepath = file_unmanaged_copy($uri, $uri, FILE_EXISTS_RENAME);
     $this->assertTrue($new_filepath, 'Copying onto itself with renaming works.');
     $this->assertNotEqual($new_filepath, $uri, 'Copied file has a new name.');
-    $this->assertTrue(file_exists($uri), 'Original file exists after copying onto itself.');
-    $this->assertTrue(file_exists($new_filepath), 'Copied file exists after copying onto itself.');
+    $this->assertTrue(is_file($uri), 'Original file exists after copying onto itself.');
+    $this->assertTrue(is_file($new_filepath), 'Copied file exists after copying onto itself.');
     $this->assertFilePermissions($new_filepath, variable_get('file_chmod_file', 0664));
 
     // Copy the file onto itself without renaming fails.
     $new_filepath = file_unmanaged_copy($uri, $uri, FILE_EXISTS_ERROR);
     $this->assertFalse($new_filepath, 'Copying onto itself without renaming fails.');
-    $this->assertTrue(file_exists($uri), 'File exists after copying onto itself.');
+    $this->assertTrue(is_file($uri), 'File exists after copying onto itself.');
 
     // Copy the file into same directory without renaming fails.
     $new_filepath = file_unmanaged_copy($uri, drupal_dirname($uri), FILE_EXISTS_ERROR);
     $this->assertFalse($new_filepath, 'Copying onto itself fails.');
-    $this->assertTrue(file_exists($uri), 'File exists after copying onto itself.');
+    $this->assertTrue(is_file($uri), 'File exists after copying onto itself.');
 
     // Copy the file into same directory with renaming works.
     $new_filepath = file_unmanaged_copy($uri, drupal_dirname($uri), FILE_EXISTS_RENAME);
     $this->assertTrue($new_filepath, 'Copying into same directory works.');
     $this->assertNotEqual($new_filepath, $uri, 'Copied file has a new name.');
-    $this->assertTrue(file_exists($uri), 'Original file exists after copying onto itself.');
-    $this->assertTrue(file_exists($new_filepath), 'Copied file exists after copying onto itself.');
+    $this->assertTrue(is_file($uri), 'Original file exists after copying onto itself.');
+    $this->assertTrue(is_file($new_filepath), 'Copied file exists after copying onto itself.');
     $this->assertFilePermissions($new_filepath, variable_get('file_chmod_file', 0664));
   }
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedDeleteRecursiveTest.php b/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedDeleteRecursiveTest.php
index 2a93ac6..be0fb4b 100644
--- a/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedDeleteRecursiveTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedDeleteRecursiveTest.php
@@ -29,7 +29,7 @@ function testSingleFile() {
 
     // Delete the file.
     $this->assertTrue(file_unmanaged_delete_recursive($filepath), 'Function reported success.');
-    $this->assertFalse(file_exists($filepath), 'Test file has been deleted.');
+    $this->assertFalse(is_file($filepath), 'Test file has been deleted.');
   }
 
   /**
@@ -41,7 +41,7 @@ function testEmptyDirectory() {
 
     // Delete the directory.
     $this->assertTrue(file_unmanaged_delete_recursive($directory), 'Function reported success.');
-    $this->assertFalse(file_exists($directory), 'Directory has been deleted.');
+    $this->assertFalse(is_file($directory), 'Directory has been deleted.');
   }
 
   /**
@@ -57,9 +57,9 @@ function testDirectory() {
 
     // Delete the directory.
     $this->assertTrue(file_unmanaged_delete_recursive($directory), 'Function reported success.');
-    $this->assertFalse(file_exists($filepathA), 'Test file A has been deleted.');
-    $this->assertFalse(file_exists($filepathB), 'Test file B has been deleted.');
-    $this->assertFalse(file_exists($directory), 'Directory has been deleted.');
+    $this->assertFalse(is_file($filepathA), 'Test file A has been deleted.');
+    $this->assertFalse(is_file($filepathB), 'Test file B has been deleted.');
+    $this->assertFalse(is_file($directory), 'Directory has been deleted.');
   }
 
   /**
@@ -76,9 +76,9 @@ function testSubDirectory() {
 
     // Delete the directory.
     $this->assertTrue(file_unmanaged_delete_recursive($directory), 'Function reported success.');
-    $this->assertFalse(file_exists($filepathA), 'Test file A has been deleted.');
-    $this->assertFalse(file_exists($filepathB), 'Test file B has been deleted.');
-    $this->assertFalse(file_exists($subdirectory), 'Subdirectory has been deleted.');
-    $this->assertFalse(file_exists($directory), 'Directory has been deleted.');
+    $this->assertFalse(is_file($filepathA), 'Test file A has been deleted.');
+    $this->assertFalse(is_file($filepathB), 'Test file B has been deleted.');
+    $this->assertFalse(is_file($subdirectory), 'Subdirectory has been deleted.');
+    $this->assertFalse(is_file($directory), 'Directory has been deleted.');
   }
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedDeleteTest.php b/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedDeleteTest.php
index 005cba0..9234af9 100644
--- a/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedDeleteTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedDeleteTest.php
@@ -28,7 +28,7 @@ function testNormal() {
 
     // Delete a regular file
     $this->assertTrue(file_unmanaged_delete($uri), 'Deleted worked.');
-    $this->assertFalse(file_exists($uri), 'Test file has actually been deleted.');
+    $this->assertFalse(is_file($uri), 'Test file has actually been deleted.');
   }
 
   /**
@@ -48,6 +48,6 @@ function testDirectory() {
 
     // Try to delete a directory
     $this->assertFalse(file_unmanaged_delete($directory), 'Could not delete the delete directory.');
-    $this->assertTrue(file_exists($directory), 'Directory has not been deleted.');
+    $this->assertTrue(is_file($directory), 'Directory has not been deleted.');
   }
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedMoveTest.php b/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedMoveTest.php
index 6e0ec14..067d1d4 100644
--- a/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedMoveTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedMoveTest.php
@@ -31,19 +31,19 @@ function testNormal() {
     $new_filepath = file_unmanaged_move($uri, $desired_filepath, FILE_EXISTS_ERROR);
     $this->assertTrue($new_filepath, 'Move was successful.');
     $this->assertEqual($new_filepath, $desired_filepath, 'Returned expected filepath.');
-    $this->assertTrue(file_exists($new_filepath), 'File exists at the new location.');
-    $this->assertFalse(file_exists($uri), 'No file remains at the old location.');
+    $this->assertTrue(is_file($new_filepath), 'File exists at the new location.');
+    $this->assertFalse(is_file($uri), 'No file remains at the old location.');
     $this->assertFilePermissions($new_filepath, variable_get('file_chmod_file', 0664));
 
     // Moving with rename.
     $desired_filepath = 'public://' . $this->randomName();
-    $this->assertTrue(file_exists($new_filepath), 'File exists before moving.');
+    $this->assertTrue(is_file($new_filepath), 'File exists before moving.');
     $this->assertTrue(file_put_contents($desired_filepath, ' '), 'Created a file so a rename will have to happen.');
     $newer_filepath = file_unmanaged_move($new_filepath, $desired_filepath, FILE_EXISTS_RENAME);
     $this->assertTrue($newer_filepath, 'Move was successful.');
     $this->assertNotEqual($newer_filepath, $desired_filepath, 'Returned expected filepath.');
-    $this->assertTrue(file_exists($newer_filepath), 'File exists at the new location.');
-    $this->assertFalse(file_exists($new_filepath), 'No file remains at the old location.');
+    $this->assertTrue(is_file($newer_filepath), 'File exists at the new location.');
+    $this->assertFalse(is_file($new_filepath), 'No file remains at the old location.');
     $this->assertFilePermissions($newer_filepath, variable_get('file_chmod_file', 0664));
 
     // TODO: test moving to a directory (rather than full directory/file path)
@@ -69,12 +69,12 @@ function testOverwriteSelf() {
     // Move the file onto itself without renaming shouldn't make changes.
     $new_filepath = file_unmanaged_move($uri, $uri, FILE_EXISTS_REPLACE);
     $this->assertFalse($new_filepath, 'Moving onto itself without renaming fails.');
-    $this->assertTrue(file_exists($uri), 'File exists after moving onto itself.');
+    $this->assertTrue(is_file($uri), 'File exists after moving onto itself.');
 
     // Move the file onto itself with renaming will result in a new filename.
     $new_filepath = file_unmanaged_move($uri, $uri, FILE_EXISTS_RENAME);
     $this->assertTrue($new_filepath, 'Moving onto itself with renaming works.');
-    $this->assertFalse(file_exists($uri), 'Original file has been removed.');
-    $this->assertTrue(file_exists($new_filepath), 'File exists after moving onto itself.');
+    $this->assertFalse(is_file($uri), 'Original file has been removed.');
+    $this->assertTrue(is_file($new_filepath), 'File exists after moving onto itself.');
   }
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Image/FileMoveTest.php b/core/modules/system/lib/Drupal/system/Tests/Image/FileMoveTest.php
index e74b553..000c30c 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Image/FileMoveTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Image/FileMoveTest.php
@@ -37,7 +37,7 @@ function testNormal() {
     image_style_create_derivative($style, $file->uri, $derivative_uri);
 
     // Check if derivative image exists.
-    $this->assertTrue(file_exists($derivative_uri), 'Make sure derivative image is generated successfully.');
+    $this->assertTrue(is_file($derivative_uri), 'Make sure derivative image is generated successfully.');
 
     // Clone the object so we don't have to worry about the function changing
     // our reference copy.
@@ -45,9 +45,9 @@ function testNormal() {
     $result = file_move(clone $file, $desired_filepath, FILE_EXISTS_ERROR);
 
     // Check if image has been moved.
-    $this->assertTrue(file_exists($result->uri), 'Make sure image is moved successfully.');
+    $this->assertTrue(is_file($result->uri), 'Make sure image is moved successfully.');
 
     // Check if derivative image has been flushed.
-    $this->assertFalse(file_exists($derivative_uri), 'Make sure derivative image has been flushed.');
+    $this->assertFalse(is_file($derivative_uri), 'Make sure derivative image has been flushed.');
   }
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/PhpStorage/MTimeProtectedFileStorageTest.php b/core/modules/system/lib/Drupal/system/Tests/PhpStorage/MTimeProtectedFileStorageTest.php
index ae54c2f..e219d14 100644
--- a/core/modules/system/lib/Drupal/system/Tests/PhpStorage/MTimeProtectedFileStorageTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/PhpStorage/MTimeProtectedFileStorageTest.php
@@ -70,7 +70,7 @@ function testSecurity() {
     // Ensure the file exists and that it and the containing directory have
     // minimal permissions. fileperms() can return high bits unrelated to
     // permissions, so mask with 0777.
-    $this->assertTrue(file_exists($expected_filename));
+    $this->assertTrue(is_file($expected_filename));
     $this->assertIdentical(fileperms($expected_filename) & 0777, 0400);
     $this->assertIdentical(fileperms($expected_directory) & 0777, 0100);
 
diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc
index c3c2ce4..72e32cf 100644
--- a/core/modules/system/system.admin.inc
+++ b/core/modules/system/system.admin.inc
@@ -140,7 +140,7 @@ function system_themes_page() {
     }
     // Look for a screenshot in the current theme or in its closest ancestor.
     foreach (array_reverse($theme_keys) as $theme_key) {
-      if (isset($themes[$theme_key]) && file_exists($themes[$theme_key]->info['screenshot'])) {
+      if (isset($themes[$theme_key]) && is_file($themes[$theme_key]->info['screenshot'])) {
         $theme->screenshot = array(
           'uri' => $themes[$theme_key]->info['screenshot'],
           'alt' => t('Screenshot for !theme theme', array('!theme' => $theme->info['name'])),
@@ -572,7 +572,7 @@ function system_theme_settings($form, &$form_state, $key = '') {
     foreach ($theme_keys as $theme) {
       // Include the theme-settings.php file.
       $filename = DRUPAL_ROOT . '/' . str_replace("/$theme.info", '', $themes[$theme]->filename) . '/theme-settings.php';
-      if (file_exists($filename)) {
+      if (is_file($filename)) {
         require_once $filename;
       }
 
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index b632a2f..feb451d 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -236,7 +236,7 @@ function system_requirements($phase) {
     }
     foreach (array('settings.php', 'settings.local.php') as $conf_file) {
       $full_path = $conf_path . '/' . $conf_file;
-      if (file_exists($full_path) && !drupal_verify_install_file($full_path, FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE)) {
+      if (is_file($full_path) && !drupal_verify_install_file($full_path, FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE)) {
         $conf_errors[] = $t("The file %file is not protected from modifications and poses a security risk. You must change the file's permissions to be non-writable.", array('%file' => $full_path));
       }
     }
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 8a762ee..08bd5d5 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -2988,7 +2988,7 @@ function _system_rebuild_theme_data() {
     }
     if ($themes[$key]->info['engine'] == 'theme') {
       $filename = dirname($themes[$key]->uri) . '/' . $themes[$key]->name . '.theme';
-      if (file_exists($filename)) {
+      if (is_file($filename)) {
         $themes[$key]->owner = $filename;
         $themes[$key]->prefix = $key;
       }
diff --git a/core/modules/update/update.api.php b/core/modules/update/update.api.php
index 8dd23e9..4f3f2b8 100644
--- a/core/modules/update/update.api.php
+++ b/core/modules/update/update.api.php
@@ -121,7 +121,7 @@ function hook_update_status_alter(&$projects) {
  */
 function hook_verify_update_archive($project, $archive_file, $directory) {
   $errors = array();
-  if (!file_exists($directory)) {
+  if (!is_file($directory)) {
     $errors[] = t('The %directory does not exist.', array('%directory' => $directory));
   }
   // Add other checks on the archive integrity here.
diff --git a/core/modules/update/update.manager.inc b/core/modules/update/update.manager.inc
index 0047a52..69140be 100644
--- a/core/modules/update/update.manager.inc
+++ b/core/modules/update/update.manager.inc
@@ -784,7 +784,7 @@ function update_manager_archive_extract($file, $directory) {
   $project = strtok($files[0], '/\\');
 
   $extract_location = $directory . '/' . $project;
-  if (file_exists($extract_location)) {
+  if (is_file($extract_location)) {
     file_unmanaged_delete_recursive($extract_location);
   }
 
@@ -835,7 +835,7 @@ function update_manager_file_get($url) {
   $cache_directory = _update_manager_cache_directory();
   $local = $cache_directory . '/' . drupal_basename($parsed_url['path']);
 
-  if (!file_exists($local) || update_delete_file_if_stale($local)) {
+  if (!is_file($local) || update_delete_file_if_stale($local)) {
     return system_retrieve_file($url, $local, FALSE, FILE_EXISTS_REPLACE);
   }
   else {
diff --git a/core/modules/update/update.module b/core/modules/update/update.module
index 00ef879..f97f581 100644
--- a/core/modules/update/update.module
+++ b/core/modules/update/update.module
@@ -678,11 +678,11 @@ function update_verify_update_archive($project, $archive_file, $directory) {
 
   // Make sure this isn't a tarball of Drupal core.
   if (
-    file_exists("$directory/$project/index.php")
-    && file_exists("$directory/$project/core/update.php")
-    && file_exists("$directory/$project/core/includes/bootstrap.inc")
-    && file_exists("$directory/$project/core/modules/node/node.module")
-    && file_exists("$directory/$project/core/modules/system/system.module")
+    is_file("$directory/$project/index.php")
+    && is_file("$directory/$project/core/update.php")
+    && is_file("$directory/$project/core/includes/bootstrap.inc")
+    && is_file("$directory/$project/core/modules/node/node.module")
+    && is_file("$directory/$project/core/modules/system/system.module")
   ) {
     return array(
       'no-core' => t('Automatic updating of Drupal core is not supported. See the <a href="@upgrade-guide">upgrade guide</a> for information on how to update Drupal core manually.', array('@upgrade-guide' => 'http://drupal.org/upgrade')),
@@ -914,7 +914,7 @@ function _update_manager_extract_directory($create = TRUE) {
   $directory = &drupal_static(__FUNCTION__, '');
   if (empty($directory)) {
     $directory = 'temporary://update-extraction-' . _update_manager_unique_identifier();
-    if ($create && !file_exists($directory)) {
+    if ($create && !is_file($directory)) {
       mkdir($directory);
     }
   }
@@ -936,7 +936,7 @@ function _update_manager_cache_directory($create = TRUE) {
   $directory = &drupal_static(__FUNCTION__, '');
   if (empty($directory)) {
     $directory = 'temporary://update-cache-' . _update_manager_unique_identifier();
-    if ($create && !file_exists($directory)) {
+    if ($create && !is_file($directory)) {
       mkdir($directory);
     }
   }
@@ -979,7 +979,7 @@ function update_clear_update_disk_cache() {
  *   A string containing a file path or (streamwrapper) URI.
  */
 function update_delete_file_if_stale($path) {
-  if (file_exists($path)) {
+  if (is_file($path)) {
     $filectime = filectime($path);
     if (REQUEST_TIME - $filectime > DRUPAL_MAXIMUM_TEMP_FILE_AGE || (preg_match('/.*-dev\.(tar\.gz|zip)/i', $path) && REQUEST_TIME - $filectime > 300)) {
       file_unmanaged_delete_recursive($path);
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
index 06780c3..8fb3524 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
@@ -2032,7 +2032,7 @@ protected function formatThemes($themes) {
       $template = strtr($theme, '_', '-') . $extension;
       if (!$picked && !empty($registry[$theme])) {
         $template_path = isset($registry[$theme]['path']) ? $registry[$theme]['path'] . '/' : './';
-        if (file_exists($template_path . $template)) {
+        if (is_file($template_path . $template)) {
           $hint = t('File found in folder @template-path', array('@template-path' => $template_path));
           $template = '<strong title="'. $hint .'">' . $template . '</strong>';
         }
diff --git a/core/scripts/drupal.sh b/core/scripts/drupal.sh
index 9514341..9c93c03 100755
--- a/core/scripts/drupal.sh
+++ b/core/scripts/drupal.sh
@@ -114,7 +114,7 @@
         }
 
         // set file to execute or Drupal path (clean URLs enabled)
-        if (isset($path['path']) && file_exists(substr($path['path'], 1))) {
+        if (isset($path['path']) && is_file(substr($path['path'], 1))) {
           $_SERVER['PHP_SELF'] = $_SERVER['REQUEST_URI'] = $path['path'];
           $cmd = substr($path['path'], 1);
         }
@@ -134,7 +134,7 @@
   }
 }
 
-if (file_exists($cmd)) {
+if (is_file($cmd)) {
   include $cmd;
 }
 else {
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index e728932..c6f765e 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -540,7 +540,7 @@ function simpletest_script_get_test_list() {
     elseif ($args['file']) {
       // Extract test case class names from specified files.
       foreach ($args['test_names'] as $file) {
-        if (!file_exists($file)) {
+        if (!is_file($file)) {
           simpletest_script_print_error('File not found: ' . $file);
           exit;
         }
diff --git a/core/themes/engines/phptemplate/phptemplate.engine b/core/themes/engines/phptemplate/phptemplate.engine
index d293b85..9e11b6a 100644
--- a/core/themes/engines/phptemplate/phptemplate.engine
+++ b/core/themes/engines/phptemplate/phptemplate.engine
@@ -10,7 +10,7 @@
  */
 function phptemplate_init($template) {
   $file = dirname($template->filename) . '/template.php';
-  if (file_exists($file)) {
+  if (is_file($file)) {
     include_once DRUPAL_ROOT . '/' . $file;
   }
 }
diff --git a/core/themes/engines/twig/twig.engine b/core/themes/engines/twig/twig.engine
index e496bc9..99bb290 100644
--- a/core/themes/engines/twig/twig.engine
+++ b/core/themes/engines/twig/twig.engine
@@ -25,7 +25,7 @@ function twig_extension() {
  */
 function twig_init($template) {
   $file = dirname($template->filename) . '/template.php';
-  if (file_exists($file)) {
+  if (is_file($file)) {
     include_once DRUPAL_ROOT . '/' . $file;
   }
 }
diff --git a/core/vendor/composer/ClassLoader.php b/core/vendor/composer/ClassLoader.php
index a4a0dc5..02ba0b2 100644
--- a/core/vendor/composer/ClassLoader.php
+++ b/core/vendor/composer/ClassLoader.php
@@ -185,7 +185,7 @@ public function findFile($class)
         foreach ($this->prefixes as $prefix => $dirs) {
             if (0 === strpos($class, $prefix)) {
                 foreach ($dirs as $dir) {
-                    if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
+                    if (is_file($dir . DIRECTORY_SEPARATOR . $classPath)) {
                         return $dir . DIRECTORY_SEPARATOR . $classPath;
                     }
                 }
@@ -193,7 +193,7 @@ public function findFile($class)
         }
 
         foreach ($this->fallbackDirs as $dir) {
-            if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
+            if (is_file($dir . DIRECTORY_SEPARATOR . $classPath)) {
                 return $dir . DIRECTORY_SEPARATOR . $classPath;
             }
         }
diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationRegistry.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationRegistry.php
index dfa846a..6135f53 100644
--- a/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationRegistry.php
+++ b/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationRegistry.php
@@ -120,7 +120,7 @@ static public function loadAnnotationClass($class)
                     }
                 } else {
                     foreach((array)$dirs AS $dir) {
-                        if (file_exists($dir . DIRECTORY_SEPARATOR . $file)) {
+                        if (is_file($dir . DIRECTORY_SEPARATOR . $file)) {
                             require $dir . DIRECTORY_SEPARATOR . $file;
                             return true;
                         }
diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/FileCacheReader.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/FileCacheReader.php
index 3934861..6609932 100644
--- a/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/FileCacheReader.php
+++ b/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/FileCacheReader.php
@@ -86,7 +86,7 @@ public function getClassAnnotations(\ReflectionClass $class)
         }
 
         $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php';
-        if (!file_exists($path)) {
+        if (!is_file($path)) {
             $annot = $this->reader->getClassAnnotations($class);
             $this->saveCacheFile($path, $annot);
             return $this->loadedAnnotations[$key] = $annot;
@@ -121,7 +121,7 @@ public function getPropertyAnnotations(\ReflectionProperty $property)
         }
 
         $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php';
-        if (!file_exists($path)) {
+        if (!is_file($path)) {
             $annot = $this->reader->getPropertyAnnotations($property);
             $this->saveCacheFile($path, $annot);
             return $this->loadedAnnotations[$key] = $annot;
@@ -156,7 +156,7 @@ public function getMethodAnnotations(\ReflectionMethod $method)
         }
 
         $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php';
-        if (!file_exists($path)) {
+        if (!is_file($path)) {
             $annot = $this->reader->getMethodAnnotations($method);
             $this->saveCacheFile($path, $annot);
             return $this->loadedAnnotations[$key] = $annot;
diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/FileCache.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/FileCache.php
index da650b4..703cb76 100644
--- a/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/FileCache.php
+++ b/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/FileCache.php
@@ -129,4 +129,4 @@ protected function doGetStats()
     {
         return null;
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/FilesystemCache.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/FilesystemCache.php
index a27a717..89cd03d 100644
--- a/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/FilesystemCache.php
+++ b/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/FilesystemCache.php
@@ -44,7 +44,7 @@ protected function doFetch($id)
         $lifetime = -1;
         $filename = $this->getFilename($id);
 
-        if ( ! file_exists($filename)) {
+        if ( ! is_file($filename)) {
             return false;
         }
 
@@ -77,7 +77,7 @@ protected function doContains($id)
         $lifetime = -1;
         $filename = $this->getFilename($id);
 
-        if ( ! file_exists($filename)) {
+        if ( ! is_file($filename)) {
             return false;
         }
 
@@ -111,4 +111,4 @@ protected function doSave($id, $data, $lifeTime = 0)
 
         return file_put_contents($filename, $lifeTime . PHP_EOL . $data);
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/PhpFileCache.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/PhpFileCache.php
index 0971cd9..1d69d3d 100644
--- a/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/PhpFileCache.php
+++ b/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/PhpFileCache.php
@@ -42,7 +42,7 @@ protected function doFetch($id)
     {
         $filename = $this->getFilename($id);
 
-        if ( ! file_exists($filename)) {
+        if ( ! is_file($filename)) {
             return false;
         }
 
@@ -62,7 +62,7 @@ protected function doContains($id)
     {
         $filename = $this->getFilename($id);
 
-        if ( ! file_exists($filename)) {
+        if ( ! is_file($filename)) {
             return false;
         }
 
diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php b/core/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php
index 45024e1..5d6995e 100644
--- a/core/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php
+++ b/core/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php
@@ -182,7 +182,7 @@ public function canLoadClass($className)
         $file = str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $className) . $this->fileExtension;
 
         if ($this->includePath !== null) {
-            return file_exists($this->includePath . DIRECTORY_SEPARATOR . $file);
+            return is_file($this->includePath . DIRECTORY_SEPARATOR . $file);
         }
 
         return (false !== stream_resolve_include_path($file));
diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php
index 0d61174..c278c7f 100644
--- a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php
+++ b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php
@@ -109,7 +109,7 @@ public function findMappingFile($className)
 
         // Check whether file exists
         foreach ($this->paths as $path) {
-            if (file_exists($path . DIRECTORY_SEPARATOR . $fileName)) {
+            if (is_file($path . DIRECTORY_SEPARATOR . $fileName)) {
                 return $path . DIRECTORY_SEPARATOR . $fileName;
             }
         }
@@ -160,7 +160,7 @@ public function fileExists($className)
 
         // Check whether file exists
         foreach ((array) $this->paths as $path) {
-            if (file_exists($path . DIRECTORY_SEPARATOR . $fileName)) {
+            if (is_file($path . DIRECTORY_SEPARATOR . $fileName)) {
                 return true;
             }
         }
diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/Psr0FindFile.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/Psr0FindFile.php
index b6a5fd1..d29bbc5 100644
--- a/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/Psr0FindFile.php
+++ b/core/vendor/doctrine/common/lib/Doctrine/Common/Reflection/Psr0FindFile.php
@@ -73,7 +73,7 @@ public function findFile($class)
         foreach ($this->prefixes as $prefix => $dirs) {
             if (0 === strpos($class, $prefix)) {
                 foreach ($dirs as $dir) {
-                    if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
+                    if (is_file($dir . DIRECTORY_SEPARATOR . $classPath)) {
                         return $dir . DIRECTORY_SEPARATOR . $classPath;
                     }
                 }
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/AnnotationReaderTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/AnnotationReaderTest.php
index d2cc667..7d00d1e 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/AnnotationReaderTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/AnnotationReaderTest.php
@@ -10,4 +10,4 @@ protected function getReader()
     {
         return new AnnotationReader();
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/CachedReaderTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/CachedReaderTest.php
index 5dd89f7..72de138 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/CachedReaderTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/CachedReaderTest.php
@@ -53,4 +53,4 @@ protected function getReader()
         $this->cache = new ArrayCache();
         return new CachedReader(new AnnotationReader(), $this->cache);
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/DocLexerTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/DocLexerTest.php
index 03a55c8..93991ab 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/DocLexerTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/DocLexerTest.php
@@ -134,4 +134,4 @@ public function testScannerTokenizesDocBlockWhitInvalidIdentifier()
         $this->assertFalse($lexer->moveNext());
     }
 
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/FileCacheReaderTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/FileCacheReaderTest.php
index c84344d..4e5e724 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/FileCacheReaderTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/FileCacheReaderTest.php
@@ -37,4 +37,4 @@ public function testAttemptToCreateAnnotationCacheDir()
 
         $this->assertTrue(is_dir($this->cacheDir));
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/AnnotWithDefaultValue.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/AnnotWithDefaultValue.php
index 44108e1..965a8f5 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/AnnotWithDefaultValue.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/AnnotWithDefaultValue.php
@@ -7,4 +7,4 @@ class AnnotWithDefaultValue
 {
     /** @var string */
     public $foo = 'bar';
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Autoload.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Autoload.php
index e2a4cad..4142816 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Autoload.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Autoload.php
@@ -7,4 +7,4 @@
  */
 class Autoload
 {
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Route.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Route.php
index eb1bdee..b09c299 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Route.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Route.php
@@ -8,4 +8,4 @@ class Route
     /** @var string @Required */
     public $pattern;
     public $name;
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Secure.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Secure.php
index 332544f..7d7ff57 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Secure.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Secure.php
@@ -15,4 +15,4 @@ public function __construct(array $values)
 
         $this->roles = $values['value'];
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Template.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Template.php
index b507e60..e111b24 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Template.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Template.php
@@ -11,4 +11,4 @@ public function __construct(array $values)
     {
         $this->name = isset($values['value']) ? $values['value'] : null;
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetAll.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetAll.php
index f1c7746..82a6d84 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetAll.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetAll.php
@@ -11,4 +11,4 @@ class AnnotationTargetAll
     public $data;
     public $name;
     public $target;
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetAnnotation.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetAnnotation.php
index 9ee1b40..2865c9d 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetAnnotation.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetAnnotation.php
@@ -11,4 +11,4 @@
     public $data;
     public $name;
     public $target;
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetClass.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetClass.php
index 5e5d19e..2d1651c 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetClass.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetClass.php
@@ -12,4 +12,4 @@
     public $data;
     public $name;
     public $target;
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetMethod.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetMethod.php
index 2ab066c..9fa190b 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetMethod.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetMethod.php
@@ -12,4 +12,4 @@
     public $data;
     public $name;
     public $target;
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetPropertyMethod.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetPropertyMethod.php
index f714561..a043be2 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetPropertyMethod.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationTargetPropertyMethod.php
@@ -11,4 +11,4 @@
     public $data;
     public $name;
     public $target;
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithAttributes.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithAttributes.php
index def24d3..9d7a944 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithAttributes.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithAttributes.php
@@ -116,4 +116,4 @@ public function getArrayOfAnnotations()
         return $this->arrayOfAnnotations;
     }
 
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithConstants.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithConstants.php
index 9c94558..6ea50bc 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithConstants.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithConstants.php
@@ -17,4 +17,4 @@
      * @var mixed
      */
     public $value;
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithRequiredAttributes.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithRequiredAttributes.php
index 6eb1bc5..4fc24d0 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithRequiredAttributes.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithRequiredAttributes.php
@@ -47,4 +47,4 @@ public function getAnnot()
         return $this->annot;
     }
 
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithRequiredAttributesWithoutContructor.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithRequiredAttributesWithoutContructor.php
index bf458ee..f4bd95b 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithRequiredAttributesWithoutContructor.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithRequiredAttributesWithoutContructor.php
@@ -21,4 +21,4 @@
      */
     public $annot;
 
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithTargetSyntaxError.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithTargetSyntaxError.php
index 7638ce8..ecfc842 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithTargetSyntaxError.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithTargetSyntaxError.php
@@ -8,4 +8,4 @@
  */
 final class AnnotationWithTargetSyntaxError
 {
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithVarType.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithVarType.php
index f870600..d97c97b 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithVarType.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithVarType.php
@@ -59,4 +59,4 @@
      */
     public $arrayOfAnnotations;
 
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassDDC1660.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassDDC1660.php
index 4e652e1..5e0979f 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassDDC1660.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassDDC1660.php
@@ -27,4 +27,4 @@ public function bar($param)
         return null;
     }
 
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithAnnotationWithTargetSyntaxError.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithAnnotationWithTargetSyntaxError.php
index 6fd3168..b59a023 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithAnnotationWithTargetSyntaxError.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithAnnotationWithTargetSyntaxError.php
@@ -18,4 +18,4 @@ class ClassWithAnnotationWithTargetSyntaxError
      * @AnnotationWithTargetSyntaxError()
      */
     public function bar(){}
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithAnnotationWithVarType.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithAnnotationWithVarType.php
index ed467db..554ad76 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithAnnotationWithVarType.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithAnnotationWithVarType.php
@@ -28,4 +28,4 @@ public function bar(){}
      * @AnnotationWithVarType(annotation = @AnnotationTargetAnnotation)
      */
     public function invalidMethod(){}
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithClosure.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithClosure.php
index 4629507..31e2bb4 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithClosure.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithClosure.php
@@ -49,4 +49,4 @@ public function getEventsForDate($year, $month, $day){
         return $extractEvents;
     }
 
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithConstants.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithConstants.php
index 055e245..2ca8f41 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithConstants.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithConstants.php
@@ -7,4 +7,4 @@ class ClassWithConstants
 
     const SOME_VALUE = 'ClassWithConstants.SOME_VALUE';
     const SOME_KEY   = 'ClassWithConstants.SOME_KEY';
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithFullyQualifiedUseStatements.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithFullyQualifiedUseStatements.php
index ddb207b..a7f78ae 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithFullyQualifiedUseStatements.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithFullyQualifiedUseStatements.php
@@ -8,4 +8,4 @@
 ;
 use \Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Template;
 
-class ClassWithFullyQualifiedUseStatements {}
\ No newline at end of file
+class ClassWithFullyQualifiedUseStatements {}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithInvalidAnnotationTargetAtClass.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithInvalidAnnotationTargetAtClass.php
index f8d961c..14be4ff 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithInvalidAnnotationTargetAtClass.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithInvalidAnnotationTargetAtClass.php
@@ -14,4 +14,4 @@ class ClassWithInvalidAnnotationTargetAtClass
      * @AnnotationTargetPropertyMethod("Bar")
      */
     public $foo;
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithInvalidAnnotationTargetAtMethod.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithInvalidAnnotationTargetAtMethod.php
index ea63480..094b861 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithInvalidAnnotationTargetAtMethod.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithInvalidAnnotationTargetAtMethod.php
@@ -17,4 +17,4 @@ public function functionName($param)
     {
 
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithInvalidAnnotationTargetAtProperty.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithInvalidAnnotationTargetAtProperty.php
index 80befcf..e65adf7 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithInvalidAnnotationTargetAtProperty.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithInvalidAnnotationTargetAtProperty.php
@@ -21,4 +21,4 @@ class ClassWithInvalidAnnotationTargetAtProperty
      * @AnnotationTargetAnnotation("Foo")
      */
     public $bar;
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithValidAnnotationTarget.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithValidAnnotationTarget.php
index ada7838..7d94452 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithValidAnnotationTarget.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithValidAnnotationTarget.php
@@ -38,4 +38,4 @@ public function someFunction()
      */
     public $nested;
 
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Controller.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Controller.php
index 8532064..45740ff 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Controller.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/Controller.php
@@ -297,4 +297,4 @@ private function updateAces(\SplObjectStorage $aces)
             $this->connection->executeQuery($this->getUpdateAccessControlEntrySql($ace->getId(), $sets));
         }
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/DifferentNamespacesPerFileWithClassAsFirst.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/DifferentNamespacesPerFileWithClassAsFirst.php
index bda2cc2..8a96301 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/DifferentNamespacesPerFileWithClassAsFirst.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/DifferentNamespacesPerFileWithClassAsFirst.php
@@ -12,4 +12,4 @@ class DifferentNamespacesPerFileWithClassAsFirst {}
 
 namespace Doctrine\Tests\Common\Annotations\Fixtures\Foo {
     use Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Template;
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/DifferentNamespacesPerFileWithClassAsLast.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/DifferentNamespacesPerFileWithClassAsLast.php
index aff3146..4c5f5a8 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/DifferentNamespacesPerFileWithClassAsLast.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/DifferentNamespacesPerFileWithClassAsLast.php
@@ -12,4 +12,4 @@
     use Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Template;
 
     class DifferentNamespacesPerFileWithClassAsLast {}
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/EqualNamespacesPerFileWithClassAsFirst.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/EqualNamespacesPerFileWithClassAsFirst.php
index 3484bf8..8c0fec8 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/EqualNamespacesPerFileWithClassAsFirst.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/EqualNamespacesPerFileWithClassAsFirst.php
@@ -10,4 +10,4 @@ class EqualNamespacesPerFileWithClassAsFirst {}
 
 namespace Doctrine\Tests\Common\Annotations\Fixtures;
 
-use Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Template;
\ No newline at end of file
+use Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Template;
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/EqualNamespacesPerFileWithClassAsLast.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/EqualNamespacesPerFileWithClassAsLast.php
index 87f1dbf..af6d897 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/EqualNamespacesPerFileWithClassAsLast.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/EqualNamespacesPerFileWithClassAsLast.php
@@ -9,4 +9,4 @@
 use Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Route;
 use Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Template;
 
-class EqualNamespacesPerFileWithClassAsLast {}
\ No newline at end of file
+class EqualNamespacesPerFileWithClassAsLast {}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/GlobalNamespacesPerFileWithClassAsFirst.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/GlobalNamespacesPerFileWithClassAsFirst.php
index b2c5d5c..1ee11b8 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/GlobalNamespacesPerFileWithClassAsFirst.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/GlobalNamespacesPerFileWithClassAsFirst.php
@@ -9,4 +9,4 @@ class GlobalNamespacesPerFileWithClassAsFirst {}
 
 namespace {
 	use Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Template;
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/GlobalNamespacesPerFileWithClassAsLast.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/GlobalNamespacesPerFileWithClassAsLast.php
index 6b600ff..195c124 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/GlobalNamespacesPerFileWithClassAsLast.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/GlobalNamespacesPerFileWithClassAsLast.php
@@ -9,4 +9,4 @@
 	use Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Template;
 
 	class GlobalNamespacesPerFileWithClassAsLast {}
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/IntefaceWithConstants.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/IntefaceWithConstants.php
index d375b20..af7ddbb 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/IntefaceWithConstants.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/IntefaceWithConstants.php
@@ -7,4 +7,4 @@
 
     const SOME_VALUE = 'IntefaceWithConstants.SOME_VALUE';
     const SOME_KEY   = 'IntefaceWithConstants.SOME_KEY';
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/InvalidAnnotationUsageButIgnoredClass.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/InvalidAnnotationUsageButIgnoredClass.php
index 6fa0d51..8b964e7 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/InvalidAnnotationUsageButIgnoredClass.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/InvalidAnnotationUsageButIgnoredClass.php
@@ -11,4 +11,4 @@
  */
 class InvalidAnnotationUsageButIgnoredClass
 {
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/InvalidAnnotationUsageClass.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/InvalidAnnotationUsageClass.php
index cf3fc02..03e39d8 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/InvalidAnnotationUsageClass.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/InvalidAnnotationUsageClass.php
@@ -7,4 +7,4 @@
  */
 class InvalidAnnotationUsageClass
 {
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/MultipleImportsInUseStatement.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/MultipleImportsInUseStatement.php
index 38c954a..29e357f 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/MultipleImportsInUseStatement.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/MultipleImportsInUseStatement.php
@@ -7,4 +7,4 @@
     Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Secure
 ;
 
-class MultipleImportsInUseStatement {}
\ No newline at end of file
+class MultipleImportsInUseStatement {}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NamespaceAndClassCommentedOut.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NamespaceAndClassCommentedOut.php
index 9909e31..378a760 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NamespaceAndClassCommentedOut.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NamespaceAndClassCommentedOut.php
@@ -17,4 +17,4 @@
     use Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Template;
 
     class NamespaceAndClassCommentedOut {}
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NamespaceWithClosureDeclaration.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NamespaceWithClosureDeclaration.php
index 4cffe46..4c0e907 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NamespaceWithClosureDeclaration.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NamespaceWithClosureDeclaration.php
@@ -12,4 +12,4 @@ function () use ($var) {};
 $var = 1;
 function () use ($var) {};
 
-class NamespaceWithClosureDeclaration {}
\ No newline at end of file
+class NamespaceWithClosureDeclaration {}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NamespacedSingleClassLOC1000.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NamespacedSingleClassLOC1000.php
index 5e16dd0..6b6b39b 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NamespacedSingleClassLOC1000.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NamespacedSingleClassLOC1000.php
@@ -1006,4 +1006,4 @@ public function test39()
 
         return $val;
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NoAnnotation.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NoAnnotation.php
index 1dae104..7ff27f9 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NoAnnotation.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NoAnnotation.php
@@ -2,4 +2,4 @@
 
 namespace Doctrine\Tests\Common\Annotations\Fixtures;
 
-class NoAnnotation {}
\ No newline at end of file
+class NoAnnotation {}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NonNamespacedClass.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NonNamespacedClass.php
index c373843..c35eb979 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NonNamespacedClass.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/NonNamespacedClass.php
@@ -7,4 +7,4 @@
  * @Route("foo")
  * @Template
  */
-class AnnotationsTestsFixturesNonNamespacedClass { }
\ No newline at end of file
+class AnnotationsTestsFixturesNonNamespacedClass { }
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/SingleClassLOC1000.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/SingleClassLOC1000.php
index 134adbc..233a316 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/SingleClassLOC1000.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/SingleClassLOC1000.php
@@ -1003,4 +1003,4 @@ public function test39()
 
         return $val;
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/TestInterface.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/TestInterface.php
index 58c5e6a..e86f6e0 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/TestInterface.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Fixtures/TestInterface.php
@@ -10,4 +10,4 @@
      * @Secure
      */
     function foo();
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/PerformanceTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/PerformanceTest.php
index c7778b2..652c2c0 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/PerformanceTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/PerformanceTest.php
@@ -191,4 +191,4 @@ private function printResults($test, $time, $iterations)
         echo $iterationTime;
         echo str_repeat('-', $max)."\n";
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/PhpParserTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/PhpParserTest.php
index cf81116..bfc9791 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/PhpParserTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/PhpParserTest.php
@@ -191,4 +191,4 @@ public function testClassWithClosure()
           'annotationtargetannotation'  => __NAMESPACE__ . '\Fixtures\AnnotationTargetAnnotation',
         ), $parser->parseClass($class));
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/SimpleAnnotationReaderTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/SimpleAnnotationReaderTest.php
index 376539f..35cc38b 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/SimpleAnnotationReaderTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/SimpleAnnotationReaderTest.php
@@ -94,4 +94,4 @@ protected function getReader()
 
         return $reader;
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM55Test.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM55Test.php
index a7b9e2f..170b67b 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM55Test.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM55Test.php
@@ -62,4 +62,4 @@ class DCOM55Annotation
 class DCOM55Consumer
 {
 
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/ApcCacheTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/ApcCacheTest.php
index df81262..7bbf6da 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/ApcCacheTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/ApcCacheTest.php
@@ -17,4 +17,4 @@ protected function _getCacheDriver()
     {
         return new ApcCache();
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/ArrayCacheTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/ArrayCacheTest.php
index 6cad891..c7b745b 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/ArrayCacheTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/ArrayCacheTest.php
@@ -18,4 +18,4 @@ public function testGetStats()
 
         $this->assertNull($stats);
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/FilesystemCacheTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/FilesystemCacheTest.php
index f782e3c..3f001d5 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/FilesystemCacheTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/FilesystemCacheTest.php
@@ -94,4 +94,4 @@ public function tearDown()
         }
     }
 
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/WinCacheCacheTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/WinCacheCacheTest.php
index cb363df..1d6760f 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/WinCacheCacheTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/WinCacheCacheTest.php
@@ -17,4 +17,4 @@ protected function _getCacheDriver()
     {
         return new WincacheCache();
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/XcacheCacheTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/XcacheCacheTest.php
index 6259848..f05eed9 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/XcacheCacheTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/XcacheCacheTest.php
@@ -17,4 +17,4 @@ protected function _getCacheDriver()
     {
         return new XcacheCache();
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/ZendDataCacheTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/ZendDataCacheTest.php
index cd66e15..0d2b4ed 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/ZendDataCacheTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/ZendDataCacheTest.php
@@ -25,4 +25,4 @@ protected function _getCacheDriver()
     {
         return new ZendDataCache();
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest/ClassA.class.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest/ClassA.class.php
index 8554654..1042036 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest/ClassA.class.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest/ClassA.class.php
@@ -3,4 +3,4 @@
 class ClassLoaderTest_ClassA
 {
 
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest/ClassB.class.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest/ClassB.class.php
index 5afcbeb..16ffc00 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest/ClassB.class.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest/ClassB.class.php
@@ -3,4 +3,4 @@
 class ClassLoaderTest_ClassB
 {
 
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest/ClassC.class.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest/ClassC.class.php
index 0548118..abc5437 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest/ClassC.class.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest/ClassC.class.php
@@ -3,4 +3,4 @@
 class ClassLoaderTest_ClassC
 {
 
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/EventManagerTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/EventManagerTest.php
index 2b11b20..e186fff 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/EventManagerTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/EventManagerTest.php
@@ -85,4 +85,4 @@ public function getSubscribedEvents()
     {
         return array('preFoo', 'postFoo');
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/ChainDriverTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/ChainDriverTest.php
index 66ad762..27790bb 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/ChainDriverTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/ChainDriverTest.php
@@ -127,4 +127,4 @@ public function testDefaultDriver()
 class DriverChainEntity
 {
 
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/FileDriverTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/FileDriverTest.php
index 020c242..a46cc6d 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/FileDriverTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/FileDriverTest.php
@@ -139,4 +139,4 @@ public function loadMetadataForClass($className, ClassMetadata $metadata)
     {
 
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/PHPDriverTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/PHPDriverTest.php
index 8fc4d80..ad9405f 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/PHPDriverTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/PHPDriverTest.php
@@ -15,4 +15,4 @@ public function testLoadMetadata()
         $driver = new PHPDriver(array(__DIR__ . "/_files"));
         $driver->loadMetadataForClass('TestEntity', $metadata);
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/StaticPHPDriverTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/StaticPHPDriverTest.php
index 9f1c568..ed3be2f 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/StaticPHPDriverTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/StaticPHPDriverTest.php
@@ -32,4 +32,4 @@ static public function loadMetadata($metadata)
     {
         $metadata->getFieldNames();
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/_files/TestEntity.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/_files/TestEntity.php
index d0e9976..b1d3654 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/_files/TestEntity.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/_files/TestEntity.php
@@ -1,3 +1,3 @@
 <?php
 
-$metadata->getFieldNames();
\ No newline at end of file
+$metadata->getFieldNames();
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/DoctrineTestCase.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/DoctrineTestCase.php
index e8323d2..e5ce27a 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/DoctrineTestCase.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/DoctrineTestCase.php
@@ -7,4 +7,4 @@
  */
 abstract class DoctrineTestCase extends \PHPUnit_Framework_TestCase
 {
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/TestInit.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/TestInit.php
index e7ab51f..8fa5fe8 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/TestInit.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/TestInit.php
@@ -11,14 +11,14 @@
 {
     if (0 === strpos($class, 'Doctrine\Tests\\')) {
         $path = __DIR__.'/../../'.strtr($class, '\\', '/').'.php';
-        if (file_exists($path) && is_readable($path)) {
+        if (is_file($path) && is_readable($path)) {
             require_once $path;
 
             return true;
         }
     } else if (0 === strpos($class, 'Doctrine\Common\\')) {
         $path = __DIR__.'/../../../lib/'.($class = strtr($class, '\\', '/')).'.php';
-        if (file_exists($path) && is_readable($path)) {
+        if (is_file($path) && is_readable($path)) {
             require_once $path;
 
             return true;
diff --git a/core/vendor/doctrine/common/tests/NativePhpunitTask.php b/core/vendor/doctrine/common/tests/NativePhpunitTask.php
index 50fd1c3..f21a6f9 100644
--- a/core/vendor/doctrine/common/tests/NativePhpunitTask.php
+++ b/core/vendor/doctrine/common/tests/NativePhpunitTask.php
@@ -124,7 +124,7 @@ public function main()
                 "failures (".$result->skippedCount()." skipped, ".$result->notImplementedCount()." not implemented)");
 
             // Hudson for example doesn't like the backslash in class names
-            if (file_exists($this->coverageClover)) {
+            if (is_file($this->coverageClover)) {
                 $this->log("Generated Clover Coverage XML to: ".$this->coverageClover);
                 $content = file_get_contents($this->coverageClover);
                 $content = str_replace("\\", ".", $content);
diff --git a/core/vendor/guzzle/http/Guzzle/Http/EntityBody.php b/core/vendor/guzzle/http/Guzzle/Http/EntityBody.php
index f9abbf9..77b4f85 100644
--- a/core/vendor/guzzle/http/Guzzle/Http/EntityBody.php
+++ b/core/vendor/guzzle/http/Guzzle/Http/EntityBody.php
@@ -140,7 +140,7 @@ public function getContentLength()
      */
     public function getContentType()
     {
-        if (!($this->isLocal() && $this->getWrapper() == 'plainfile' && file_exists($this->getUri()))) {
+        if (!($this->isLocal() && $this->getWrapper() == 'plainfile' && is_file($this->getUri()))) {
             return 'application/octet-stream';
         }
 
diff --git a/core/vendor/guzzle/stream/Guzzle/Stream/Stream.php b/core/vendor/guzzle/stream/Guzzle/Stream/Stream.php
index 3b8b364..cf82641 100644
--- a/core/vendor/guzzle/stream/Guzzle/Stream/Stream.php
+++ b/core/vendor/guzzle/stream/Guzzle/Stream/Stream.php
@@ -189,7 +189,7 @@ public function getSize()
         }
 
         // If the stream is a file based stream and local, then check the filesize
-        if ($this->isLocal() && $this->getWrapper() == 'plainfile' && $this->getUri() && file_exists($this->getUri())) {
+        if ($this->isLocal() && $this->getWrapper() == 'plainfile' && $this->getUri() && is_file($this->getUri())) {
             return filesize($this->getUri());
         }
 
diff --git a/core/vendor/kriswallsmith/assetic/src/Assetic/Cache/ConfigCache.php b/core/vendor/kriswallsmith/assetic/src/Assetic/Cache/ConfigCache.php
index de60c9e..ef519ce 100644
--- a/core/vendor/kriswallsmith/assetic/src/Assetic/Cache/ConfigCache.php
+++ b/core/vendor/kriswallsmith/assetic/src/Assetic/Cache/ConfigCache.php
@@ -39,7 +39,7 @@ public function __construct($dir)
      */
     public function has($resource)
     {
-        return file_exists($this->getSourcePath($resource));
+        return is_file($this->getSourcePath($resource));
     }
 
     /**
@@ -76,7 +76,7 @@ public function get($resource)
     {
         $path = $this->getSourcePath($resource);
 
-        if (!file_exists($path)) {
+        if (!is_file($path)) {
             throw new \RuntimeException('There is no cached value for '.$resource);
         }
 
@@ -94,7 +94,7 @@ public function getTimestamp($resource)
     {
         $path = $this->getSourcePath($resource);
 
-        if (!file_exists($path)) {
+        if (!is_file($path)) {
             throw new \RuntimeException('There is no cached value for '.$resource);
         }
 
diff --git a/core/vendor/kriswallsmith/assetic/src/Assetic/Cache/FilesystemCache.php b/core/vendor/kriswallsmith/assetic/src/Assetic/Cache/FilesystemCache.php
index 45cfbdb..6c0343b 100644
--- a/core/vendor/kriswallsmith/assetic/src/Assetic/Cache/FilesystemCache.php
+++ b/core/vendor/kriswallsmith/assetic/src/Assetic/Cache/FilesystemCache.php
@@ -27,14 +27,14 @@ public function __construct($dir)
 
     public function has($key)
     {
-        return file_exists($this->dir.'/'.$key);
+        return is_file($this->dir.'/'.$key);
     }
 
     public function get($key)
     {
         $path = $this->dir.'/'.$key;
 
-        if (!file_exists($path)) {
+        if (!is_file($path)) {
             throw new \RuntimeException('There is no cached value for '.$key);
         }
 
@@ -58,7 +58,7 @@ public function remove($key)
     {
         $path = $this->dir.'/'.$key;
 
-        if (file_exists($path) && false === @unlink($path)) {
+        if (is_file($path) && false === @unlink($path)) {
             throw new \RuntimeException('Unable to remove file '.$path);
         }
     }
diff --git a/core/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/FileResource.php b/core/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/FileResource.php
index 1486f3e..76790fe 100644
--- a/core/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/FileResource.php
+++ b/core/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/FileResource.php
@@ -32,12 +32,12 @@ public function __construct($path)
 
     public function isFresh($timestamp)
     {
-        return file_exists($this->path) && filemtime($this->path) <= $timestamp;
+        return is_file($this->path) && filemtime($this->path) <= $timestamp;
     }
 
     public function getContent()
     {
-        return file_exists($this->path) ? file_get_contents($this->path) : '';
+        return is_file($this->path) ? file_get_contents($this->path) : '';
     }
 
     public function __toString()
diff --git a/core/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssImportFilter.php b/core/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssImportFilter.php
index 7e5c737..ea16cb0 100644
--- a/core/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssImportFilter.php
+++ b/core/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssImportFilter.php
@@ -77,7 +77,7 @@ public function filterLoad(AssetInterface $asset)
             $importSource = $importRoot.'/'.$importPath;
             if (false !== strpos($importSource, '://') || 0 === strpos($importSource, '//')) {
                 $import = new HttpAsset($importSource, array($importFilter), true);
-            } elseif (!file_exists($importSource)) {
+            } elseif (!is_file($importSource)) {
                 // ignore not found imports
                 return $matches[0];
             } else {
diff --git a/core/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJsFilter.php b/core/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJsFilter.php
index 07724ca..a5a774a 100644
--- a/core/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJsFilter.php
+++ b/core/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJsFilter.php
@@ -115,7 +115,7 @@ public function filterDump(AssetInterface $asset)
         unlink($input);
 
         if (0 < $code) {
-            if (file_exists($output)) {
+            if (is_file($output)) {
                 unlink($output);
             }
 
@@ -124,7 +124,7 @@ public function filterDump(AssetInterface $asset)
             }
 
             throw FilterException::fromProcess($proc)->setInput($asset->getContent());
-        } elseif (!file_exists($output)) {
+        } elseif (!is_file($output)) {
             throw new \RuntimeException('Error creating output file.');
         }
 
diff --git a/core/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php b/core/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php
index 920987a..c510799 100644
--- a/core/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php
+++ b/core/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php
@@ -90,12 +90,12 @@ protected function compress($content, $type, $options = array())
         unlink($input);
 
         if (0 < $code) {
-            if (file_exists($output)) {
+            if (is_file($output)) {
                 unlink($output);
             }
 
             throw FilterException::fromProcess($proc)->setInput($content);
-        } elseif (!file_exists($output)) {
+        } elseif (!is_file($output)) {
             throw new \RuntimeException('Error creating output file.');
         }
 
diff --git a/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Filter/BaseImageFilterTest.php b/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Filter/BaseImageFilterTest.php
index 7833259..6ae06fe 100644
--- a/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Filter/BaseImageFilterTest.php
+++ b/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Filter/BaseImageFilterTest.php
@@ -17,7 +17,7 @@ public static function assertMimeType($expected, $data, $message = null)
     {
         $finfo = new \finfo(FILEINFO_MIME_TYPE);
 
-        $actual = file_exists($data) ? $finfo->file($data) : $finfo->buffer($data);
+        $actual = is_file($data) ? $finfo->file($data) : $finfo->buffer($data);
 
         self::assertEquals($expected, $actual, $message);
     }
diff --git a/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/ChainedRouterInterface.php b/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/ChainedRouterInterface.php
index a4247aa..df8c32c 100644
--- a/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/ChainedRouterInterface.php
+++ b/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/ChainedRouterInterface.php
@@ -22,4 +22,4 @@
      * @return bool
      */
     public function supports($name);
-}
\ No newline at end of file
+}
diff --git a/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/ContentRepositoryInterface.php b/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/ContentRepositoryInterface.php
index 415cd7d..6ede6e9 100644
--- a/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/ContentRepositoryInterface.php
+++ b/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/ContentRepositoryInterface.php
@@ -24,4 +24,4 @@
      * @return object A content that matches this id.
      */
     public function findById($id);
-}
\ No newline at end of file
+}
diff --git a/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Enhancer/RouteContentEnhancerTest.php b/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Enhancer/RouteContentEnhancerTest.php
index df9008a..00166f7 100644
--- a/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Enhancer/RouteContentEnhancerTest.php
+++ b/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Enhancer/RouteContentEnhancerTest.php
@@ -75,4 +75,4 @@ class TargetDocument
 
 class UnknownDocument
 {
-}
\ No newline at end of file
+}
diff --git a/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Enhancer/RouteObject.php b/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Enhancer/RouteObject.php
index 6109339..86a2173 100644
--- a/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Enhancer/RouteObject.php
+++ b/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Enhancer/RouteObject.php
@@ -15,4 +15,4 @@ public function getRouteKey()
     {
         return null;
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Routing/ChainRouterTest.php b/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Routing/ChainRouterTest.php
index d76c1f9..3552289 100644
--- a/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Routing/ChainRouterTest.php
+++ b/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Routing/ChainRouterTest.php
@@ -614,4 +614,4 @@ protected function createRouterMocks()
 
 abstract class RequestMatcher implements \Symfony\Component\Routing\RouterInterface, \Symfony\Component\Routing\Matcher\RequestMatcherInterface
 {
-}
\ No newline at end of file
+}
diff --git a/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Routing/ContentAwareGeneratorTest.php b/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Routing/ContentAwareGeneratorTest.php
index 6ddf3c7..08ad30e 100644
--- a/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Routing/ContentAwareGeneratorTest.php
+++ b/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Routing/ContentAwareGeneratorTest.php
@@ -282,4 +282,4 @@ protected function doGenerate($variables, $defaults, $requirements, $tokens, $pa
     {
         return 'result_url';
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Routing/RouteMock.php b/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Routing/RouteMock.php
index e028d2c..d2f71b6 100644
--- a/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Routing/RouteMock.php
+++ b/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/Routing/RouteMock.php
@@ -36,4 +36,4 @@ public function getRouteKey()
     {
         return null;
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/bootstrap.php b/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/bootstrap.php
index cd9b88e..c2b5fe7 100644
--- a/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/bootstrap.php
+++ b/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/Tests/bootstrap.php
@@ -1,7 +1,7 @@
 <?php
 
 $file = __DIR__.'/../vendor/autoload.php';
-if (!file_exists($file)) {
+if (!is_file($file)) {
     throw new RuntimeException('Install dependencies to run test suite.');
 }
 
diff --git a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/ClassLoader.php b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/ClassLoader.php
index a2038a0..84e5f7a 100644
--- a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/ClassLoader.php
+++ b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/ClassLoader.php
@@ -183,7 +183,7 @@ public function findFile($class)
         foreach ($this->prefixes as $prefix => $dirs) {
             if (0 === strpos($class, $prefix)) {
                 foreach ($dirs as $dir) {
-                    if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
+                    if (is_file($dir . DIRECTORY_SEPARATOR . $classPath)) {
                         return $dir . DIRECTORY_SEPARATOR . $classPath;
                     }
                 }
@@ -191,7 +191,7 @@ public function findFile($class)
         }
 
         foreach ($this->fallbackDirs as $dir) {
-            if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
+            if (is_file($dir . DIRECTORY_SEPARATOR . $classPath)) {
                 return $dir . DIRECTORY_SEPARATOR . $classPath;
             }
         }
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/FileTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/FileTest.php
index b64d5f5..df8ec8f 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/FileTest.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/FileTest.php
@@ -65,8 +65,8 @@ public function testMove()
         $movedFile = $file->move($targetDir);
         $this->assertInstanceOf('Symfony\Component\HttpFoundation\File\File', $movedFile);
 
-        $this->assertTrue(file_exists($targetPath));
-        $this->assertFalse(file_exists($path));
+        $this->assertTrue(is_file($targetPath));
+        $this->assertFalse(is_file($path));
         $this->assertEquals(realpath($targetPath), $movedFile->getRealPath());
 
         @unlink($targetPath);
@@ -84,8 +84,8 @@ public function testMoveWithNewName()
         $file = new File($path);
         $movedFile = $file->move($targetDir, 'test.newname.gif');
 
-        $this->assertTrue(file_exists($targetPath));
-        $this->assertFalse(file_exists($path));
+        $this->assertTrue(is_file($targetPath));
+        $this->assertFalse(is_file($path));
         $this->assertEquals(realpath($targetPath), $movedFile->getRealPath());
 
         @unlink($targetPath);
@@ -119,8 +119,8 @@ public function testMoveWithNonLatinName($filename, $sanitizedFilename)
         $movedFile = $file->move($targetDir,$filename);
         $this->assertInstanceOf('Symfony\Component\HttpFoundation\File\File', $movedFile);
 
-        $this->assertTrue(file_exists($targetPath));
-        $this->assertFalse(file_exists($path));
+        $this->assertTrue(is_file($targetPath));
+        $this->assertFalse(is_file($path));
         $this->assertEquals(realpath($targetPath), $movedFile->getRealPath());
 
         @unlink($targetPath);
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php
index 7bf10a2..34cb9c1 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php
@@ -97,7 +97,7 @@ public function testGuessWithNonReadablePath()
     public static function tearDownAfterClass()
     {
         $path = __DIR__.'/../Fixtures/to_delete';
-        if (file_exists($path)) {
+        if (is_file($path)) {
             @chmod($path, 0666);
             @unlink($path);
         }
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php
index 94a075a..c87d801 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php
@@ -138,8 +138,8 @@ public function testMoveLocalFileIsAllowedInTestMode()
 
         $movedFile = $file->move(__DIR__.'/Fixtures/directory');
 
-        $this->assertTrue(file_exists($targetPath));
-        $this->assertFalse(file_exists($path));
+        $this->assertTrue(is_file($targetPath));
+        $this->assertFalse(is_file($path));
         $this->assertEquals(realpath($targetPath), $movedFile->getRealPath());
 
         @unlink($targetPath);
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/Store.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/Store.php
index 7173f44..79065ac 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/Store.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/Store.php
@@ -85,7 +85,7 @@ public function lock(Request $request)
             return true;
         }
 
-        return !file_exists($path) ?: $path;
+        return !is_file($path) ?: $path;
     }
 
     /**
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php
index 46440a3..742758c 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php
@@ -305,7 +305,7 @@ public function locateResource($name, $dir = null, $first = true)
         $files = array();
 
         foreach ($bundles as $bundle) {
-            if ($isResource && file_exists($file = $dir.'/'.$bundle->getName().$overridePath)) {
+            if ($isResource && is_file($file = $dir.'/'.$bundle->getName().$overridePath)) {
                 if (null !== $resourceBundle) {
                     throw new \RuntimeException(sprintf('"%s" resource is hidden by a resource from the "%s" derived bundle. Create a "%s" file to override the bundle resource.',
                         $file,
@@ -320,7 +320,7 @@ public function locateResource($name, $dir = null, $first = true)
                 $files[] = $file;
             }
 
-            if (file_exists($file = $bundle->getPath().'/'.$path)) {
+            if (is_file($file = $bundle->getPath().'/'.$path)) {
                 if ($first && !$isResource) {
                     return $file;
                 }
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php
index 41287c8..7294d79 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php
@@ -52,7 +52,7 @@ public function find($ip, $url, $limit, $method, $start = null, $end = null)
     {
         $file = $this->getIndexFilename();
 
-        if (!file_exists($file)) {
+        if (!is_file($file)) {
             return array();
         }
 
@@ -127,7 +127,7 @@ public function purge()
      */
     public function read($token)
     {
-        if (!$token || !file_exists($file = $this->getFilename($token))) {
+        if (!$token || !is_file($file = $this->getFilename($token))) {
             return null;
         }
 
@@ -271,7 +271,7 @@ protected function createProfileFromData($token, $data, $parent = null)
         }
 
         foreach ($data['children'] as $token) {
-            if (!$token || !file_exists($file = $this->getFilename($token))) {
+            if (!$token || !is_file($file = $this->getFilename($token))) {
                 continue;
             }
 
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerTest.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerTest.php
index f0ab05d..843cb60 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerTest.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerTest.php
@@ -32,7 +32,7 @@ public function testWriteCacheFileCreatesTheFile()
         $warmer = new TestCacheWarmer(self::$cacheFile);
         $warmer->warmUp(dirname(self::$cacheFile));
 
-        $this->assertTrue(file_exists(self::$cacheFile));
+        $this->assertTrue(is_file(self::$cacheFile));
     }
 
     /**
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php
index a10ae9b..7cd1756 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php
@@ -57,7 +57,7 @@ public function testConstruct()
     public function testHandleWithoutLogger($event, $event2)
     {
         // store the current error_log, and disable it temporarily
-        $errorLog = ini_set('error_log', file_exists('/dev/null') ? '/dev/null' : 'nul');
+        $errorLog = ini_set('error_log', is_file('/dev/null') ? '/dev/null' : 'nul');
 
         $l = new ExceptionListener('foo');
         $l->onKernelException($event);
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php
index e7d60cf..93712bc 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php
@@ -19,7 +19,7 @@ protected function getScript($request)
     {
         $script = parent::getScript($request);
 
-        $autoload = file_exists(__DIR__.'/../../vendor/autoload.php')
+        $autoload = is_file(__DIR__.'/../../vendor/autoload.php')
             ? __DIR__.'/../../vendor/autoload.php'
             : __DIR__.'/../../../../../../vendor/autoload.php'
         ;
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php
index 2a41531..9b0389a 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php
@@ -38,7 +38,7 @@ public function testCollect()
         $collector = new RequestDataCollector();
 
         $tmp = tempnam(sys_get_temp_dir(), 'sf2_profiler');
-        if (file_exists($tmp)) {
+        if (is_file($tmp)) {
             @unlink($tmp);
         }
         $storage = new SqliteProfilerStorage('sqlite:'.$tmp);
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/SqliteProfilerStorageTest.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/SqliteProfilerStorageTest.php
index 43546c1..29ea814 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/SqliteProfilerStorageTest.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/SqliteProfilerStorageTest.php
@@ -21,7 +21,7 @@ class SqliteProfilerStorageTest extends AbstractProfilerStorageTest
     public static function setUpBeforeClass()
     {
         self::$dbFile = tempnam(sys_get_temp_dir(), 'sf2_sqlite_storage');
-        if (file_exists(self::$dbFile)) {
+        if (is_file(self::$dbFile)) {
             @unlink(self::$dbFile);
         }
         self::$storage = new SqliteProfilerStorage('sqlite:'.self::$dbFile);
diff --git a/core/vendor/symfony/process/Symfony/Component/Process/Tests/bootstrap.php b/core/vendor/symfony/process/Symfony/Component/Process/Tests/bootstrap.php
index 11054b9..df0976f 100644
--- a/core/vendor/symfony/process/Symfony/Component/Process/Tests/bootstrap.php
+++ b/core/vendor/symfony/process/Symfony/Component/Process/Tests/bootstrap.php
@@ -11,7 +11,7 @@
 
 spl_autoload_register(function ($class) {
     if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Process')) {
-        if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Process')).'.php')) {
+        if (is_file($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Process')).'.php')) {
             require_once $file;
         }
     }
diff --git a/core/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php b/core/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php
index 8efc948..64b54c6 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php
@@ -9,7 +9,7 @@ class Twig_Tests_FileCachingTest extends PHPUnit_Framework_TestCase
     public function setUp()
     {
         $this->tmpDir = sys_get_temp_dir().'/TwigTests';
-        if (!file_exists($this->tmpDir)) {
+        if (!is_file($this->tmpDir)) {
             @mkdir($this->tmpDir, 0777, true);
         }
 
@@ -35,7 +35,7 @@ public function testWritingCacheFiles()
         $template = $this->env->loadTemplate($name);
         $cacheFileName = $this->env->getCacheFilename($name);
 
-        $this->assertTrue(file_exists($cacheFileName), 'Cache file does not exist.');
+        $this->assertTrue(is_file($cacheFileName), 'Cache file does not exist.');
         $this->fileName = $cacheFileName;
     }
 
@@ -45,9 +45,9 @@ public function testClearingCacheFiles()
         $template = $this->env->loadTemplate($name);
         $cacheFileName = $this->env->getCacheFilename($name);
 
-        $this->assertTrue(file_exists($cacheFileName), 'Cache file does not exist.');
+        $this->assertTrue(is_file($cacheFileName), 'Cache file does not exist.');
         $this->env->clearCacheFiles();
-        $this->assertFalse(file_exists($cacheFileName), 'Cache file was not cleared.');
+        $this->assertFalse(is_file($cacheFileName), 'Cache file was not cleared.');
     }
 
     private function removeDir($target)
diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php
index 8dbb5a7..64e6169 100644
--- a/sites/default/default.settings.php
+++ b/sites/default/default.settings.php
@@ -575,6 +575,6 @@
  *
  * Keep this code block at the end of this file to take full effect.
  */
-# if (file_exists(DRUPAL_ROOT . '/' . $conf_path . '/settings.local.php')) {
+# if (is_file(DRUPAL_ROOT . '/' . $conf_path . '/settings.local.php')) {
 #   include DRUPAL_ROOT . '/' . $conf_path . '/settings.local.php';
 # }
