You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added [PhpStan](https://github.com/phpstan/phpstan) PreCommit Hook.
**Example Files Change**
```
// app/foo.php
<?php
namespace App;
class Foo
{
public function __construct($foo, $test)
{
$this->foo = $foo;
}
}
// app/bar.php
<?php
namespace App;
class Bar
{
public function __construct($foo)
{
$this->foo = $foo;
}
private function testMe()
{
return $this->hello;
}
}
```
**Example Error Messages***
```
Running pre-commit hooks
Analysing PHP codes...............................[PhpStan] FAILED
Errors on modified lines:
/app/bar.php:9:Access to an undefined property App\Bar::$foo.
/app/bar.php:14:Access to an undefined property App\Bar::$hello.
/app/foo.php:7:Constructor of class App\Foo has an unused parameter $test.
/app/foo.php:9:Access to an undefined property App\Foo::$foo.
✗ One or more pre-commit hooks failed
```
0 commit comments