SeedPdfLayoutsTable   A
last analyzed

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 run() 0 13 2
1
<?php namespace VojtaSvoboda\UserPdfExport\Updates;
2
3
use File;
4
use Renatio\DynamicPDF\Models\Layout;
5
use Schema;
6
use Seeder;
7
8
class SeedPdfLayoutsTable extends Seeder
9
{
10
    public function run()
11
    {
12
        if (!Schema::hasTable('renatio_dynamicpdf_pdf_layouts')) {
13
            return false;
14
        }
15
16
        Layout::create([
17
            'name' => 'Users PDF layout',
18
            'code' => 'rainlab::user',
19
            'content_html' => File::get(__DIR__ . '/templates/layout.htm'),
20
            'content_css' => File::get(__DIR__ . '/templates/style.css'),
21
        ]);
22
    }
23
}
24