Skip to content

Commit

Permalink
Add dynamic return type seed support
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Oct 11, 2021
1 parent 1743a5b commit 85c3866
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Phpstan/FormDmrte.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

declare(strict_types=1);

namespace Atk4\Ui\Phpstan;

use Mvorisek\Atk4\Hintable\Phpstan\FactoryMethodReturnTypeExtension;

class FormDmrte extends FactoryMethodReturnTypeExtension
{
public function __construct()
{
parent::__construct();

$this->addMethodWithSeedSupport('addControl', 1);
}

public function getClass(): string
{
return \Atk4\Ui\Form;
}
}
5 changes: 5 additions & 0 deletions phpstan-ext.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
services:
-
class: Atk4\Ui\Phpstan\FormDmrte
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension
1 change: 1 addition & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
includes:
- vendor/mvorisek/atk4-hintable/phpstan-ext.neon
- phpstan-ext.neon

parameters:
level: 6
Expand Down

0 comments on commit 85c3866

Please sign in to comment.