Commit 85aa0854 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Corrige les défauts trouvés par PHPStan.

parent 4476805d
......@@ -195,6 +195,6 @@ class Property implements \IteratorAggregate, \JsonSerializable
*/
public static function createIdentifier(string $name, string $description, Type $type)
{
return new static ($name, $description, $type, true, false, true);
return new self($name, $description, $type, true, false, true);
}
}
......@@ -22,6 +22,8 @@ declare(strict_types=1);
namespace Irstea\NgModelGeneratorBundle\Models\Types;
use Irstea\NgModelGeneratorBundle\Exceptions\DomainException;
/**
* Class Ref.
*/
......@@ -71,6 +73,8 @@ class Reference extends AbstractType implements Deferred
return $this;
case self::RESOLVED:
return $this->target;
default:
throw new DomainException('invalid reference state: ' . $this->state);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment