admin管理员组文章数量:1130349
Travis is giving me ~ Assignments must be the first block of code on a line for this specific line of code:
$validate_string = $pf_param_string = substr( $pf_param_string, 0, - 1 );
It seems fine to me or am I doing the assignments wrong?
Travis is giving me ~ Assignments must be the first block of code on a line for this specific line of code:
$validate_string = $pf_param_string = substr( $pf_param_string, 0, - 1 );
It seems fine to me or am I doing the assignments wrong?
Share Improve this question asked Nov 20, 2018 at 14:06 DemonixDemonix 613 silver badges12 bronze badges2 Answers
Reset to default 2You're not supposed to assign multiple variables on a single line. Do them separately:
$pf_param_string = substr( $pf_param_string, 0, - 1 );
$validate_string = $pf_param_string;
Or, if you don't need both variables, just skip one of them:
$validate_string = substr( $pf_param_string, 0, - 1 );
According to this answer on StackOverflow, it could be the problem with multiple assignments in one line. Refactoring to
$validate_string = substr( $pf_param_string, 0, - 1 );
$pf_param_string = $validate_string;
should solve this.
Travis is giving me ~ Assignments must be the first block of code on a line for this specific line of code:
$validate_string = $pf_param_string = substr( $pf_param_string, 0, - 1 );
It seems fine to me or am I doing the assignments wrong?
Travis is giving me ~ Assignments must be the first block of code on a line for this specific line of code:
$validate_string = $pf_param_string = substr( $pf_param_string, 0, - 1 );
It seems fine to me or am I doing the assignments wrong?
Share Improve this question asked Nov 20, 2018 at 14:06 DemonixDemonix 613 silver badges12 bronze badges2 Answers
Reset to default 2You're not supposed to assign multiple variables on a single line. Do them separately:
$pf_param_string = substr( $pf_param_string, 0, - 1 );
$validate_string = $pf_param_string;
Or, if you don't need both variables, just skip one of them:
$validate_string = substr( $pf_param_string, 0, - 1 );
According to this answer on StackOverflow, it could be the problem with multiple assignments in one line. Refactoring to
$validate_string = substr( $pf_param_string, 0, - 1 );
$pf_param_string = $validate_string;
should solve this.
本文标签: pluginsAssignments must be the first block of code on a line Validation Error on Travis
版权声明:本文标题:plugins - Assignments must be the first block of code on a line Validation Error on Travis 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749166270a2326234.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论