syntax error, expecting variable (T_VARIABLE) in Search Plus Custom Mapping
That is a typo in the plugin's documentation.

public function testMapping(element)


should be

public function testMapping($element)


since $element is a PHP variable.