Nwidart\Modules\Support\Migrations\NameParser::is PHP Method

is() public method

Determine whether the given type is same with the current schema action or type.
public is ( $type ) : boolean
$type
return boolean
    public function is($type)
    {
        return $type === $this->getAction();
    }

Usage Example

 /** @test */
 public function it_can_check_if_current_migration_type_matches_given_type()
 {
     $parser = new NameParser('create_users_table');
     self::assertTrue($parser->is('create'));
 }