InstallSchema::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
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
}