Completed
Pull Request — master (#68)
by Cristiano
05:36
created
src/model/parts/PropertiesPart.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	 * @return $this
39 39
 	 */
40 40
 	public function setProperties(array $properties): self {
41
-		$this->properties->each(fn (string $key, PhpProperty $prop) => $prop->setParent(null));
41
+		$this->properties->each(fn(string $key, PhpProperty $prop) => $prop->setParent(null));
42 42
 		$this->properties->clear();
43 43
 
44 44
 		array_map([$this, 'setProperty'], $properties);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 *
71 71
 	 * @return $this
72 72
 	 */
73
-	public function removeProperty(PhpProperty|string $nameOrProperty): self {
73
+	public function removeProperty(PhpProperty | string $nameOrProperty): self {
74 74
 		$name = (string) $nameOrProperty;
75 75
 
76 76
 		if (!$this->properties->has($name)) {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	 *
91 91
 	 * @return bool `true` if a property exists and `false` if not
92 92
 	 */
93
-	public function hasProperty(PhpProperty|string $nameOrProperty): bool {
93
+	public function hasProperty(PhpProperty | string $nameOrProperty): bool {
94 94
 		return $this->properties->has((string) $nameOrProperty);
95 95
 	}
96 96
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	 * @return $this
136 136
 	 */
137 137
 	public function clearProperties(): self {
138
-		$this->properties->each(fn (string $key, PhpProperty $elem) => $elem->setParent(null));
138
+		$this->properties->each(fn(string $key, PhpProperty $elem) => $elem->setParent(null));
139 139
 		$this->properties->clear();
140 140
 
141 141
 		return $this;
Please login to merge, or discard this patch.
src/model/parts/ValuePart.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  * @author Thomas Gossmann
20 20
  */
21 21
 trait ValuePart {
22
-	private string|int|float|null|bool|PhpConstant $value = null;
22
+	private string | int | float | null | bool | PhpConstant $value = null;
23 23
 
24 24
 	/** @var bool */
25 25
 	private bool $hasValue = false;
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	 *
40 40
 	 * @return $this
41 41
 	 */
42
-	public function setValue(string|int|float|null|bool|PhpConstant $value): self {
42
+	public function setValue(string | int | float | null | bool | PhpConstant $value): self {
43 43
 		$this->value = $value;
44 44
 		$this->hasValue = true;
45 45
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 *
64 64
 	 * @return string|int|float|bool|null|PhpConstant
65 65
 	 */
66
-	public function getValue(): string|int|float|bool|null|PhpConstant {
66
+	public function getValue(): string | int | float | bool | null | PhpConstant {
67 67
 		return $this->value;
68 68
 	}
69 69
 
Please login to merge, or discard this patch.
src/model/parts/TypeDocblockGeneratorPart.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 	 *
49 49
 	 * @param ReturnTag|VarTag $tag
50 50
 	 */
51
-	protected function generateTypeTag(ReturnTag|VarTag $tag): void {
51
+	protected function generateTypeTag(ReturnTag | VarTag $tag): void {
52 52
 		$docblock = $this->getDocblock();
53 53
 		$type = $this->getType();
54 54
 
Please login to merge, or discard this patch.
src/model/parts/ConstantsPart.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 *
65 65
 	 * @return $this
66 66
 	 */
67
-	public function setConstant(PhpConstant|string $nameOrConstant, string|int|float|bool|null $value = '', bool $isExpression = false): self {
67
+	public function setConstant(PhpConstant | string $nameOrConstant, string | int | float | bool | null $value = '', bool $isExpression = false): self {
68 68
 		if ($nameOrConstant instanceof PhpConstant) {
69 69
 			$name = $nameOrConstant->getName();
70 70
 			$constant = $nameOrConstant;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 *
88 88
 	 * @return $this
89 89
 	 */
90
-	public function removeConstant(PhpConstant|string $nameOrConstant): self {
90
+	public function removeConstant(PhpConstant | string $nameOrConstant): self {
91 91
 		if (!$this->constants->has((string) $nameOrConstant)) {
92 92
 			throw new \InvalidArgumentException(sprintf('The constant "%s" does not exist.', $nameOrConstant));
93 93
 		}
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	 *
105 105
 	 * @return bool
106 106
 	 */
107
-	public function hasConstant(PhpConstant|string $nameOrConstant): bool {
107
+	public function hasConstant(PhpConstant | string $nameOrConstant): bool {
108 108
 		return $this->constants->has((string) $nameOrConstant);
109 109
 	}
110 110
 
Please login to merge, or discard this patch.
src/model/parts/TraitsPart.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 *
65 65
 	 * @return $this
66 66
 	 */
67
-	public function addTrait(PhpTrait|string $trait): self {
67
+	public function addTrait(PhpTrait | string $trait): self {
68 68
 		if ($trait instanceof PhpTrait) {
69 69
 			$name = $trait->getName();
70 70
 			$qname = $trait->getQualifiedName();
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 *
99 99
 	 * @return bool `true` if it exists and `false` if not
100 100
 	 */
101
-	public function hasTrait(PhpTrait|string $trait): bool {
101
+	public function hasTrait(PhpTrait | string $trait): bool {
102 102
 		if ($trait instanceof PhpTrait) {
103 103
 			return $this->traits->contains($trait->getName())
104 104
 				|| $this->traits->contains($trait->getQualifiedName());
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 *
118 118
 	 * @return $this
119 119
 	 */
120
-	public function removeTrait(PhpTrait|string $trait): self {
120
+	public function removeTrait(PhpTrait | string $trait): self {
121 121
 		if ($trait instanceof PhpTrait) {
122 122
 			$name = $trait->getName();
123 123
 			$qname = $trait->getQualifiedName();
Please login to merge, or discard this patch.
src/model/parts/InterfacesPart.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 *
65 65
 	 * @return $this
66 66
 	 */
67
-	public function addInterface(PhpInterface|string $interface) {
67
+	public function addInterface(PhpInterface | string $interface) {
68 68
 		if ($interface instanceof PhpInterface) {
69 69
 			$name = $interface->getName();
70 70
 			$qname = $interface->getQualifiedName();
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	 *
108 108
 	 * @return bool
109 109
 	 */
110
-	public function hasInterface(PhpInterface|string $interface): bool {
110
+	public function hasInterface(PhpInterface | string $interface): bool {
111 111
 		if ($interface instanceof PhpInterface) {
112 112
 			return $this->interfaces->contains($interface->getName())
113 113
 				|| $this->interfaces->contains($interface->getQualifiedName());
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	 *
127 127
 	 * @return $this
128 128
 	 */
129
-	public function removeInterface(PhpInterface|string $interface): self {
129
+	public function removeInterface(PhpInterface | string $interface): self {
130 130
 		if ($interface instanceof PhpInterface) {
131 131
 			$name = $interface->getName();
132 132
 			$qname = $interface->getQualifiedName();
Please login to merge, or discard this patch.
src/model/parts/DocblockPart.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 	 *
31 31
 	 * @return $this
32 32
 	 */
33
-	public function setDocblock(string|Docblock $doc): self {
33
+	public function setDocblock(string | Docblock $doc): self {
34 34
 		if (is_string($doc)) {
35 35
 			$doc = new Docblock(trim($doc));
36 36
 		}
Please login to merge, or discard this patch.
src/model/PhpTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,6 +65,6 @@
 block discarded – undo
65 65
 	 */
66 66
 	public function generateDocblock(): void {
67 67
 		parent::generateDocblock();
68
-		$this->properties->each(fn (string $key, PhpProperty $prop) => $prop->generateDocblock());
68
+		$this->properties->each(fn(string $key, PhpProperty $prop) => $prop->generateDocblock());
69 69
 	}
70 70
 }
Please login to merge, or discard this patch.
src/model/RoutineInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	 *
75 75
 	 * @return PhpParameter
76 76
 	 */
77
-	public function getParameter(string|int $nameOrIndex);
77
+	public function getParameter(string | int $nameOrIndex);
78 78
 
79 79
 	/**
80 80
 	 * Replaces a parameter at a given position
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 *
96 96
 	 * @return $this
97 97
 	 */
98
-	public function removeParameter(int|string|PhpParameter $param);
98
+	public function removeParameter(int | string | PhpParameter $param);
99 99
 
100 100
 	/**
101 101
 	 * Returns a collection of parameters
Please login to merge, or discard this patch.