@@ -17,7 +17,7 @@ trait DataResolver
1717 /**
1818 * @throws InvalidJsonException|ValidationException|MissingCastTypeException|CastTargetException
1919 */
20- public static function fromJson (string $ json ): self
20+ public static function fromJson (string $ json ): static
2121 {
2222 $ jsonDecoded = json_decode ($ json , true );
2323 if (! is_array ($ jsonDecoded )) {
@@ -30,47 +30,47 @@ public static function fromJson(string $json): self
3030 /**
3131 * @throws CastTargetException|MissingCastTypeException
3232 */
33- public static function fromArray (array $ array ): self
33+ public static function fromArray (array $ array ): static
3434 {
3535 return new static ($ array );
3636 }
3737
3838 /**
3939 * @throws ValidationException|MissingCastTypeException|CastTargetException
4040 */
41- public static function fromRequest (Request $ request ): self
41+ public static function fromRequest (Request $ request ): static
4242 {
4343 return new static ($ request ->all ());
4444 }
4545
4646 /**
4747 * @throws ValidationException|MissingCastTypeException|CastTargetException
4848 */
49- public static function fromModel (Model $ model ): self
49+ public static function fromModel (Model $ model ): static
5050 {
5151 return new static ($ model ->toArray ());
5252 }
5353
5454 /**
5555 * @throws ValidationException|MissingCastTypeException|CastTargetException
5656 */
57- public static function fromCommandArguments (Command $ command ): self
57+ public static function fromCommandArguments (Command $ command ): static
5858 {
5959 return new static ($ command ->arguments ());
6060 }
6161
6262 /**
6363 * @throws ValidationException|MissingCastTypeException|CastTargetException
6464 */
65- public static function fromCommandOptions (Command $ command ): self
65+ public static function fromCommandOptions (Command $ command ): static
6666 {
6767 return new static ($ command ->options ());
6868 }
6969
7070 /**
7171 * @throws ValidationException|MissingCastTypeException|CastTargetException
7272 */
73- public static function fromCommand (Command $ command ): self
73+ public static function fromCommand (Command $ command ): static
7474 {
7575 return new static (array_merge ($ command ->arguments (), $ command ->options ()));
7676 }
0 commit comments