Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dev --> main PR comments #155

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Controller/AttachmentsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public function create(ObjectService $objectService): JSONResponse
$object = $this->objectService->saveObject('attachment', $data);

// If object is a class change it to array
if (is_object($object)) {
if (is_object($object) === true) {
$object = $object->jsonSerialize();
}

Expand Down
4 changes: 2 additions & 2 deletions lib/Controller/CatalogiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class CatalogiController extends Controller
* @param CatalogMapper $catalogMapper The catalog mapper
* @param ObjectService $objectService The object service
* @param DirectoryService $directoryService The directory service
* @param BroadcastService $broadcastService The broadcast service
* @param BroadcastService $broadcastService The broadcast service
* @param IURLGenerator $urlGenerator The URL generator
*/
public function __construct(
Expand Down Expand Up @@ -118,7 +118,7 @@ public function create(ObjectService $objectService): JSONResponse
$object = $this->objectService->saveObject('catalog', $data);

// If object is a class change it to array
if (is_object($object)) {
if (is_object($object) === true) {
$object = $object->jsonSerialize();
}

Expand Down
6 changes: 3 additions & 3 deletions lib/Controller/OrganizationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class OrganizationsController extends Controller
* @param IRequest $request The request object
* @param IAppConfig $config The app configuration
* @param OrganizationMapper $organizationMapper The organization mapper
* @param ObjectService $objectService The object service
* @param ObjectService $objectService The object service
* @param IURLGenerator $urlGenerator The URL generator
*/
public function __construct(
Expand Down Expand Up @@ -112,7 +112,7 @@ public function create(): JSONResponse
$object = $this->objectService->saveObject('organization', $data);

// If object is a class change it to array
if (is_object($object)) {
if (is_object($object) === true) {
$object = $object->jsonSerialize();
}

Expand Down Expand Up @@ -145,7 +145,7 @@ public function update(string|int $id): JSONResponse

// If we do not have an uri, we need to generate one
$data['uri'] = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkToRoute('openCatalogi.organizations.show', ['id' => $data['id']]));

// Save the updated organization object
$object = $this->objectService->saveObject('organization', $data);

Expand Down
6 changes: 3 additions & 3 deletions lib/Controller/PublicationTypesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function create(): JSONResponse
$object = $this->objectService->saveObject('publicationType', $data);

// If object is a class change it to array
if (is_object($object)) {
if (is_object($object) === true) {
$object = $object->jsonSerialize();
}

Expand Down Expand Up @@ -157,7 +157,7 @@ public function update(string|int $id): JSONResponse

// If we do not have an uri, we need to generate one
$data['uri'] = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkToRoute('openCatalogi.publicationTypes.show', ['id' => $data['id']]));


// Save the updated publication type object
$object = $this->objectService->saveObject('publicationType', $data);
Expand Down Expand Up @@ -186,7 +186,7 @@ public function destroy(string|int $id): JSONResponse
// Return the result as a JSON response
return new JSONResponse(['success' => $result], $result === true ? '200' : '404');
}

/**
* Synchronize or delete a publication type based on listing status
*
Expand Down
4 changes: 2 additions & 2 deletions lib/Controller/PublicationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class PublicationsController extends Controller
* @param DownloadService $downloadService The download service
* @param ObjectService $objectService The object service
* @param IURLGenerator $urlGenerator The URL generator
*
*
*/
public function __construct
(
Expand Down Expand Up @@ -202,7 +202,7 @@ public function create(ObjectService $objectService): JSONResponse
$object = $this->objectService->saveObject('publication', $data);

// If object is a class change it to array
if (is_object($object)) {
if (is_object($object) === true) {
$object = $object->jsonSerialize();
}

Expand Down
6 changes: 3 additions & 3 deletions lib/Controller/ThemesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ public function create(): JSONResponse
$object = $this->objectService->saveObject('theme', $data);

// If object is a class change it to array
if (is_object($object)) {
if (is_object($object) === true) {
$object = $object->jsonSerialize();
}

// If we do not have an uri, we need to generate one
if (isset($object['uri']) === false) {
$object['uri'] = $this->urlGenerator->getAbsoluteURL($$this->urlGenerator->linkToRoute('openCatalogi.themes.show', ['id' => $object['id']]));
Expand All @@ -129,7 +129,7 @@ public function update(string|int $id): JSONResponse
$data = $this->request->getParams();

// Ensure the ID in the data matches the ID in the URL
$data['id'] = $id;
$data['id'] = $id;

// If we do not have an uri, we need to generate one
$data['uri'] = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkToRoute('openCatalogi.themes.show', ['id' => $data['id']]));
Expand Down