Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Opening parenthesis of a multi-line function call must be the last content on the line

I Write this code in my PHP file :

public function ScriptsStyles()
    {
        wp_enqueue_style( 
            'fontawesome', 
            plugins_url("/css/font-awesome.css", __FILE__), 
            array(),
            'null' 
        );

        wp_enqueue_style( 
            'base', 
            plugins_url("/css/base.css", __FILE__), 
            array('fontawesome'), 
            'null' 
        );

        wp_enqueue_script(
            'main', 
            plugins_url("/js/main.js", __FILE__), 
            array('test') 
        );

        wp_enqueue_script(
            'test', 
            plugins_url("/js/test.js", __FILE__), 
            array('jquery') 
        );

    }

And when I checked it, using PHP Code Sniffer I get this Errors :

Opening parenthesis of a multi-line function call must be the last content on the line

those errors comes from this lines:

    wp_enqueue_style( 
                    'fontawesome', 
                    plugins_url("/css/font-awesome.css", __FILE__), 
                    array(),
                    'null' 
                );

  wp_enqueue_style( 
                    'base', 
                    plugins_url("/css/base.css", __FILE__), 
                    array('fontawesome'), 
                    'null' 
                );

How to fix that ? And thanks

like image 965
2dar Avatar asked Mar 02 '14 17:03

2dar


1 Answers

You have a space at the end of your line. :)

It expects the line to end in ( but it ends in [space].

like image 183
CodeAngry Avatar answered Sep 20 '22 14:09

CodeAngry