Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 20
Seeder
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
20
0.00% covered (danger)
0.00%
0 / 20
 run
0.00% covered (danger)
0.00%
0 / 1
12
0.00% covered (danger)
0.00%
0 / 9
 getSeeds
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 11
<?php namespace App\Seeds;
use Blog\Seeds\Categories;
use Blog\Seeds\Comments;
use Blog\Seeds\Posts;
use Blog\Seeds\PostsInCategories;
use Blog\Seeds\PostsInTags;
use Blog\Seeds\Tags;
use Framework\CLI\CLI;
class Seeder extends \Framework\Database\Extra\Seeder
{
    public function run()
    {
        $is_cli = is_cli();
        foreach ($this->getSeeds() as $seed) {
            if ($is_cli) {
                CLI::write("Seeding {$seed}");
            }
            $this->call($seed);
        }
    }
    protected function getSeeds() : array
    {
        return [
            Users::class,
            Categories::class,
            Tags::class,
            Posts::class,
            PostsInCategories::class,
            PostsInTags::class,
            Comments::class,
        ];
    }
}