diff --git a/.tours/welcome-to-dreamhouse.tour b/.tours/welcome-to-dreamhouse.tour index d447cf7a0..a4127cbcd 100644 --- a/.tours/welcome-to-dreamhouse.tour +++ b/.tours/welcome-to-dreamhouse.tour @@ -35,7 +35,7 @@ { "title": "Property Controller", "file": "force-app/main/default/classes/PropertyController.cls", - "line": 13, + "line": 16, "description": "The `getPagedPropertyList` method from the `PropertyController` Apex class is where properties are retrieved from the Platform.\n\nThe method builds a SOQL query with the provided filters and returns a paginated list of `Property__c` records wrapped in a `PagedResult` object.\n\n`getPagedPropertyList` is exposed to Lightning Web Components thanks to the `@AuraEnabled` annotation. The `cacheable=true` attribute indicates that the returned data is cached.\n\n---\n\nWhile there is a lot to get to know in Dreamhouse, and a lot of code, we'd like to leave off the code tour at this point and suggest you explore the app further in a couple of other ways. \n- One way you can do this is to use our [Quick Start](https://trailhead.salesforce.com/en/content/learn/projects/quick-start-dreamhouse-sample-app) on Trailhead. This will walk you through deploying the app and getting to know it a bit, as well as explore some of the other code samples. \n- But if you prefer to take yourself through the app, you can skip right to the installation instructions that are available in the git repo's [README](https://github.com/trailheadapps/dreamhouse-lwc). From there you can explore the examples bit by bit. There is also an in-app tour that will familiarize you with the app. \n- Lastly, if notice any issue with the app, please open an [issue](https://github.com/trailheadapps/dreamhouse-lwc/issues/new/choose) and let us know.\n\nThanks! And enjoy the Dreamhouse sample app. " } ], diff --git a/force-app/main/default/classes/PropertyController.cls b/force-app/main/default/classes/PropertyController.cls index 0fd38adde..d49db207a 100644 --- a/force-app/main/default/classes/PropertyController.cls +++ b/force-app/main/default/classes/PropertyController.cls @@ -22,15 +22,11 @@ public with sharing class PropertyController { Integer pageNumber ) { // Normalize inputs - Decimal safeMaxPrice = (maxPrice == null - ? DEFAULT_MAX_PRICE - : maxPrice); - Integer safeMinBedrooms = (minBedrooms == null ? 0 : minBedrooms); - Integer safeMinBathrooms = (minBathrooms == null ? 0 : minBathrooms); - Integer safePageSize = (pageSize == null - ? DEFAULT_PAGE_SIZE - : pageSize); - Integer safePageNumber = (pageNumber == null ? 1 : pageNumber); + Decimal safeMaxPrice = maxPrice ?? DEFAULT_MAX_PRICE; + Integer safeMinBedrooms = minBedrooms ?? 0; + Integer safeMinBathrooms = minBathrooms ?? 0; + Integer safePageSize = pageSize ?? DEFAULT_PAGE_SIZE; + Integer safePageNumber = pageNumber ?? 1; String searchPattern = '%' + searchKey + '%'; Integer offset = (safePageNumber - 1) * safePageSize; diff --git a/package-lock.json b/package-lock.json index 914599666..6c12a1a3a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "husky": "^9.0.7", "lint-staged": "^15.2.1", "prettier": "^3.2.5", - "prettier-plugin-apex": "^2.0.1" + "prettier-plugin-apex": "^2.1.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -11362,23 +11362,21 @@ } }, "node_modules/prettier-plugin-apex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/prettier-plugin-apex/-/prettier-plugin-apex-2.0.1.tgz", - "integrity": "sha512-S64zate3iXPKiBKHf27YRapIAPPd1wQ/u5IOcWwSHNgoJv15I14HhoUB/WOKXtxFb0ZH5MO1nF8gRGWXLajwlA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/prettier-plugin-apex/-/prettier-plugin-apex-2.1.0.tgz", + "integrity": "sha512-km/Aqy/ZtkSkBxe8APN+ue87OA7ApL9q0mmI6ryQrVpGpcj+0ZLTiOFyR5K9t8NpTkTEvXdFuHlYmNzw9IirTw==", "dev": true, "dependencies": { "jest-docblock": "^29.0.0", - "wait-on": "^7.0.0" + "wait-on": "^7.2.0" }, "bin": { "apex-ast-serializer": "vendor/apex-ast-serializer/bin/apex-ast-serializer", "apex-ast-serializer-http": "vendor/apex-ast-serializer/bin/apex-ast-serializer-http", + "install-apex-executables": "dist/bin/install-apex-executables.js", "start-apex-server": "dist/bin/start-apex-server.js", "stop-apex-server": "dist/bin/stop-apex-server.js" }, - "engines": { - "node": ">= 18.11.0" - }, "peerDependencies": { "prettier": "^3.0.0" } diff --git a/package.json b/package.json index 400a5a193..22c6dbefb 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "husky": "^9.0.7", "lint-staged": "^15.2.1", "prettier": "^3.2.5", - "prettier-plugin-apex": "^2.0.1" + "prettier-plugin-apex": "^2.1.0" }, "dependencies": {}, "volta": {