Skip to content

Commit

Permalink
Fixed some linting
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-str committed Jul 12, 2024
1 parent 9bcce5f commit fa44e5f
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
accessing
isValid

self questionList notEmpty ifFalse: [^ false].
self questionList do: [:question | (question title isEmptyOrNil not and: [question choiceList notEmpty or: [question isFreeTextQuestion]]) ifFalse: [^ false]].
self questionList ifEmpty: [^ false].
(self questionList contains: [:question | (question title isEmptyOrNil not and: [question choiceList notEmpty or: [question isFreeTextQuestion]]) not]) ifTrue: [^ false].
^ true
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"getChoiceIdentifiersFor:" : "FLST 7/11/2024 20:42",
"getChoiceNamesFor:" : "bwe 5/22/2022 20:26",
"initialize" : "FLST 7/11/2024 20:42",
"isValid" : "FLST 7/11/2024 20:42",
"isValid" : "FLST 7/12/2024 09:23",
"pollDraftId" : "FLST 7/11/2024 20:42",
"pollDraftId:" : "FLST 7/11/2024 20:42",
"questionList" : "NM 5/13/2021 14:01",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ testNewWithPollDraft
| pollDraftBuilder |
pollDraftBuilder := LQPollDraftBuilder newWithPollDraft: self pollDraft.
self assert: pollDraftBuilder questionBuilders size equals: 3.
self assert: (pollDraftBuilder questionBuilders at: 1) class equals: LQMultiChoiceQuestionBuilder.
self assert: (pollDraftBuilder questionBuilders at: 2) class equals: LQPriorityQuestionBuilder.
self assert: (pollDraftBuilder questionBuilders at: 3) class equals: LQFreeTextQuestionBuilder.
self assert: (pollDraftBuilder questionBuilders first) class equals: LQMultiChoiceQuestionBuilder.
self assert: (pollDraftBuilder questionBuilders second) class equals: LQPriorityQuestionBuilder.
self assert: (pollDraftBuilder questionBuilders third) class equals: LQFreeTextQuestionBuilder.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"pollDraft:" : "vl 6/6/2024 20:06",
"setUp" : "vl 6/6/2024 20:02",
"tearDown" : "vl 6/6/2024 20:20",
"testNewWithPollDraft" : "vl 7/10/2024 13:33",
"testNewWithPollDraft" : "FLST 7/12/2024 09:19",
"testRemovePollDrafts" : "vl 6/6/2024 20:20",
"testSavePollDrafts" : "vl 6/7/2024 14:27" } }
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
instance creation
newWithPollDraft: aLQPollDraft

| aPollDraftBuilder |
| aPollDraftBuilder questionBuilders |
aPollDraftBuilder := self new.
aPollDraftBuilder pollDraft: aLQPollDraft.
aPollDraftBuilder questionBuilders removeAll.
aLQPollDraft questionList do: [:currentQuestion | | questionBuilder |
questionBuilders := aLQPollDraft questionList collect: [:currentQuestion | | questionBuilder |
currentQuestion isMultiChoiceQuestion ifTrue: [questionBuilder := LQMultiChoiceQuestionBuilder new].
currentQuestion isPriorityQuestion ifTrue: [questionBuilder := LQPriorityQuestionBuilder new].
currentQuestion isFreeTextQuestion ifTrue: [questionBuilder := LQFreeTextQuestionBuilder new].
questionBuilder question: currentQuestion.
aPollDraftBuilder questionBuilders add: questionBuilder].
questionBuilder].
aPollDraftBuilder questionBuilders addAll: questionBuilders.
^ aPollDraftBuilder

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
modifying
removeQuestion

self questionBuilders size > 0 ifTrue: [
self questionBuilders ifNotEmpty: [
self pollDraft removeQuestionAt: self getIndex.
self removeQuestionBuilderAt: self getIndex.
self setIndex: self questionBuilders size.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"class" : {
"newWithPollDraft:" : "FLST 7/11/2024 20:44",
"newWithPollDraft:" : "FLST 7/12/2024 09:23",
"newWithTitle:" : "ape 7/23/2022 09:58",
"newWithTitle:and:" : "Ingmar Vogel 6/7/2024 11:53" },
"instance" : {
Expand Down Expand Up @@ -29,8 +29,6 @@
"frame:fromTop:fromLeft:width:" : "FLST 7/11/2024 20:44",
"generateRandomID" : "FLST 7/11/2024 20:44",
"getIndex" : "bn 8/2/2022 16:58",
"host" : "FLST 7/11/2024 20:44",
"host:" : "FLST 7/11/2024 20:44",
"initialize" : "FLST 7/11/2024 20:44",
"list" : "bn 8/2/2022 16:58",
"openManageUserSetsMenu" : "bn 8/2/2022 18:08",
Expand All @@ -41,7 +39,7 @@
"questionBuilders" : "FLST 7/11/2024 20:44",
"questionBuilders:" : "FLST 7/11/2024 20:44",
"questionListFrame" : "FLST 7/11/2024 20:44",
"removeQuestion" : "FLST 7/11/2024 20:44",
"removeQuestion" : "FLST 7/12/2024 08:46",
"removeQuestionBuilderAt:" : "FLST 7/11/2024 20:44",
"removeQuestionButtonFrame" : "FLST 7/11/2024 20:44",
"runPoll" : "FLST 7/11/2024 20:44",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ modifying
populatePollDrafts

| draftCollection |
draftCollection := OrderedCollection new.
LQRemotePollRepoServer pollDraftRepo items do: [:item | draftCollection add: item].
draftCollection := LQRemotePollRepoServer pollDraftRepo items collect: [:item | item].
self pollDrafts: draftCollection
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"initialize" : "FLST 7/11/2024 20:44",
"pollDrafts" : "FLST 7/11/2024 20:44",
"pollDrafts:" : "FLST 7/11/2024 20:44",
"populatePollDrafts" : "FLST 7/11/2024 20:44",
"populatePollDrafts" : "FLST 7/12/2024 09:23",
"removeDraft" : "FLST 7/11/2024 20:44",
"showDraft" : "FLST 7/11/2024 20:44" } }
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
validation
isEveryChoiceRanked

^ self question isPriorityQuestion ==> (self selectedChoices size = self question maxNumberOfChoices)
^ self question isPriorityQuestion ==> (self selectedChoices size = self question maxNumberOfChoices)
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"getRankingIndices" : "FLST 7/11/2024 20:44",
"getRemainingVotedChoices" : "Anton Eichstädt 6/4/2024 11:59",
"initialize" : "FLST 7/11/2024 20:44",
"isEveryChoiceRanked" : "FLST 7/11/2024 20:44",
"isEveryChoiceRanked" : "FLST 7/12/2024 09:23",
"isValidSelection:ForChoiceAt:" : "Anton Eichstädt 5/25/2024 14:21",
"isValidSizedSelection:" : "FLST 7/11/2024 20:44",
"question:" : "FLST 7/11/2024 20:44",
Expand Down

0 comments on commit fa44e5f

Please sign in to comment.