src/Command/Project/DotenvDelete.php
public function projectDotenvDelete($envPath = '.env', $opts = ['force' => false])
    {
        if (!$opts['force']) {
            $this->say(static::MSG_NO_DELETE);
            return false;
        }
        if (!file_exists($envPath)) {
            return true;
        }

        $result = $this->taskFilesystemStack()
            ->remove($envPath)
            ->run();

        if (!$result->wasSuccessful()) {
            $this->exitError("Failed to run command");
        }

        return true;
    }
public function projectDotenvDelete($envPath = '.env', $opts = ['force' => false])
    {
        if (!$opts['force']) {
            $this->say(static::MSG_NO_DELETE);
            return false;
        }
        if (!file_exists($envPath)) {
            return true;
        }

        $result = $this->taskFilesystemStack()
            ->remove($envPath)
            ->run();

        if (!$result->wasSuccessful()) {
            $this->exitError("Failed to run command");
        }

        return true;
    }
public function projectDotenvDelete ( $ envPath = '.env' , $ opts = [ 'force' => false ] ) { if ( ! $ opts [ 'force' ] ) { $ this -> say ( static :: MSG_NO_DELETE ) ; return false ; } if ( ! file_exists ( $ envPath ) ) { return true ; } $ result = $ this -> taskFilesystemStack ( ) -> remove ( $ envPath ) -> run ( ) ; if ( ! $ result -> wasSuccessful ( ) ) { $ this -> exitError ( "Failed to run command" ) ; } return true ; }
Delete dotenv file

@param string $envPath Path to dotenv file
@option $force Force deletion

@return bool true on success or false on failure
Delete dotenv file