Skip to content

Commit

Permalink
Update ModelNameAwareTrait.php
Browse files Browse the repository at this point in the history
  • Loading branch information
dezbyte committed Aug 15, 2018
1 parent 9c55be7 commit 382d452
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Rest/JsonMessages/Helper/ModelNameAwareTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ public function useClassName()
private function normalizeClassName($className)
{
list($name, $prefix) = array_reverse(explode('\\', $className));

return sprintf('%s:%s', lcfirst($prefix), ucfirst($name));

$suffix = preg_replace('/response$/i', null, lcfirst($name));

return sprintf('%s.%s', lcfirst($prefix), $suffix);
}

}

0 comments on commit 382d452

Please sign in to comment.