Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | public function getSql() |
||
30 | { |
||
31 | $schemaCondition = null === $this->schemaName |
||
32 | ? '' |
||
33 | : sprintf(" AND table_schema = '%s'", $this->schemaName); |
||
34 | $sql = sprintf("SELECT table_name, table_schema FROM information_schema.tables WHERE table_schema <> 'information_schema' |
||
35 | AND table_schema <> 'pg_catalog' AND table_type = 'BASE TABLE'%s;", $schemaCondition); |
||
36 | |||
37 | return $sql; |
||
38 | } |
||
39 | |||
57 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.