I added phpmd to my Laravel project.
Now I have a remark about static usage of "Log".
namespace App\Http\Controllers;
use Log;
class MyController extends Controller
{
/**
* Does something
*/
public function doSomething($var)
{
Log::info('Just began to to something.');
}
phpmd says:
Avoid using static access to class '\Log' in method 'doSomething'.
What is the correct way to use Log class here?
I followed the Laravel docs but have no clue how to correct it and the phpmd docs do not help me due to my limited knowledge.
Thanks!