Skip to content

Commit 605b7a6

Browse files
VincentLangletondrejmirtes
authored andcommitted
Move isOffsetAccessLegal to MaybeOffsetAccessibleTypeTrait
1 parent bc14bda commit 605b7a6

File tree

7 files changed

+5
-30
lines changed

7 files changed

+5
-30
lines changed

src/Type/Accessory/HasMethodType.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,6 @@ public function describe(VerbosityLevel $level): string
111111
return sprintf('hasMethod(%s)', $this->methodName);
112112
}
113113

114-
public function isOffsetAccessLegal(): TrinaryLogic
115-
{
116-
return TrinaryLogic::createMaybe();
117-
}
118-
119114
public function hasMethod(string $methodName): TrinaryLogic
120115
{
121116
if ($this->getCanonicalMethodName() === strtolower($methodName)) {

src/Type/Accessory/HasPropertyType.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,6 @@ public function describe(VerbosityLevel $level): string
106106
return sprintf('hasProperty(%s)', $this->propertyName);
107107
}
108108

109-
public function isOffsetAccessLegal(): TrinaryLogic
110-
{
111-
return TrinaryLogic::createMaybe();
112-
}
113-
114109
public function hasProperty(string $propertyName): TrinaryLogic
115110
{
116111
if ($this->propertyName === $propertyName) {

src/Type/CallableType.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,6 @@ public function toCoercedArgumentType(bool $strictTypes): Type
340340
);
341341
}
342342

343-
public function isOffsetAccessLegal(): TrinaryLogic
344-
{
345-
return TrinaryLogic::createMaybe();
346-
}
347-
348343
public function getTemplateTypeMap(): TemplateTypeMap
349344
{
350345
return $this->templateTypeMap;

src/Type/IterableType.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,6 @@ public function toCoercedArgumentType(bool $strictTypes): Type
256256
);
257257
}
258258

259-
public function isOffsetAccessLegal(): TrinaryLogic
260-
{
261-
return TrinaryLogic::createMaybe();
262-
}
263-
264259
public function isIterable(): TrinaryLogic
265260
{
266261
return TrinaryLogic::createYes();

src/Type/ObjectShapeType.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -420,11 +420,6 @@ public function describe(VerbosityLevel $level): string
420420
);
421421
}
422422

423-
public function isOffsetAccessLegal(): TrinaryLogic
424-
{
425-
return TrinaryLogic::createMaybe();
426-
}
427-
428423
public function getEnumCases(): array
429424
{
430425
return [];

src/Type/ObjectWithoutClassType.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,6 @@ function () use ($level): string {
134134
);
135135
}
136136

137-
public function isOffsetAccessLegal(): TrinaryLogic
138-
{
139-
return TrinaryLogic::createMaybe();
140-
}
141-
142137
public function getEnumCases(): array
143138
{
144139
return [];

src/Type/Traits/MaybeOffsetAccessibleTypeTrait.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ public function isOffsetAccessible(): TrinaryLogic
1414
return TrinaryLogic::createMaybe();
1515
}
1616

17+
public function isOffsetAccessLegal(): TrinaryLogic
18+
{
19+
return TrinaryLogic::createMaybe();
20+
}
21+
1722
public function hasOffsetValueType(Type $offsetType): TrinaryLogic
1823
{
1924
return TrinaryLogic::createMaybe();

0 commit comments

Comments
 (0)