Passed
Push — main ( 6c3783...b5c504 )
by Alireza
01:32
created

Database   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 12
c 1
b 0
f 0
dl 0
loc 57
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A Json_init() 0 4 1
1
<?php
2
  
3
 //define namespace
4
 namespace BPT\Database;
5
 
6
 //use classes
7
 use Medoo\Medoo;
0 ignored issues
show
Bug introduced by
The type Medoo\Medoo was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
 use BPT\Database\JsonDb;
0 ignored issues
show
Bug introduced by
The type BPT\Database\JsonDb was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
 
10
 
11
  /**
12
   * @class Database
13
   */
14
  class Database
15
  {
16
        
17
   /**
18
   * @const types database
19
   */
20
   const TYPES = array('Mysqli','Medoo','Json');
21
 
22
   /**
23
    * @const Medoo database types
24
    */
25
   const Medoo_Types = array('mysql','mariadb','pgsql','sybase','oracle','mssql', 'sqlite');
26
27
    /**
28
     * @var type database
0 ignored issues
show
Bug introduced by
The type BPT\Database\type was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
29
     */
30
    protected $type;
31
      
32
    /**
33
     * @var host for database
0 ignored issues
show
Bug introduced by
The type BPT\Database\host was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
34
     * Default value localhost
35
     */
36
    protected $host;
37
       
38
    /**
39
      * @var username database username 
0 ignored issues
show
Bug introduced by
The type BPT\Database\username was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
40
      */
41
    protected $username;
42
      
43
    /**
44
      * @var dbname database name
0 ignored issues
show
Bug introduced by
The type BPT\Database\dbname was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
45
      */
46
    protected $dbname;
47
       
48
    /**
49
      * @var charset database
0 ignored issues
show
Bug introduced by
The type BPT\Database\charset was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
50
      */
51
    protected $charset;
52
        
53
    /**
54
      * @var password database password
0 ignored issues
show
Bug introduced by
The type BPT\Database\password was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
55
      */
56
    protected $password;
57
       
58
    /**
59
      * @var connection database
0 ignored issues
show
Bug introduced by
The type BPT\Database\connection was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
60
      */
61
    protected $connect;
62
       
63
      /**
64
       * @method Json_init
65
       * Create a Json database
66
       */
67
      protected function Json_init()
68
      {
69
        $JsonDb = new JsonDb();
70
        $JsonDb->init($this->dbname);
71
      }
72
      
73
      
74
      
75
  }
76