Code Duplication    Length = 18-18 lines in 2 locations

dist/jate/modules/Connection/Adapters/PdoAdapterSqLiteFile.php 1 location

@@ 3-20 (lines=18) @@
1
<?php
2
  jRequire("PdoAdapterMysql.php");
3
  class PdoAdapterSqLiteFile extends PdoAdapterMysql {
4
      public $connection;
5
      public function __construct( $_srv, $_db, $_usr, $_pass ) {
6
        try {
7
          $this->connection = new PDO("sqlite:$_srv");
8
        } catch( Exception $e ) {
9
          throw new JException($e->getMessage());
10
        }
11
      }
12
      public function newTable( $_sql ) {
13
        try {
14
          $temp = $this->connection->exec($_sql);
15
        } catch (Exception $e) {
16
          throw new JException($e->getMessage());
17
        }
18
        return $temp;
19
      }
20
  }
21
?>
22

dist/jate/modules/Connection/Adapters/PdoAdapterSqLiteMemory.php 1 location

@@ 3-20 (lines=18) @@
1
<?php
2
  jRequire("PdoAdapterMysql.php");
3
  class PdoAdapterSqLiteMemory extends PdoAdapterMysql {
4
      public $connection;
5
      public function __construct( $_srv, $_db, $_usr, $_pass ) {
6
        try {
7
          $this->connection = new PDO("sqlite::memory:");
8
        } catch( Exception $e ) {
9
          throw new JException($e->getMessage());
10
        }
11
      }
12
      public function newTable( $_sql ) {
13
        try {
14
          $temp = $this->connection->exec($_sql);
15
        } catch (Exception $e) {
16
          throw new JException($e->getMessage());
17
        }
18
        return $temp;
19
      }
20
  }
21
?>
22