<?php

declare(strict_types=1);

namespace Abc;

class PropertyHookSignatures
{
	public string $basic {
		get => 'x';
	}

	public string $fullGet {
		get {
			return 'x';
		}
	}

	protected string $refGet {
		&get {
			return 'x';
		}
	}

	protected string $finalGet {
		final get => 'x';
	}

	public string $basicSet {
		set => 'x';
	}

	public string $fullSet {
		set {
		}
	}

	public string $setWithParam {
		set(string $foo) {
		}
	}

	public string $setWithParam2 {
		set(string|int $value) => '';
	}

	public string $finalSet {
		final set {
		}
	}

	public string $combined {
		set(string $value) {
		}
		get => 'x';
	}

	final public string $combinedFinal {
		/** comment set */
		#[Set]
		set {
		}
		/** comment get */
		#[Get]
		get => 'x';
	}

	public string $virtualProp {
		set {
		}
		&get => 'x';
	}
}

abstract class AbstractHookSignatures
{
	abstract public string $abstractGet { get; }
	abstract protected string $abstractSet { set; }
	abstract public string $abstractBoth { set; get; }

	abstract public string $mixedGet {
		set => 'x';
		get;
	}

	abstract public string $mixedSet {
		set;
		get => 'x';
	}
}

interface InterfaceHookSignatures
{
	public string $get { get; }

	public string $set { #[Set]
	set; }
	public string $both { set; get; }
	public string $refGet { &get; }
}

class AsymmetricVisibilitySignatures
{
	public private(set) string $first;
	public protected(set) string $second;
	protected private(set) string $third;
	private(set) string $fourth;
	protected(set) string $fifth;
	public readonly string $implicit;
	public private(set) readonly string $readFirst;
	private(set) readonly string $readSecond;
	protected protected(set) readonly string $readThird;
	public public(set) readonly string $readFourth;
	final public private(set) string $firstFinal;
	final public protected(set) string $secondFinal;
	final protected private(set) string $thirdFinal;
	final private(set) string $fourthFinal;
	final protected(set) string $fifthFinal;
}

class CombinedSignatures
{
	public protected(set) string $prop2 {
		final set {
		}
		get {
			return 'x';
		}
	}

	protected private(set) string $prop3 {
		set(string $value) {
		}
		final get => 'x';
	}
}

class ConstructorAllSignatures
{
	public function __construct(
		public private(set) string $prop1,
		public protected(set) string $prop2,
		protected private(set) string $prop3,
		private(set) string $prop4,
		protected(set) string $prop5,
		public private(set) readonly string $readProp1,
		private(set) readonly string $readProp2,
		protected protected(set) readonly string $readProp3,
		public public(set) readonly string $readProp4,
		public string $hookProp1 {
			get => 'x';
		},
		public protected(set) string $mixedProp1 {
			set {
			}
			get {
				return 'x';
			}
		},
	) {
	}
}

class PropertyHookSignaturesChild extends PropertyHookSignatures
{
}
