String Concatenation Convention

864 Views Asked by At

What is the best practice in concatenating multiple strings? What I did is every concatenation will be on the next line? I'm following the psr-2 80 line limit and the 120 line soft limit.

e.g.

return (
    Config::get('url')['base_folder'] .
        Config::get('url')['user_image_folder'] .
            "/{$image_name}.jpg"
);

VS

return Config::get('url')['base_folder'] . Config::get('url')['user_image_folder'] . "/{$image_name}.jpg";
0

There are 0 best solutions below