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

DroppedTable::drop()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 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