Completed
Push — master ( 5f981d...ed2304 )
by Bernhard
02:17 queued 48s
created

DroppedTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A drop() 0 5 2
1
<?php
2
3
namespace Xethron\MigrationsGenerator\Syntax;
4
5
class DroppedTable
6
{
7
    /**
8
     * Get string for dropping a table
9
     *
10
     * @param      $tableName
11
     * @param null $connection
12
     *
13
     * @return string
14
     */
15
    public function drop($tableName, $connection = null)
16
    {
17
        if (!is_null($connection)) $connection = 'connection(\''.$connection.'\')->';
18
        return "Schema::{$connection}drop('$tableName');";
19
    }
20
}
21