InstallSchema   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 28
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A install() 0 7 1
1
<?php
2
3
namespace Tkotosz\CommandScheduler\Setup;
4
5
use Tkotosz\CommandScheduler\Setup\Schema\CommandScheduleTableManager;
6
use Magento\Framework\Setup\InstallSchemaInterface;
7
use Magento\Framework\Setup\ModuleContextInterface;
8
use Magento\Framework\Setup\SchemaSetupInterface;
9
10
class InstallSchema implements InstallSchemaInterface
11
{
12
    /**
13
     * @var CommandScheduleTableManager
14
     */
15
    private $commandScheduleTableManager;
16
    
17
    /**
18
     * @param CommandScheduleTableManager $commandScheduleTableManager
19
     */
20
    public function __construct(CommandScheduleTableManager $commandScheduleTableManager)
21
    {
22
        $this->commandScheduleTableManager = $commandScheduleTableManager;
23
    }
24
    
25
    /**
26
     * Installs the market module database schema
27
     *
28
     * @param SchemaSetupInterface   $setup
29
     * @param ModuleContextInterface $context
30
     */
31
    public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)
32
    {
33
        $setup->startSetup();
34
35
        $this->commandScheduleTableManager->createTable($setup);
36
37
        $setup->endSetup();
38
    }
39
}