PHP Classes

File: src/Enum/SeedAt.php

Recommend this page to a friend!
  Classes of Alun   Flexible Laravel Migration Seeder   src/Enum/SeedAt.php   Download  
File: src/Enum/SeedAt.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Flexible Laravel Migration Seeder
Provide a Laravel migration data seeder class
Author: By
Last change:
Date: 1 month ago
Size: 1,078 bytes
 

Contents

Class file image Download
<?php

declare(strict_types = 1);

namespace
Garanaw\SeedableMigrations\Enum;

enum SeedAt: string
{
    case
EACH = 'each';
    case
AFTER = 'after';
    case
END = 'end';
    case
NEVER = 'never';
    case
NONE = 'none';

   
/**
     * Checks if the current value is each.
     *
     * @return bool
     */
   
public function each(): bool
   
{
        return
$this === self::EACH;
    }

   
/**
     * Checks if the current value is end.
     *
     * @return bool
     */
   
public function end(): bool
   
{
        return
$this === self::END;
    }

   
/**
     * Checks if the current value is after.
     *
     * @return bool
     */
   
public function after(): bool
   
{
        return
$this === self::AFTER;
    }

   
/**
     * Checks if the current value is never.
     *
     * @return bool
     */
   
public function never(): bool
   
{
        return
$this === self::NEVER;
    }

   
/**
     * Checks if the current value is none.
     *
     * @return bool
     */
   
public function none(): bool
   
{
        return
$this === self::NONE;
    }
}