| Total Complexity | 65 |
| Total Lines | 1005 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
Complex classes like CSurvey often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use CSurvey, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 21 | class CSurvey |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var int |
||
| 25 | * |
||
| 26 | * @ORM\Column(name="iid", type="integer") |
||
| 27 | * @ORM\Id |
||
| 28 | * @ORM\GeneratedValue |
||
| 29 | */ |
||
| 30 | protected $iid; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var int |
||
| 34 | * |
||
| 35 | * @ORM\Column(name="c_id", type="integer") |
||
| 36 | */ |
||
| 37 | protected $cId; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @var int |
||
| 41 | * |
||
| 42 | * @ORM\Column(name="survey_id", type="integer") |
||
| 43 | */ |
||
| 44 | protected $surveyId; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @var string |
||
| 48 | * |
||
| 49 | * @ORM\Column(name="code", type="string", length=20, nullable=true) |
||
| 50 | */ |
||
| 51 | protected $code; |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @var string |
||
| 55 | * |
||
| 56 | * @ORM\Column(name="title", type="text", nullable=true) |
||
| 57 | */ |
||
| 58 | protected $title; |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @var string |
||
| 62 | * |
||
| 63 | * @ORM\Column(name="subtitle", type="text", nullable=true) |
||
| 64 | */ |
||
| 65 | protected $subtitle; |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @var string |
||
| 69 | * |
||
| 70 | * @ORM\Column(name="author", type="string", length=20, nullable=true) |
||
| 71 | */ |
||
| 72 | protected $author; |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @var string |
||
| 76 | * |
||
| 77 | * @ORM\Column(name="lang", type="string", length=20, nullable=true) |
||
| 78 | */ |
||
| 79 | protected $lang; |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @var \DateTime |
||
| 83 | * |
||
| 84 | * @ORM\Column(name="avail_from", type="date", nullable=true) |
||
| 85 | */ |
||
| 86 | protected $availFrom; |
||
| 87 | |||
| 88 | /** |
||
| 89 | * @var \DateTime |
||
| 90 | * |
||
| 91 | * @ORM\Column(name="avail_till", type="date", nullable=true) |
||
| 92 | */ |
||
| 93 | protected $availTill; |
||
| 94 | |||
| 95 | /** |
||
| 96 | * @var string |
||
| 97 | * |
||
| 98 | * @ORM\Column(name="is_shared", type="string", length=1, nullable=true) |
||
| 99 | */ |
||
| 100 | protected $isShared; |
||
| 101 | |||
| 102 | /** |
||
| 103 | * @var string |
||
| 104 | * |
||
| 105 | * @ORM\Column(name="template", type="string", length=20, nullable=true) |
||
| 106 | */ |
||
| 107 | protected $template; |
||
| 108 | |||
| 109 | /** |
||
| 110 | * @var string |
||
| 111 | * |
||
| 112 | * @ORM\Column(name="intro", type="text", nullable=true) |
||
| 113 | */ |
||
| 114 | protected $intro; |
||
| 115 | |||
| 116 | /** |
||
| 117 | * @var string |
||
| 118 | * |
||
| 119 | * @ORM\Column(name="surveythanks", type="text", nullable=true) |
||
| 120 | */ |
||
| 121 | protected $surveyThanks; |
||
| 122 | |||
| 123 | /** |
||
| 124 | * @var \DateTime |
||
| 125 | * |
||
| 126 | * @ORM\Column(name="creation_date", type="datetime", nullable=false) |
||
| 127 | */ |
||
| 128 | protected $creationDate; |
||
| 129 | |||
| 130 | /** |
||
| 131 | * @var int |
||
| 132 | * |
||
| 133 | * @ORM\Column(name="invited", type="integer", nullable=false) |
||
| 134 | */ |
||
| 135 | protected $invited; |
||
| 136 | |||
| 137 | /** |
||
| 138 | * @var int |
||
| 139 | * |
||
| 140 | * @ORM\Column(name="answered", type="integer", nullable=false) |
||
| 141 | */ |
||
| 142 | protected $answered; |
||
| 143 | |||
| 144 | /** |
||
| 145 | * @var string |
||
| 146 | * |
||
| 147 | * @ORM\Column(name="invite_mail", type="text", nullable=false) |
||
| 148 | */ |
||
| 149 | protected $inviteMail; |
||
| 150 | |||
| 151 | /** |
||
| 152 | * @var string |
||
| 153 | * |
||
| 154 | * @ORM\Column(name="reminder_mail", type="text", nullable=false) |
||
| 155 | */ |
||
| 156 | protected $reminderMail; |
||
| 157 | |||
| 158 | /** |
||
| 159 | * @var string |
||
| 160 | * |
||
| 161 | * @ORM\Column(name="mail_subject", type="string", length=255, nullable=false) |
||
| 162 | */ |
||
| 163 | protected $mailSubject; |
||
| 164 | |||
| 165 | /** |
||
| 166 | * @var string |
||
| 167 | * |
||
| 168 | * @ORM\Column(name="anonymous", type="string", length=10, nullable=false) |
||
| 169 | */ |
||
| 170 | protected $anonymous; |
||
| 171 | |||
| 172 | /** |
||
| 173 | * @var string |
||
| 174 | * |
||
| 175 | * @ORM\Column(name="access_condition", type="text", nullable=true) |
||
| 176 | */ |
||
| 177 | protected $accessCondition; |
||
| 178 | |||
| 179 | /** |
||
| 180 | * @var bool |
||
| 181 | * |
||
| 182 | * @ORM\Column(name="shuffle", type="boolean", nullable=false) |
||
| 183 | */ |
||
| 184 | protected $shuffle; |
||
| 185 | |||
| 186 | /** |
||
| 187 | * @var bool |
||
| 188 | * |
||
| 189 | * @ORM\Column(name="one_question_per_page", type="boolean", nullable=false) |
||
| 190 | */ |
||
| 191 | protected $oneQuestionPerPage; |
||
| 192 | |||
| 193 | /** |
||
| 194 | * @var string |
||
| 195 | * |
||
| 196 | * @ORM\Column(name="survey_version", type="string", length=255, nullable=false) |
||
| 197 | */ |
||
| 198 | protected $surveyVersion; |
||
| 199 | |||
| 200 | /** |
||
| 201 | * @var int |
||
| 202 | * |
||
| 203 | * @ORM\Column(name="parent_id", type="integer", nullable=false) |
||
| 204 | */ |
||
| 205 | protected $parentId; |
||
| 206 | |||
| 207 | /** |
||
| 208 | * @var int |
||
| 209 | * |
||
| 210 | * @ORM\Column(name="survey_type", type="integer", nullable=false) |
||
| 211 | */ |
||
| 212 | protected $surveyType; |
||
| 213 | |||
| 214 | /** |
||
| 215 | * @var int |
||
| 216 | * |
||
| 217 | * @ORM\Column(name="show_form_profile", type="integer", nullable=false) |
||
| 218 | */ |
||
| 219 | protected $showFormProfile; |
||
| 220 | |||
| 221 | /** |
||
| 222 | * @var string |
||
| 223 | * |
||
| 224 | * @ORM\Column(name="form_fields", type="text", nullable=false) |
||
| 225 | */ |
||
| 226 | protected $formFields; |
||
| 227 | |||
| 228 | /** |
||
| 229 | * @var int |
||
| 230 | * |
||
| 231 | * @ORM\Column(name="session_id", type="integer", nullable=false) |
||
| 232 | */ |
||
| 233 | protected $sessionId; |
||
| 234 | |||
| 235 | /** |
||
| 236 | * @var int |
||
| 237 | * |
||
| 238 | * @ORM\Column(name="visible_results", type="integer", nullable=true) |
||
| 239 | */ |
||
| 240 | protected $visibleResults; |
||
| 241 | |||
| 242 | /** |
||
| 243 | * @var bool |
||
| 244 | * |
||
| 245 | * @ORM\Column(name="is_mandatory", type="boolean", options={"default":false}) |
||
| 246 | */ |
||
| 247 | protected $isMandatory = false; |
||
| 248 | |||
| 249 | /** |
||
| 250 | * CSurvey constructor. |
||
| 251 | */ |
||
| 252 | public function __construct() |
||
| 253 | { |
||
| 254 | $this->creationDate = new \DateTime(); |
||
| 255 | $this->invited = 0; |
||
| 256 | $this->answered = 0; |
||
| 257 | $this->surveyId = 0; |
||
| 258 | $this->inviteMail = ''; |
||
| 259 | $this->reminderMail = ''; |
||
| 260 | $this->mailSubject = ''; |
||
| 261 | $this->shuffle = 0; |
||
|
|
|||
| 262 | $this->oneQuestionPerPage = 0; |
||
| 263 | $this->surveyVersion = ''; |
||
| 264 | $this->parentId = 0; |
||
| 265 | $this->surveyType = 0; |
||
| 266 | } |
||
| 267 | |||
| 268 | /** |
||
| 269 | * @return int |
||
| 270 | */ |
||
| 271 | public function getIid(): int |
||
| 272 | { |
||
| 273 | return $this->iid; |
||
| 274 | } |
||
| 275 | |||
| 276 | /** |
||
| 277 | * @param int $iid |
||
| 278 | * |
||
| 279 | * @return CSurvey |
||
| 280 | */ |
||
| 281 | public function setIid(int $iid): CSurvey |
||
| 282 | { |
||
| 283 | $this->iid = $iid; |
||
| 284 | |||
| 285 | return $this; |
||
| 286 | } |
||
| 287 | |||
| 288 | /** |
||
| 289 | * Set code. |
||
| 290 | * |
||
| 291 | * @param string $code |
||
| 292 | * |
||
| 293 | * @return CSurvey |
||
| 294 | */ |
||
| 295 | public function setCode($code) |
||
| 296 | { |
||
| 297 | $this->code = $code; |
||
| 298 | |||
| 299 | return $this; |
||
| 300 | } |
||
| 301 | |||
| 302 | /** |
||
| 303 | * Get code. |
||
| 304 | * |
||
| 305 | * @return string |
||
| 306 | */ |
||
| 307 | public function getCode() |
||
| 308 | { |
||
| 309 | return $this->code; |
||
| 310 | } |
||
| 311 | |||
| 312 | /** |
||
| 313 | * Set title. |
||
| 314 | * |
||
| 315 | * @param string $title |
||
| 316 | * |
||
| 317 | * @return CSurvey |
||
| 318 | */ |
||
| 319 | public function setTitle($title) |
||
| 320 | { |
||
| 321 | $this->title = $title; |
||
| 322 | |||
| 323 | return $this; |
||
| 324 | } |
||
| 325 | |||
| 326 | /** |
||
| 327 | * Get title. |
||
| 328 | * |
||
| 329 | * @return string |
||
| 330 | */ |
||
| 331 | public function getTitle() |
||
| 332 | { |
||
| 333 | return $this->title; |
||
| 334 | } |
||
| 335 | |||
| 336 | /** |
||
| 337 | * Set subtitle. |
||
| 338 | * |
||
| 339 | * @param string $subtitle |
||
| 340 | * |
||
| 341 | * @return CSurvey |
||
| 342 | */ |
||
| 343 | public function setSubtitle($subtitle) |
||
| 344 | { |
||
| 345 | $this->subtitle = $subtitle; |
||
| 346 | |||
| 347 | return $this; |
||
| 348 | } |
||
| 349 | |||
| 350 | /** |
||
| 351 | * Get subtitle. |
||
| 352 | * |
||
| 353 | * @return string |
||
| 354 | */ |
||
| 355 | public function getSubtitle() |
||
| 356 | { |
||
| 357 | return $this->subtitle; |
||
| 358 | } |
||
| 359 | |||
| 360 | /** |
||
| 361 | * Set author. |
||
| 362 | * |
||
| 363 | * @param string $author |
||
| 364 | * |
||
| 365 | * @return CSurvey |
||
| 366 | */ |
||
| 367 | public function setAuthor($author) |
||
| 368 | { |
||
| 369 | $this->author = $author; |
||
| 370 | |||
| 371 | return $this; |
||
| 372 | } |
||
| 373 | |||
| 374 | /** |
||
| 375 | * Get author. |
||
| 376 | * |
||
| 377 | * @return string |
||
| 378 | */ |
||
| 379 | public function getAuthor() |
||
| 380 | { |
||
| 381 | return $this->author; |
||
| 382 | } |
||
| 383 | |||
| 384 | /** |
||
| 385 | * Set lang. |
||
| 386 | * |
||
| 387 | * @param string $lang |
||
| 388 | * |
||
| 389 | * @return CSurvey |
||
| 390 | */ |
||
| 391 | public function setLang($lang) |
||
| 392 | { |
||
| 393 | $this->lang = $lang; |
||
| 394 | |||
| 395 | return $this; |
||
| 396 | } |
||
| 397 | |||
| 398 | /** |
||
| 399 | * Get lang. |
||
| 400 | * |
||
| 401 | * @return string |
||
| 402 | */ |
||
| 403 | public function getLang() |
||
| 404 | { |
||
| 405 | return $this->lang; |
||
| 406 | } |
||
| 407 | |||
| 408 | /** |
||
| 409 | * Set availFrom. |
||
| 410 | * |
||
| 411 | * @param \DateTime $availFrom |
||
| 412 | * |
||
| 413 | * @return CSurvey |
||
| 414 | */ |
||
| 415 | public function setAvailFrom($availFrom) |
||
| 416 | { |
||
| 417 | $this->availFrom = $availFrom; |
||
| 418 | |||
| 419 | return $this; |
||
| 420 | } |
||
| 421 | |||
| 422 | /** |
||
| 423 | * Get availFrom. |
||
| 424 | * |
||
| 425 | * @return \DateTime |
||
| 426 | */ |
||
| 427 | public function getAvailFrom() |
||
| 428 | { |
||
| 429 | return $this->availFrom; |
||
| 430 | } |
||
| 431 | |||
| 432 | /** |
||
| 433 | * Set availTill. |
||
| 434 | * |
||
| 435 | * @param \DateTime $availTill |
||
| 436 | * |
||
| 437 | * @return CSurvey |
||
| 438 | */ |
||
| 439 | public function setAvailTill($availTill) |
||
| 440 | { |
||
| 441 | $this->availTill = $availTill; |
||
| 442 | |||
| 443 | return $this; |
||
| 444 | } |
||
| 445 | |||
| 446 | /** |
||
| 447 | * Get availTill. |
||
| 448 | * |
||
| 449 | * @return \DateTime |
||
| 450 | */ |
||
| 451 | public function getAvailTill() |
||
| 452 | { |
||
| 453 | return $this->availTill; |
||
| 454 | } |
||
| 455 | |||
| 456 | /** |
||
| 457 | * Set isShared. |
||
| 458 | * |
||
| 459 | * @param string $isShared |
||
| 460 | * |
||
| 461 | * @return CSurvey |
||
| 462 | */ |
||
| 463 | public function setIsShared($isShared) |
||
| 464 | { |
||
| 465 | $this->isShared = $isShared; |
||
| 466 | |||
| 467 | return $this; |
||
| 468 | } |
||
| 469 | |||
| 470 | /** |
||
| 471 | * Get isShared. |
||
| 472 | * |
||
| 473 | * @return string |
||
| 474 | */ |
||
| 475 | public function getIsShared() |
||
| 476 | { |
||
| 477 | return $this->isShared; |
||
| 478 | } |
||
| 479 | |||
| 480 | /** |
||
| 481 | * Set template. |
||
| 482 | * |
||
| 483 | * @param string $template |
||
| 484 | * |
||
| 485 | * @return CSurvey |
||
| 486 | */ |
||
| 487 | public function setTemplate($template) |
||
| 488 | { |
||
| 489 | $this->template = $template; |
||
| 490 | |||
| 491 | return $this; |
||
| 492 | } |
||
| 493 | |||
| 494 | /** |
||
| 495 | * Get template. |
||
| 496 | * |
||
| 497 | * @return string |
||
| 498 | */ |
||
| 499 | public function getTemplate() |
||
| 500 | { |
||
| 501 | return $this->template; |
||
| 502 | } |
||
| 503 | |||
| 504 | /** |
||
| 505 | * Set intro. |
||
| 506 | * |
||
| 507 | * @param string $intro |
||
| 508 | * |
||
| 509 | * @return CSurvey |
||
| 510 | */ |
||
| 511 | public function setIntro($intro) |
||
| 512 | { |
||
| 513 | $this->intro = $intro; |
||
| 514 | |||
| 515 | return $this; |
||
| 516 | } |
||
| 517 | |||
| 518 | /** |
||
| 519 | * Get intro. |
||
| 520 | * |
||
| 521 | * @return string |
||
| 522 | */ |
||
| 523 | public function getIntro() |
||
| 524 | { |
||
| 525 | return $this->intro; |
||
| 526 | } |
||
| 527 | |||
| 528 | /** |
||
| 529 | * Set surveythanks. |
||
| 530 | * |
||
| 531 | * @param string $surveythanks |
||
| 532 | * |
||
| 533 | * @return CSurvey |
||
| 534 | */ |
||
| 535 | public function setSurveythanks($surveythanks) |
||
| 536 | { |
||
| 537 | $this->surveyThanks = $surveythanks; |
||
| 538 | |||
| 539 | return $this; |
||
| 540 | } |
||
| 541 | |||
| 542 | /** |
||
| 543 | * Get surveythanks. |
||
| 544 | * |
||
| 545 | * @return string |
||
| 546 | */ |
||
| 547 | public function getSurveythanks() |
||
| 548 | { |
||
| 549 | return $this->surveyThanks; |
||
| 550 | } |
||
| 551 | |||
| 552 | /** |
||
| 553 | * Set creationDate. |
||
| 554 | * |
||
| 555 | * @param \DateTime $creationDate |
||
| 556 | * |
||
| 557 | * @return CSurvey |
||
| 558 | */ |
||
| 559 | public function setCreationDate($creationDate) |
||
| 560 | { |
||
| 561 | $this->creationDate = $creationDate; |
||
| 562 | |||
| 563 | return $this; |
||
| 564 | } |
||
| 565 | |||
| 566 | /** |
||
| 567 | * Get creationDate. |
||
| 568 | * |
||
| 569 | * @return \DateTime |
||
| 570 | */ |
||
| 571 | public function getCreationDate() |
||
| 572 | { |
||
| 573 | return $this->creationDate; |
||
| 574 | } |
||
| 575 | |||
| 576 | /** |
||
| 577 | * Set invited. |
||
| 578 | * |
||
| 579 | * @param int $invited |
||
| 580 | * |
||
| 581 | * @return CSurvey |
||
| 582 | */ |
||
| 583 | public function setInvited($invited) |
||
| 584 | { |
||
| 585 | $this->invited = $invited; |
||
| 586 | |||
| 587 | return $this; |
||
| 588 | } |
||
| 589 | |||
| 590 | /** |
||
| 591 | * Get invited. |
||
| 592 | * |
||
| 593 | * @return int |
||
| 594 | */ |
||
| 595 | public function getInvited() |
||
| 596 | { |
||
| 597 | return $this->invited; |
||
| 598 | } |
||
| 599 | |||
| 600 | /** |
||
| 601 | * Set answered. |
||
| 602 | * |
||
| 603 | * @param int $answered |
||
| 604 | * |
||
| 605 | * @return CSurvey |
||
| 606 | */ |
||
| 607 | public function setAnswered($answered) |
||
| 608 | { |
||
| 609 | $this->answered = $answered; |
||
| 610 | |||
| 611 | return $this; |
||
| 612 | } |
||
| 613 | |||
| 614 | /** |
||
| 615 | * Get answered. |
||
| 616 | * |
||
| 617 | * @return int |
||
| 618 | */ |
||
| 619 | public function getAnswered() |
||
| 620 | { |
||
| 621 | return $this->answered; |
||
| 622 | } |
||
| 623 | |||
| 624 | /** |
||
| 625 | * Set inviteMail. |
||
| 626 | * |
||
| 627 | * @param string $inviteMail |
||
| 628 | * |
||
| 629 | * @return CSurvey |
||
| 630 | */ |
||
| 631 | public function setInviteMail($inviteMail) |
||
| 632 | { |
||
| 633 | $this->inviteMail = $inviteMail; |
||
| 634 | |||
| 635 | return $this; |
||
| 636 | } |
||
| 637 | |||
| 638 | /** |
||
| 639 | * Get inviteMail. |
||
| 640 | * |
||
| 641 | * @return string |
||
| 642 | */ |
||
| 643 | public function getInviteMail() |
||
| 644 | { |
||
| 645 | return $this->inviteMail; |
||
| 646 | } |
||
| 647 | |||
| 648 | /** |
||
| 649 | * Set reminderMail. |
||
| 650 | * |
||
| 651 | * @param string $reminderMail |
||
| 652 | * |
||
| 653 | * @return CSurvey |
||
| 654 | */ |
||
| 655 | public function setReminderMail($reminderMail) |
||
| 656 | { |
||
| 657 | $this->reminderMail = $reminderMail; |
||
| 658 | |||
| 659 | return $this; |
||
| 660 | } |
||
| 661 | |||
| 662 | /** |
||
| 663 | * Get reminderMail. |
||
| 664 | * |
||
| 665 | * @return string |
||
| 666 | */ |
||
| 667 | public function getReminderMail() |
||
| 668 | { |
||
| 669 | return $this->reminderMail; |
||
| 670 | } |
||
| 671 | |||
| 672 | /** |
||
| 673 | * Set mailSubject. |
||
| 674 | * |
||
| 675 | * @param string $mailSubject |
||
| 676 | * |
||
| 677 | * @return CSurvey |
||
| 678 | */ |
||
| 679 | public function setMailSubject($mailSubject) |
||
| 680 | { |
||
| 681 | $this->mailSubject = $mailSubject; |
||
| 682 | |||
| 683 | return $this; |
||
| 684 | } |
||
| 685 | |||
| 686 | /** |
||
| 687 | * Get mailSubject. |
||
| 688 | * |
||
| 689 | * @return string |
||
| 690 | */ |
||
| 691 | public function getMailSubject() |
||
| 692 | { |
||
| 693 | return $this->mailSubject; |
||
| 694 | } |
||
| 695 | |||
| 696 | /** |
||
| 697 | * Set anonymous. |
||
| 698 | * |
||
| 699 | * @param string $anonymous |
||
| 700 | * |
||
| 701 | * @return CSurvey |
||
| 702 | */ |
||
| 703 | public function setAnonymous($anonymous) |
||
| 704 | { |
||
| 705 | $this->anonymous = $anonymous; |
||
| 706 | |||
| 707 | return $this; |
||
| 708 | } |
||
| 709 | |||
| 710 | /** |
||
| 711 | * Get anonymous. |
||
| 712 | * |
||
| 713 | * @return string |
||
| 714 | */ |
||
| 715 | public function getAnonymous() |
||
| 716 | { |
||
| 717 | return $this->anonymous; |
||
| 718 | } |
||
| 719 | |||
| 720 | /** |
||
| 721 | * Set accessCondition. |
||
| 722 | * |
||
| 723 | * @param string $accessCondition |
||
| 724 | * |
||
| 725 | * @return CSurvey |
||
| 726 | */ |
||
| 727 | public function setAccessCondition($accessCondition) |
||
| 728 | { |
||
| 729 | $this->accessCondition = $accessCondition; |
||
| 730 | |||
| 731 | return $this; |
||
| 732 | } |
||
| 733 | |||
| 734 | /** |
||
| 735 | * Get accessCondition. |
||
| 736 | * |
||
| 737 | * @return string |
||
| 738 | */ |
||
| 739 | public function getAccessCondition() |
||
| 740 | { |
||
| 741 | return $this->accessCondition; |
||
| 742 | } |
||
| 743 | |||
| 744 | /** |
||
| 745 | * Set shuffle. |
||
| 746 | * |
||
| 747 | * @param bool $shuffle |
||
| 748 | * |
||
| 749 | * @return CSurvey |
||
| 750 | */ |
||
| 751 | public function setShuffle($shuffle) |
||
| 752 | { |
||
| 753 | $this->shuffle = $shuffle; |
||
| 754 | |||
| 755 | return $this; |
||
| 756 | } |
||
| 757 | |||
| 758 | /** |
||
| 759 | * Get shuffle. |
||
| 760 | * |
||
| 761 | * @return bool |
||
| 762 | */ |
||
| 763 | public function getShuffle() |
||
| 764 | { |
||
| 765 | return $this->shuffle; |
||
| 766 | } |
||
| 767 | |||
| 768 | /** |
||
| 769 | * Set oneQuestionPerPage. |
||
| 770 | * |
||
| 771 | * @param bool $oneQuestionPerPage |
||
| 772 | * |
||
| 773 | * @return CSurvey |
||
| 774 | */ |
||
| 775 | public function setOneQuestionPerPage($oneQuestionPerPage) |
||
| 776 | { |
||
| 777 | $this->oneQuestionPerPage = $oneQuestionPerPage; |
||
| 778 | |||
| 779 | return $this; |
||
| 780 | } |
||
| 781 | |||
| 782 | /** |
||
| 783 | * Get oneQuestionPerPage. |
||
| 784 | * |
||
| 785 | * @return bool |
||
| 786 | */ |
||
| 787 | public function getOneQuestionPerPage() |
||
| 788 | { |
||
| 789 | return $this->oneQuestionPerPage; |
||
| 790 | } |
||
| 791 | |||
| 792 | /** |
||
| 793 | * Set surveyVersion. |
||
| 794 | * |
||
| 795 | * @param string $surveyVersion |
||
| 796 | * |
||
| 797 | * @return CSurvey |
||
| 798 | */ |
||
| 799 | public function setSurveyVersion($surveyVersion) |
||
| 800 | { |
||
| 801 | $this->surveyVersion = $surveyVersion; |
||
| 802 | |||
| 803 | return $this; |
||
| 804 | } |
||
| 805 | |||
| 806 | /** |
||
| 807 | * Get surveyVersion. |
||
| 808 | * |
||
| 809 | * @return string |
||
| 810 | */ |
||
| 811 | public function getSurveyVersion() |
||
| 812 | { |
||
| 813 | return $this->surveyVersion; |
||
| 814 | } |
||
| 815 | |||
| 816 | /** |
||
| 817 | * Set parentId. |
||
| 818 | * |
||
| 819 | * @param int $parentId |
||
| 820 | * |
||
| 821 | * @return CSurvey |
||
| 822 | */ |
||
| 823 | public function setParentId($parentId) |
||
| 824 | { |
||
| 825 | $this->parentId = $parentId; |
||
| 826 | |||
| 827 | return $this; |
||
| 828 | } |
||
| 829 | |||
| 830 | /** |
||
| 831 | * Get parentId. |
||
| 832 | * |
||
| 833 | * @return int |
||
| 834 | */ |
||
| 835 | public function getParentId() |
||
| 836 | { |
||
| 837 | return $this->parentId; |
||
| 838 | } |
||
| 839 | |||
| 840 | /** |
||
| 841 | * Set surveyType. |
||
| 842 | * |
||
| 843 | * @param int $surveyType |
||
| 844 | * |
||
| 845 | * @return CSurvey |
||
| 846 | */ |
||
| 847 | public function setSurveyType($surveyType) |
||
| 848 | { |
||
| 849 | $this->surveyType = $surveyType; |
||
| 850 | |||
| 851 | return $this; |
||
| 852 | } |
||
| 853 | |||
| 854 | /** |
||
| 855 | * Get surveyType. |
||
| 856 | * |
||
| 857 | * @return int |
||
| 858 | */ |
||
| 859 | public function getSurveyType() |
||
| 860 | { |
||
| 861 | return $this->surveyType; |
||
| 862 | } |
||
| 863 | |||
| 864 | /** |
||
| 865 | * Set showFormProfile. |
||
| 866 | * |
||
| 867 | * @param int $showFormProfile |
||
| 868 | * |
||
| 869 | * @return CSurvey |
||
| 870 | */ |
||
| 871 | public function setShowFormProfile($showFormProfile) |
||
| 872 | { |
||
| 873 | $this->showFormProfile = $showFormProfile; |
||
| 874 | |||
| 875 | return $this; |
||
| 876 | } |
||
| 877 | |||
| 878 | /** |
||
| 879 | * Get showFormProfile. |
||
| 880 | * |
||
| 881 | * @return int |
||
| 882 | */ |
||
| 883 | public function getShowFormProfile() |
||
| 886 | } |
||
| 887 | |||
| 888 | /** |
||
| 889 | * Set formFields. |
||
| 890 | * |
||
| 891 | * @param string $formFields |
||
| 892 | * |
||
| 893 | * @return CSurvey |
||
| 894 | */ |
||
| 895 | public function setFormFields($formFields) |
||
| 896 | { |
||
| 897 | $this->formFields = $formFields; |
||
| 898 | |||
| 899 | return $this; |
||
| 900 | } |
||
| 901 | |||
| 902 | /** |
||
| 903 | * Get formFields. |
||
| 904 | * |
||
| 905 | * @return string |
||
| 906 | */ |
||
| 907 | public function getFormFields() |
||
| 908 | { |
||
| 909 | return $this->formFields; |
||
| 910 | } |
||
| 911 | |||
| 912 | /** |
||
| 913 | * Set sessionId. |
||
| 914 | * |
||
| 915 | * @param int $sessionId |
||
| 916 | * |
||
| 917 | * @return CSurvey |
||
| 918 | */ |
||
| 919 | public function setSessionId($sessionId) |
||
| 920 | { |
||
| 921 | $this->sessionId = $sessionId; |
||
| 922 | |||
| 923 | return $this; |
||
| 924 | } |
||
| 925 | |||
| 926 | /** |
||
| 927 | * Get sessionId. |
||
| 928 | * |
||
| 929 | * @return int |
||
| 930 | */ |
||
| 931 | public function getSessionId() |
||
| 932 | { |
||
| 933 | return $this->sessionId; |
||
| 934 | } |
||
| 935 | |||
| 936 | /** |
||
| 937 | * Set visibleResults. |
||
| 938 | * |
||
| 939 | * @param int $visibleResults |
||
| 940 | * |
||
| 941 | * @return CSurvey |
||
| 942 | */ |
||
| 943 | public function setVisibleResults($visibleResults) |
||
| 944 | { |
||
| 945 | $this->visibleResults = $visibleResults; |
||
| 946 | |||
| 947 | return $this; |
||
| 948 | } |
||
| 949 | |||
| 950 | /** |
||
| 951 | * Get visibleResults. |
||
| 952 | * |
||
| 953 | * @return int |
||
| 954 | */ |
||
| 955 | public function getVisibleResults() |
||
| 956 | { |
||
| 957 | return $this->visibleResults; |
||
| 958 | } |
||
| 959 | |||
| 960 | /** |
||
| 961 | * Set surveyId. |
||
| 962 | * |
||
| 963 | * @param int $surveyId |
||
| 964 | * |
||
| 965 | * @return CSurvey |
||
| 966 | */ |
||
| 967 | public function setSurveyId($surveyId) |
||
| 972 | } |
||
| 973 | |||
| 974 | /** |
||
| 975 | * Get surveyId. |
||
| 976 | * |
||
| 977 | * @return int |
||
| 978 | */ |
||
| 979 | public function getSurveyId() |
||
| 980 | { |
||
| 981 | return $this->surveyId; |
||
| 982 | } |
||
| 983 | |||
| 984 | /** |
||
| 985 | * Set cId. |
||
| 986 | * |
||
| 987 | * @param int $cId |
||
| 988 | * |
||
| 989 | * @return CSurvey |
||
| 990 | */ |
||
| 991 | public function setCId($cId) |
||
| 992 | { |
||
| 993 | $this->cId = $cId; |
||
| 994 | |||
| 995 | return $this; |
||
| 996 | } |
||
| 997 | |||
| 998 | /** |
||
| 999 | * Get cId. |
||
| 1000 | * |
||
| 1001 | * @return int |
||
| 1002 | */ |
||
| 1003 | public function getCId() |
||
| 1004 | { |
||
| 1005 | return $this->cId; |
||
| 1006 | } |
||
| 1007 | |||
| 1008 | /** |
||
| 1009 | * @param bool $isMandatory |
||
| 1010 | * |
||
| 1011 | * @return CSurvey |
||
| 1012 | */ |
||
| 1013 | public function setIsMandatory($isMandatory) |
||
| 1014 | { |
||
| 1015 | $this->isMandatory = $isMandatory; |
||
| 1016 | |||
| 1017 | return $this; |
||
| 1018 | } |
||
| 1019 | |||
| 1020 | /** |
||
| 1021 | * @return bool |
||
| 1022 | */ |
||
| 1023 | public function isMandatory() |
||
| 1026 | } |
||
| 1027 | } |
||
| 1028 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.