Completed
Push — master ( f06f41...6c4f3d )
by Ryan
02:40
created

AnomalyModuleUsersMakeUsersSearchable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 23
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 4 1
A down() 0 4 1
1
<?php
2
3
use Anomaly\Streams\Platform\Database\Migration\Migration;
4
5
class AnomalyModuleUsersMakeUsersSearchable extends Migration
6
{
7
8
    /**
9
     * Run the migrations.
10
     *
11
     * @return void
12
     */
13
    public function up()
14
    {
15
        $this->streams()->findBySlugAndNamespace('users', 'users')->setAttribute('searchable', true)->save();
16
    }
17
18
    /**
19
     * Reverse the migrations.
20
     *
21
     * @return void
22
     */
23
    public function down()
24
    {
25
        $this->streams()->findBySlugAndNamespace('users', 'users')->setAttribute('searchable', false)->save();
26
    }
27
}
28