On PhpStorm 9 I have associated *.ctp
with PHP.
I have also created my own Bake Theme
http://book.cakephp.org/3.0/en/bake/development.html#creating-a-bake-theme.
Because inside these files there is code written like this
<%
$done = [];
foreach ($associations as $type => $data):
foreach ($data as $alias => $details):
if (!empty($details['navLink']) && $details['controller'] !== $this->name &&
!in_array($details['controller'],
$done)):
%>
It shows these files with red underline like the have an error. PhpStorm doesn't recognize <%
and other stuff like this as valid PHP code. But it doesn't only show these files it also shows all the parent folders too and I don't know if there is actually an error on these folders and sometimes I go through the folders to check again. Just to be sure.
One way to solve this would be to change the extension of the files to something else. So they won't be associated anymore with PHP. But I don't know how I can tell CakePHP to bake the template from files with different extension than *.ctp.
The other solution would be to tell PhpStorm to ignore a certain path from inspections but I don't know how to do this either.