Skip to content

Commit c03e5e7

Browse files
committed
Remove debug info
1 parent 449f294 commit c03e5e7

7 files changed

Lines changed: 0 additions & 193 deletions

File tree

lib/Core/Site/Values/Content.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -137,22 +137,6 @@ public function __isset($property): bool
137137
};
138138
}
139139

140-
public function __debugInfo(): array
141-
{
142-
return [
143-
'id' => $this->id,
144-
'mainLocationId' => $this->mainLocationId,
145-
'name' => $this->name,
146-
'languageCode' => $this->languageCode,
147-
'isVisible' => $this->getContentInfo()->isVisible,
148-
'contentInfo' => $this->getContentInfo(),
149-
'fields' => $this->fields,
150-
'mainLocation' => '[An instance of Netgen\IbexaSiteApi\API\Values\Location]',
151-
'innerContent' => '[An instance of Ibexa\Contracts\Core\Repository\Values\Content\Content]',
152-
'innerVersionInfo' => '[An instance of Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo]',
153-
];
154-
}
155-
156140
public function hasField(string $identifier): bool
157141
{
158142
return $this->fields->hasField($identifier);

lib/Core/Site/Values/ContentInfo.php

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -80,34 +80,6 @@ public function __isset($property): bool
8080
return parent::__isset($property);
8181
}
8282

83-
public function __debugInfo(): array
84-
{
85-
return [
86-
'id' => $this->innerContentInfo->id,
87-
'contentTypeId' => $this->innerContentInfo->contentTypeId,
88-
'sectionId' => $this->innerContentInfo->sectionId,
89-
'currentVersionNo' => $this->innerContentInfo->currentVersionNo,
90-
'published' => $this->innerContentInfo->published,
91-
'isHidden' => $this->innerContentInfo->isHidden,
92-
'isVisible' => !$this->innerContentInfo->isHidden,
93-
'ownerId' => $this->innerContentInfo->ownerId,
94-
'modificationDate' => $this->innerContentInfo->modificationDate,
95-
'publishedDate' => $this->innerContentInfo->publishedDate,
96-
'alwaysAvailable' => $this->innerContentInfo->alwaysAvailable,
97-
'remoteId' => $this->innerContentInfo->remoteId,
98-
'mainLanguageCode' => $this->innerContentInfo->mainLanguageCode,
99-
'mainLocationId' => $this->innerContentInfo->mainLocationId,
100-
'name' => $this->name,
101-
'languageCode' => $this->languageCode,
102-
'contentTypeIdentifier' => $this->contentTypeIdentifier,
103-
'contentTypeName' => $this->contentTypeName,
104-
'contentTypeDescription' => $this->contentTypeDescription,
105-
'innerContentInfo' => '[An instance of Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo]',
106-
'innerContentType' => '[An instance of Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType]',
107-
'mainLocation' => '[An instance of Netgen\IbexaSiteApi\API\Values\Location]',
108-
];
109-
}
110-
11183
private function getMainLocation(): ?APILocation
11284
{
11385
if ($this->internalMainLocation === null && $this->mainLocationId !== null) {

lib/Core/Site/Values/Field.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,6 @@ public function __construct(array $properties = [])
3535
parent::__construct($properties);
3636
}
3737

38-
public function __debugInfo(): array
39-
{
40-
return [
41-
'id' => $this->id,
42-
'fieldDefIdentifier' => $this->fieldDefIdentifier,
43-
'value' => $this->value,
44-
'languageCode' => $this->languageCode,
45-
'fieldTypeIdentifier' => $this->fieldTypeIdentifier,
46-
'name' => $this->name,
47-
'description' => $this->description,
48-
'content' => '[An instance of Netgen\IbexaSiteApi\API\Values\Content]',
49-
'contentId' => $this->content->id,
50-
'isEmpty' => $this->isEmpty,
51-
'isSurrogate' => $this->isSurrogate,
52-
'innerField' => '[An instance of Ibexa\Contracts\Core\Repository\Values\Content\Field]',
53-
'innerFieldDefinition' => $this->innerFieldDefinition,
54-
];
55-
}
56-
5738
public function isEmpty(): bool
5839
{
5940
return $this->isEmpty;

lib/Core/Site/Values/Fields.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,6 @@ public function __construct(
4949
) {
5050
}
5151

52-
public function __debugInfo(): array
53-
{
54-
$this->initialize();
55-
56-
return $this->fieldsByIdentifier;
57-
}
58-
5952
public function getIterator(): Traversable
6053
{
6154
$this->initialize();

lib/Core/Site/Values/Location.php

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -120,31 +120,6 @@ public function __isset($property): bool
120120
return parent::__isset($property);
121121
}
122122

123-
public function __debugInfo(): array
124-
{
125-
return [
126-
'id' => $this->innerLocation->id,
127-
'status' => $this->innerLocation->status,
128-
'priority' => $this->innerLocation->priority,
129-
'hidden' => $this->innerLocation->hidden,
130-
'invisible' => $this->innerLocation->invisible,
131-
'explicitlyHidden' => $this->innerLocation->explicitlyHidden,
132-
'isVisible' => !$this->innerLocation->hidden && !$this->innerLocation->invisible,
133-
'remoteId' => $this->innerLocation->remoteId,
134-
'parentLocationId' => $this->innerLocation->parentLocationId,
135-
'pathString' => $this->innerLocation->pathString,
136-
'path' => $this->innerLocation->path,
137-
'depth' => $this->innerLocation->depth,
138-
'sortField' => $this->innerLocation->sortField,
139-
'sortOrder' => $this->innerLocation->sortOrder,
140-
'contentId' => $this->innerLocation->contentId,
141-
'innerLocation' => '[An instance of Ibexa\Contracts\Core\Repository\Values\Content\Location]',
142-
'contentInfo' => $this->getContentInfo(),
143-
'parent' => '[An instance of Netgen\IbexaSiteApi\API\Values\Location]',
144-
'content' => '[An instance of Netgen\IbexaSiteApi\API\Values\Content]',
145-
];
146-
}
147-
148123
public function getChildren(int $limit = 25): array
149124
{
150125
return $this->filterChildren([], $limit)->getIterator()->getArrayCopy();

tests/lib/Integration/BaseTest.php

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -144,22 +144,6 @@ protected function assertContent(Content $content, array $data): void
144144
} catch (PropertyNotFoundException) {
145145
// Do nothing
146146
}
147-
148-
self::assertSame(
149-
[
150-
'id' => $content->id,
151-
'mainLocationId' => $content->mainLocationId,
152-
'name' => $content->name,
153-
'languageCode' => $content->languageCode,
154-
'isVisible' => $content->isVisible,
155-
'contentInfo' => $content->contentInfo,
156-
'fields' => $content->fields,
157-
'mainLocation' => '[An instance of Netgen\IbexaSiteApi\API\Values\Location]',
158-
'innerContent' => '[An instance of Ibexa\Contracts\Core\Repository\Values\Content\Content]',
159-
'innerVersionInfo' => '[An instance of Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo]',
160-
],
161-
$content->__debugInfo(),
162-
);
163147
}
164148

165149
protected function assertContentInfo(APIContentInfo $contentInfo, array $data): void
@@ -203,34 +187,6 @@ protected function assertContentInfo(APIContentInfo $contentInfo, array $data):
203187
} catch (PropertyNotFoundException) {
204188
// Do nothing
205189
}
206-
207-
self::assertSame(
208-
[
209-
'id' => $contentInfo->id,
210-
'contentTypeId' => $contentInfo->contentTypeId,
211-
'sectionId' => $contentInfo->sectionId,
212-
'currentVersionNo' => $contentInfo->currentVersionNo,
213-
'published' => $contentInfo->published,
214-
'isHidden' => $contentInfo->isHidden,
215-
'isVisible' => !$contentInfo->isHidden,
216-
'ownerId' => $contentInfo->ownerId,
217-
'modificationDate' => $contentInfo->modificationDate,
218-
'publishedDate' => $contentInfo->publishedDate,
219-
'alwaysAvailable' => $contentInfo->alwaysAvailable,
220-
'remoteId' => $contentInfo->remoteId,
221-
'mainLanguageCode' => $contentInfo->mainLanguageCode,
222-
'mainLocationId' => $contentInfo->mainLocationId,
223-
'name' => $contentInfo->name,
224-
'languageCode' => $contentInfo->languageCode,
225-
'contentTypeIdentifier' => $contentInfo->contentTypeIdentifier,
226-
'contentTypeName' => $contentInfo->contentTypeName,
227-
'contentTypeDescription' => $contentInfo->contentTypeDescription,
228-
'innerContentInfo' => '[An instance of Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo]',
229-
'innerContentType' => '[An instance of Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType]',
230-
'mainLocation' => '[An instance of Netgen\IbexaSiteApi\API\Values\Location]',
231-
],
232-
$contentInfo->__debugInfo(),
233-
);
234190
}
235191

236192
protected function assertFields(Content $content, array $data): void
@@ -300,25 +256,6 @@ protected function assertField(Content $content, string $identifier, string $lan
300256
} catch (PropertyNotFoundException) {
301257
// Do nothing
302258
}
303-
304-
self::assertSame(
305-
[
306-
'id' => $field->id,
307-
'fieldDefIdentifier' => $field->fieldDefIdentifier,
308-
'value' => $field->value,
309-
'languageCode' => $field->languageCode,
310-
'fieldTypeIdentifier' => $field->fieldTypeIdentifier,
311-
'name' => $field->name,
312-
'description' => $field->description,
313-
'content' => '[An instance of Netgen\IbexaSiteApi\API\Values\Content]',
314-
'contentId' => $field->content->id,
315-
'isEmpty' => $field->isEmpty(),
316-
'isSurrogate' => $field->isSurrogate(),
317-
'innerField' => '[An instance of Ibexa\Contracts\Core\Repository\Values\Content\Field]',
318-
'innerFieldDefinition' => $field->innerFieldDefinition,
319-
],
320-
$field->__debugInfo(),
321-
);
322259
}
323260

324261
protected function assertLocation(Location $location, array $data): void
@@ -373,30 +310,5 @@ protected function assertLocation(Location $location, array $data): void
373310
} catch (PropertyNotFoundException) {
374311
// Do nothing
375312
}
376-
377-
self::assertSame(
378-
[
379-
'id' => $location->id,
380-
'status' => $location->status,
381-
'priority' => $location->priority,
382-
'hidden' => $location->hidden,
383-
'invisible' => $location->invisible,
384-
'explicitlyHidden' => $location->explicitlyHidden,
385-
'isVisible' => $location->isVisible,
386-
'remoteId' => $location->remoteId,
387-
'parentLocationId' => $location->parentLocationId,
388-
'pathString' => $location->pathString,
389-
'path' => $location->path,
390-
'depth' => $location->depth,
391-
'sortField' => $location->sortField,
392-
'sortOrder' => $location->sortOrder,
393-
'contentId' => $location->contentId,
394-
'innerLocation' => '[An instance of Ibexa\Contracts\Core\Repository\Values\Content\Location]',
395-
'contentInfo' => $location->contentInfo,
396-
'parent' => '[An instance of Netgen\IbexaSiteApi\API\Values\Location]',
397-
'content' => '[An instance of Netgen\IbexaSiteApi\API\Values\Content]',
398-
],
399-
$location->__debugInfo(),
400-
);
401313
}
402314
}

tests/lib/Unit/Core/Site/Values/FieldsTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -301,16 +301,6 @@ public function testFirstNonEmptyFieldReturnsSurrogateField(): void
301301
self::assertTrue($field->isEmpty());
302302
}
303303

304-
public function testDebugInfo(): void
305-
{
306-
$fields = $this->getFieldsUnderTest(true);
307-
308-
self::assertSame(
309-
(array) $fields->getIterator(),
310-
$fields->__debugInfo(),
311-
);
312-
}
313-
314304
protected function getFieldsUnderTest(bool $failOnMissingField): Fields
315305
{
316306
return new Fields(

0 commit comments

Comments
 (0)