original_string: public static function setFiles(array $files): array
      {
          $previousFiles = self::$files;
          self::$files = $files;
  
          foreach (self::$openedFiles as $file) {
              if ($file) {
                  flock($file, LOCK_UN);
                  fclose($file);
              }
          }
          self::$openedFiles = self::$lockedFiles = [];
  
          return $previousFiles;
      }
code: public static function setFiles(array $files): array
      {
          $previousFiles = self::$files;
          self::$files = $files;
  
          foreach (self::$openedFiles as $file) {
              if ($file) {
                  flock($file, LOCK_UN);
                  fclose($file);
              }
          }
          self::$openedFiles = self::$lockedFiles = [];
  
          return $previousFiles;
      }
code_tokens: public static function setFiles ( array $ files ) : array { $ previousFiles = self :: $ files ; self :: $ files = $ files ; foreach ( self :: $ openedFiles as $ file ) { if ( $ file ) { flock ( $ file , LOCK_UN ) ; fclose ( $ file ) ; } } self :: $ openedFiles = self :: $ lockedFiles = [ ] ; return $ previousFiles ; }
docstring: Defines a set of existing files that will be used as keys to acquire locks.
  
  @return array The previously defined set of files
docstring_tokens: Defines a set of existing files that will be used as keys to acquire locks .