original_string: public function isDbEmpty($conn)
      {
          $Folder = new Folder($this->config('schemaPath'));
          $existingSchemas = $conn->schemaCollection()->listTables();
          $newSchemas = array_map(function ($item) {
              return Inflector::underscore(str_replace('Schema.php', '', $item));
          }, $Folder->read()[1]);
          $result = !array_intersect($existingSchemas, $newSchemas);
          if (!$result) {
              $this->error(__d('installer', 'A previous installation of QuickAppsCMS already exists, please drop your database tables before continue.'));
          }
  
          return $result;
      }
code: public function isDbEmpty($conn)
      {
          $Folder = new Folder($this->config('schemaPath'));
          $existingSchemas = $conn->schemaCollection()->listTables();
          $newSchemas = array_map(function ($item) {
              return Inflector::underscore(str_replace('Schema.php', '', $item));
          }, $Folder->read()[1]);
          $result = !array_intersect($existingSchemas, $newSchemas);
          if (!$result) {
              $this->error(__d('installer', 'A previous installation of QuickAppsCMS already exists, please drop your database tables before continue.'));
          }
  
          return $result;
      }
code_tokens: public function isDbEmpty ( $ conn ) { $ Folder = new Folder ( $ this -> config ( 'schemaPath' ) ) ; $ existingSchemas = $ conn -> schemaCollection ( ) -> listTables ( ) ; $ newSchemas = array_map ( function ( $ item ) { return Inflector :: underscore ( str_replace ( 'Schema.php' , '' , $ item ) ) ; } , $ Folder -> read ( ) [ 1 ] ) ; $ result = ! array_intersect ( $ existingSchemas , $ newSchemas ) ; if ( ! $ result ) { $ this -> error ( __d ( 'installer' , 'A previous installation of QuickAppsCMS already exists, please drop your database tables before continue.' ) ) ; } return $ result ; }
docstring: Checks whether connected database is empty or not.
  
  @param \Cake\Database\Connection $conn Database connection to use
  @return bool True if database if empty and tables can be imported, false if
  there are some existing tables
docstring_tokens: Checks whether connected database is empty or not .