Can't install Uniform plugin

I tried to install Uniform by the “Traditional” method, and when I try to load a page with a form I get a Whoops alert:

Call to undefined function uniform()

pointing to the first line of the Controller code:

$form = uniform('contact-form', array(

The example code was taken from this tutorial. I tried in both PHP 5.6 and 7.

Thanks!

The code from that tutorial is old, the syntax has changed. Please check out the Uniform documentation that is linked in the Uniform repo.

<?php

use Uniform\Form;

return function ($site, $pages, $page)
{
    $form = new Form([
        'email' => [
            'rules' => ['required', 'email'],
            'message' => 'Please enter a valid email address',
        ],
        'message' => [
            'rules' => ['required'],
            'message' => 'Please enter a message',
        ],
    ]);

    if (r::is('POST')) {
        $form->emailAction([
            'to' => 'me@example.com',
            'from' => 'info@example.com',
        ]);
    }

    return compact('form');
};

Of course… That solved it.
Thanks, @texnixe!