Skip to content

Commit

Permalink
Fix dev --> main PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rjzondervan committed Dec 9, 2024
1 parent 172ee0a commit 345d3ce
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
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

0 comments on commit 345d3ce

Please sign in to comment.