It seems the mediawiki codebase is using the not operator ! without a space after it.
I suggest to add a sniff for this case
phpcs does not provide a default sniff for this. It have a sniff to enforce the space after ! - SpaceAfterNotSniff
The sniff should remove a space/tab or newline after not operator. Maybe validate one space before the ! (T_BOOLEAN_NOT) as well (when there is not another !).