Skip to content

Instantly share code, notes, and snippets.

@ikr
Last active December 22, 2015 19:39
Show Gist options
  • Save ikr/6521234 to your computer and use it in GitHub Desktop.
Save ikr/6521234 to your computer and use it in GitHub Desktop.
<?php
$errorsArray = function ($listObj) {
$result = [];
foreach ($listObj as $error) {
$result[] = ['field' => $error->getPropertyPath(), 'message' => $error->getMessage()];
}
return $result;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment