You can suppress the warning of PHP Code sniffer either by
phpcs:ignore or phpcs:disable and phpcs:enable.
Warning, Line exceeds the maximum limit of 120 characters; contains 230 characters
If your code contains more than 120 characters per line and if you faced the issue related to Line exceeds the maximum limit of characters.
You can ignore the warning by adding phpcs:ignore at end of the line.
Example,
<?php $messageContent[] = [ 'title' => 'Create an Account', 'identifier' => 'create-an-account', 'content' => 'Account with this email address already Exist. If you are sure that it is your email address, click the link to get your password.', 'is_active' => 1 ];
Now you got a warning for ‘content’ key because the content key has a value of more than 120 characters.
You can bypass this warning by typing //phpcs:ignore at the end of the line.
First Way,
<?php
$messageContent[] = [
‘title’ => ‘Create an Account’,
‘identifier’ => ‘create-an-account’,
‘content’ => ‘Account with this email address already Exist. If you are sure that it is your email address, click the link to get your password.’,//phpcs:ignore
‘is_active’ => 1
];
Second Way,
You can bypass the entire function by ,
phpcs:disable and phpcs:enable keyword.
<?php /** * @return string[] * phpcs:disable */ public function cmsContent( $messageContent[] = [ 'title' => 'Create an Account', 'identifier' => 'create-an-account', 'content' => 'Account with this email address already Exist. If you are sure that it is your email address, click the link to get your password.', 'is_active' => 1 ]; ); /** phpcs:enable */