Skip to content

Instantly share code, notes, and snippets.

@bcremer
Last active April 7, 2016 06:55
Show Gist options
  • Save bcremer/8e94317dcd430daa1888f866affba5a4 to your computer and use it in GitHub Desktop.
Save bcremer/8e94317dcd430daa1888f866affba5a4 to your computer and use it in GitHub Desktop.
PhpStorm find unused constructor dependency
<?php
class MyService
{
private $debA;
// $debB is not used but in the constructor
// I would like a phpstorm inspection to find that
private $debB;
public function __construct($debA, $debB)
{
$this->debA = $debA;
$this->debB = $debB;
}
public function doIt()
{
return $this->debA->do();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment