MigrationAlterTableDirective::definition()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 1
Metric Value
cc 1
eloc 11
c 1
b 1
f 1
nc 1
nop 0
dl 0
loc 3
ccs 1
cts 1
cp 1
crap 1
rs 9.9
1
<?php declare(strict_types=1);
2
3
namespace Modelarium\Laravel\Lighthouse\Directives;
4
5
use Nuwave\Lighthouse\Schema\Directives\BaseDirective;
6
7
class MigrationAlterTableDirective extends BaseDirective
8
{
9 8
    public static function definition(): string
10
    {
11
        return /** @lang GraphQL */ <<<'SDL'
12 8
"""
13
Alters a table on migration after it was created.
14
"""
15
directive @migrationAlterTable(
16
    """
17
    The commands to run, which will be prepended with 'ALTER TABLE tablename"
18
    """
19
    values: [String!]!
20
) on OBJECT
21
SDL;
22
    }
23
}
24