Fix categories bug

When using the string type,
$typeid == 1 matched all strings making other conditions ineffective.
Updated category fix

Categories ID can be passed as strings
PSR code formatting
Fix: list event view lost type event filter
save code event
Merge pull request #1815 from GPCsolutions/catbug

Fix categories bug
Merge pull request #1862 from FHenry/3.5

Fix: list event view lost type event filter
Fix: Filter on direction of payment mode was not working.

Conflicts:
	htdocs/core/class/html.form.class.php
	htdocs/fourn/facture/fiche.php
Merge remote-tracking branch 'origin/3.5' into 3.6

Conflicts:
	htdocs/categories/class/categorie.class.php
	htdocs/compta/facture.php