55namespace Rector \ChangesReporting \ValueObject ;
66
77use Rector \Contract \Rector \RectorInterface ;
8+ use Rector \PostRector \Contract \Rector \PostRectorInterface ;
89use Symplify \EasyParallel \Contract \SerializableInterface ;
910use Webmozart \Assert \Assert ;
1011
2122 private const KEY_LINE = 'line ' ;
2223
2324 /**
24- * @var class-string<RectorInterface>
25+ * @var class-string<RectorInterface|PostRectorInterface >
2526 */
2627 private string $ rectorClass ;
2728
2829 /**
29- * @param class-string<RectorInterface>|RectorInterface $rectorClass
30+ * @param class-string<RectorInterface|PostRectorInterface >|RectorInterface|PostRectorInterface $rectorClass
3031 */
3132 public function __construct (
32- string |RectorInterface $ rectorClass ,
33+ string |RectorInterface | PostRectorInterface $ rectorClass ,
3334 private int $ line
3435 ) {
35- if ($ rectorClass instanceof RectorInterface) {
36+ if ($ rectorClass instanceof RectorInterface || $ rectorClass instanceof PostRectorInterface ) {
3637 $ rectorClass = $ rectorClass ::class;
3738 }
3839
3940 $ this ->rectorClass = $ rectorClass ;
4041 }
4142
4243 /**
43- * @return class-string<RectorInterface>
44+ * @return class-string<RectorInterface|PostRectorInterface >
4445 */
4546 public function getRectorClass (): string
4647 {
@@ -63,7 +64,7 @@ public static function decode(array $json): self
6364 }
6465
6566 /**
66- * @return array{rector_class: class-string<RectorInterface>, line: int}
67+ * @return array{rector_class: class-string<RectorInterface|PostRectorInterface >, line: int}
6768 */
6869 public function jsonSerialize (): array
6970 {
0 commit comments