private function changeClasses($method, $class)
    {
        array_map(function ($class) use ($method) {
            if ($method === 'add') {
                return $this->classes->put($class, $class);
            }

            return $this->classes->remove($class);
        }, explode(' ', $class));

        return $this;
    }