Complex classes like Geocache 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. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
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 Geocache, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 14 | class Geocache |
||
| 15 | { |
||
| 16 | const GEOCACHE_TYPE_UNKNOWN = 1; |
||
| 17 | const GEOCACHE_TYPE_TRADITIONAL = 2; |
||
| 18 | const GEOCACHE_TYPE_MULTI = 3; |
||
| 19 | const GEOCACHE_TYPE_VIRTUAL = 4; |
||
| 20 | const GEOCACHE_TYPE_WEBCAM = 5; |
||
| 21 | const GEOCACHE_TYPE_EVENT = 6; |
||
| 22 | const GEOCACHE_TYPE_QUIZ = 7; |
||
| 23 | const GEOCACHE_TYPE_MATH = 8; |
||
| 24 | const GEOCACHE_TYPE_MOVING = 9; |
||
| 25 | const GEOCACHE_TYPE_DRIVE_IN = 10; |
||
| 26 | |||
| 27 | const EVENT_CACHE_TYPES = [ |
||
| 28 | self::GEOCACHE_TYPE_EVENT, |
||
| 29 | ]; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var string |
||
| 33 | * |
||
| 34 | * @ORM\Column(name="uuid", type="string", length=36, nullable=false) |
||
| 35 | */ |
||
| 36 | private $uuid; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @var int |
||
| 40 | * |
||
| 41 | * @ORM\Column(name="node", type="smallint", nullable=false) |
||
| 42 | */ |
||
| 43 | private $node = 0; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @var \DateTime |
||
| 47 | * |
||
| 48 | * @ORM\Column(name="date_created", type="datetime", nullable=false) |
||
| 49 | */ |
||
| 50 | private $dateCreated; |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @var bool |
||
| 54 | * |
||
| 55 | * @ORM\Column(name="is_publishdate", type="boolean", nullable=false) |
||
| 56 | */ |
||
| 57 | private $isPublishdate = false; |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @var \DateTime |
||
| 61 | * |
||
| 62 | * @ORM\Column(name="last_modified", type="datetime", nullable=false) |
||
| 63 | */ |
||
| 64 | private $lastModified; |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @var \DateTime |
||
| 68 | * |
||
| 69 | * @ORM\Column(name="listing_last_modified", type="datetime", nullable=false) |
||
| 70 | */ |
||
| 71 | private $listingLastModified; |
||
| 72 | |||
| 73 | /** |
||
| 74 | * @var \DateTime |
||
| 75 | * |
||
| 76 | * @ORM\Column(name="meta_last_modified", type="datetime", nullable=false) |
||
| 77 | */ |
||
| 78 | private $metaLastModified; |
||
| 79 | |||
| 80 | /** |
||
| 81 | * @var integer |
||
| 82 | * |
||
| 83 | * @ORM\Column(name="user_id", type="integer", nullable=false) |
||
| 84 | */ |
||
| 85 | private $userId; |
||
| 86 | |||
| 87 | /** |
||
| 88 | * @var string |
||
| 89 | * |
||
| 90 | * @ORM\Column(name="name", type="string", length=255, nullable=false) |
||
| 91 | */ |
||
| 92 | private $name; |
||
| 93 | |||
| 94 | /** |
||
| 95 | * @var float |
||
| 96 | * |
||
| 97 | * @ORM\Column(name="longitude", type="float", precision=10, scale=0, nullable=false) |
||
| 98 | */ |
||
| 99 | private $longitude; |
||
| 100 | |||
| 101 | /** |
||
| 102 | * @var float |
||
| 103 | * |
||
| 104 | * @ORM\Column(name="latitude", type="float", precision=10, scale=0, nullable=false) |
||
| 105 | */ |
||
| 106 | private $latitude; |
||
| 107 | |||
| 108 | /** |
||
| 109 | * @var int |
||
| 110 | * |
||
| 111 | * @ORM\Column(name="type", type="integer", nullable=false) |
||
| 112 | */ |
||
| 113 | private $type; |
||
| 114 | |||
| 115 | /** |
||
| 116 | * @var bool |
||
| 117 | * |
||
| 118 | * @ORM\Column(name="status", type="boolean", nullable=false) |
||
| 119 | */ |
||
| 120 | private $status; |
||
| 121 | |||
| 122 | /** |
||
| 123 | * @var string |
||
| 124 | * |
||
| 125 | * @ORM\Column(name="country", type="string", length=2, nullable=false) |
||
| 126 | */ |
||
| 127 | private $country; |
||
| 128 | |||
| 129 | /** |
||
| 130 | * @var \DateTime |
||
| 131 | * |
||
| 132 | * @ORM\Column(name="date_hidden", type="date", nullable=false) |
||
| 133 | */ |
||
| 134 | private $dateHidden; |
||
| 135 | |||
| 136 | /** |
||
| 137 | * @var bool |
||
| 138 | * |
||
| 139 | * @ORM\Column(name="size", type="boolean", nullable=false) |
||
| 140 | */ |
||
| 141 | private $size; |
||
| 142 | |||
| 143 | /** |
||
| 144 | * @var bool |
||
| 145 | * |
||
| 146 | * @ORM\Column(name="difficulty", type="boolean", nullable=false) |
||
| 147 | */ |
||
| 148 | private $difficulty; |
||
| 149 | |||
| 150 | /** |
||
| 151 | * @var bool |
||
| 152 | * |
||
| 153 | * @ORM\Column(name="terrain", type="boolean", nullable=false) |
||
| 154 | */ |
||
| 155 | private $terrain; |
||
| 156 | |||
| 157 | /** |
||
| 158 | * @var string |
||
| 159 | * |
||
| 160 | * @ORM\Column(name="logpw", type="string", length=20, nullable=true) |
||
| 161 | */ |
||
| 162 | private $logpw; |
||
| 163 | |||
| 164 | /** |
||
| 165 | * @var float |
||
| 166 | * |
||
| 167 | * @ORM\Column(name="search_time", type="float", precision=10, scale=0, nullable=false) |
||
| 168 | */ |
||
| 169 | private $searchTime = 0.0; |
||
| 170 | |||
| 171 | /** |
||
| 172 | * @var float |
||
| 173 | * |
||
| 174 | * @ORM\Column(name="way_length", type="float", precision=10, scale=0, nullable=false) |
||
| 175 | */ |
||
| 176 | private $wayLength = 0.0; |
||
| 177 | |||
| 178 | /** |
||
| 179 | * @var string |
||
| 180 | * |
||
| 181 | * @ORM\Column(name="wp_gc", type="string", length=7, nullable=false) |
||
| 182 | */ |
||
| 183 | private $wpGc; |
||
| 184 | |||
| 185 | /** |
||
| 186 | * @var string |
||
| 187 | * |
||
| 188 | * @ORM\Column(name="wp_gc_maintained", type="string", length=7, nullable=false) |
||
| 189 | */ |
||
| 190 | private $wpGcMaintained; |
||
| 191 | |||
| 192 | /** |
||
| 193 | * @var string |
||
| 194 | * |
||
| 195 | * @ORM\Column(name="wp_nc", type="string", length=6, nullable=false) |
||
| 196 | */ |
||
| 197 | private $wpNc; |
||
| 198 | |||
| 199 | /** |
||
| 200 | * @var string |
||
| 201 | * |
||
| 202 | * @ORM\Column(name="wp_oc", type="string", length=6, nullable=true) |
||
| 203 | */ |
||
| 204 | private $wpOc; |
||
| 205 | |||
| 206 | /** |
||
| 207 | * @var string |
||
| 208 | * |
||
| 209 | * @ORM\Column(name="desc_languages", type="string", length=60, nullable=false) |
||
| 210 | */ |
||
| 211 | private $descLanguages; |
||
| 212 | |||
| 213 | /** |
||
| 214 | * @var string |
||
| 215 | * |
||
| 216 | * @ORM\Column(name="default_desclang", type="string", length=2, nullable=false) |
||
| 217 | */ |
||
| 218 | private $defaultDesclang; |
||
| 219 | |||
| 220 | /** |
||
| 221 | * @var \DateTime |
||
| 222 | * |
||
| 223 | * @ORM\Column(name="date_activate", type="datetime", nullable=true) |
||
| 224 | */ |
||
| 225 | private $dateActivate; |
||
| 226 | |||
| 227 | /** |
||
| 228 | * @var bool |
||
| 229 | * |
||
| 230 | * @ORM\Column(name="need_npa_recalc", type="boolean", nullable=false) |
||
| 231 | */ |
||
| 232 | private $needNpaRecalc; |
||
| 233 | |||
| 234 | /** |
||
| 235 | * @var bool |
||
| 236 | * |
||
| 237 | * @ORM\Column(name="show_cachelists", type="boolean", nullable=false) |
||
| 238 | */ |
||
| 239 | private $showCachelists = true; |
||
| 240 | |||
| 241 | /** |
||
| 242 | * @var bool |
||
| 243 | * |
||
| 244 | * @ORM\Column(name="protect_old_coords", type="boolean", nullable=false) |
||
| 245 | */ |
||
| 246 | private $protectOldCoords = false; |
||
| 247 | |||
| 248 | /** |
||
| 249 | * @var bool |
||
| 250 | * |
||
| 251 | * @ORM\Column(name="needs_maintenance", type="boolean", nullable=false) |
||
| 252 | */ |
||
| 253 | private $needsMaintenance = false; |
||
| 254 | |||
| 255 | /** |
||
| 256 | * @var bool |
||
| 257 | * |
||
| 258 | * @ORM\Column(name="listing_outdated", type="boolean", nullable=false) |
||
| 259 | */ |
||
| 260 | private $listingOutdated = false; |
||
| 261 | |||
| 262 | /** |
||
| 263 | * @var \DateTime |
||
| 264 | * |
||
| 265 | * @ORM\Column(name="flags_last_modified", type="datetime", nullable=false) |
||
| 266 | */ |
||
| 267 | private $flagsLastModified; |
||
| 268 | |||
| 269 | /** |
||
| 270 | * @var integer |
||
| 271 | * |
||
| 272 | * @ORM\Column(name="cache_id", type="integer") |
||
| 273 | * @ORM\Id |
||
| 274 | * @ORM\GeneratedValue(strategy="IDENTITY") |
||
| 275 | */ |
||
| 276 | private $cacheId; |
||
| 277 | |||
| 278 | /** |
||
| 279 | * Set uuid |
||
| 280 | * |
||
| 281 | * @param string $uuid |
||
| 282 | * |
||
| 283 | * @return \AppBundle\Entity\Geocache |
||
| 284 | */ |
||
| 285 | public function setUuid($uuid) |
||
| 291 | |||
| 292 | /** |
||
| 293 | * Get uuid |
||
| 294 | * |
||
| 295 | * @return string |
||
| 296 | */ |
||
| 297 | public function getUuid() |
||
| 301 | |||
| 302 | /** |
||
| 303 | * Set node |
||
| 304 | * |
||
| 305 | * @param bool $node |
||
| 306 | * |
||
| 307 | * @return \AppBundle\Entity\Geocache |
||
| 308 | */ |
||
| 309 | public function setNode($node) |
||
| 315 | |||
| 316 | /** |
||
| 317 | * Get node |
||
| 318 | * |
||
| 319 | * @return bool |
||
| 320 | */ |
||
| 321 | public function getNode() |
||
| 325 | |||
| 326 | /** |
||
| 327 | * Set dateCreated |
||
| 328 | * |
||
| 329 | * @param \DateTime $dateCreated |
||
| 330 | * |
||
| 331 | * @return \AppBundle\Entity\Geocache |
||
| 332 | */ |
||
| 333 | public function setDateCreated(DateTime $dateCreated) |
||
| 339 | |||
| 340 | /** |
||
| 341 | * Get dateCreated |
||
| 342 | * |
||
| 343 | * @return \DateTime |
||
| 344 | */ |
||
| 345 | public function getDateCreated() |
||
| 349 | |||
| 350 | /** |
||
| 351 | * Set isPublishdate |
||
| 352 | * |
||
| 353 | * @param bool $isPublishdate |
||
| 354 | * |
||
| 355 | * @return \AppBundle\Entity\Geocache |
||
| 356 | */ |
||
| 357 | public function setIsPublishdate($isPublishdate) |
||
| 363 | |||
| 364 | /** |
||
| 365 | * Get isPublishdate |
||
| 366 | * |
||
| 367 | * @return bool |
||
| 368 | */ |
||
| 369 | public function getIsPublishdate() |
||
| 373 | |||
| 374 | /** |
||
| 375 | * Set lastModified |
||
| 376 | * |
||
| 377 | * @param \DateTime $lastModified |
||
| 378 | * |
||
| 379 | * @return \AppBundle\Entity\Geocache |
||
| 380 | */ |
||
| 381 | public function setLastModified(DateTime $lastModified) |
||
| 387 | |||
| 388 | /** |
||
| 389 | * Get lastModified |
||
| 390 | * |
||
| 391 | * @return \DateTime |
||
| 392 | */ |
||
| 393 | public function getLastModified() |
||
| 397 | |||
| 398 | /** |
||
| 399 | * Set listingLastModified |
||
| 400 | * |
||
| 401 | * @param \DateTime $listingLastModified |
||
| 402 | * |
||
| 403 | * @return \AppBundle\Entity\Geocache |
||
| 404 | */ |
||
| 405 | public function setListingLastModified(DateTime $listingLastModified) |
||
| 411 | |||
| 412 | /** |
||
| 413 | * Get listingLastModified |
||
| 414 | * |
||
| 415 | * @return \DateTime |
||
| 416 | */ |
||
| 417 | public function getListingLastModified() |
||
| 421 | |||
| 422 | /** |
||
| 423 | * Set metaLastModified |
||
| 424 | * |
||
| 425 | * @param \DateTime $metaLastModified |
||
| 426 | * |
||
| 427 | * @return \AppBundle\Entity\Geocache |
||
| 428 | */ |
||
| 429 | public function setMetaLastModified(DateTime $metaLastModified) |
||
| 435 | |||
| 436 | /** |
||
| 437 | * Get metaLastModified |
||
| 438 | * |
||
| 439 | * @return \DateTime |
||
| 440 | */ |
||
| 441 | public function getMetaLastModified() |
||
| 445 | |||
| 446 | /** |
||
| 447 | * Set userId |
||
| 448 | * |
||
| 449 | * @param int $userId |
||
| 450 | * |
||
| 451 | * @return \AppBundle\Entity\Geocache |
||
| 452 | */ |
||
| 453 | public function setUserId($userId) |
||
| 459 | |||
| 460 | /** |
||
| 461 | * Get userId |
||
| 462 | * |
||
| 463 | * @return int |
||
| 464 | */ |
||
| 465 | public function getUserId() |
||
| 469 | |||
| 470 | /** |
||
| 471 | * Set name |
||
| 472 | * |
||
| 473 | * @param string $name |
||
| 474 | * |
||
| 475 | * @return \AppBundle\Entity\Geocache |
||
| 476 | */ |
||
| 477 | public function setName($name) |
||
| 483 | |||
| 484 | /** |
||
| 485 | * Get name |
||
| 486 | * |
||
| 487 | * @return string |
||
| 488 | */ |
||
| 489 | public function getName() |
||
| 493 | |||
| 494 | /** |
||
| 495 | * Set longitude |
||
| 496 | * |
||
| 497 | * @param float $longitude |
||
| 498 | * |
||
| 499 | * @return \AppBundle\Entity\Geocache |
||
| 500 | */ |
||
| 501 | public function setLongitude($longitude) |
||
| 507 | |||
| 508 | /** |
||
| 509 | * Get longitude |
||
| 510 | * |
||
| 511 | * @return float |
||
| 512 | */ |
||
| 513 | public function getLongitude() |
||
| 517 | |||
| 518 | /** |
||
| 519 | * Set latitude |
||
| 520 | * |
||
| 521 | * @param float $latitude |
||
| 522 | * |
||
| 523 | * @return \AppBundle\Entity\Geocache |
||
| 524 | */ |
||
| 525 | public function setLatitude($latitude) |
||
| 531 | |||
| 532 | /** |
||
| 533 | * Get latitude |
||
| 534 | * |
||
| 535 | * @return float |
||
| 536 | */ |
||
| 537 | public function getLatitude() |
||
| 541 | |||
| 542 | /** |
||
| 543 | * Set type |
||
| 544 | * |
||
| 545 | * @param bool $type |
||
| 546 | * |
||
| 547 | * @return \AppBundle\Entity\Geocache |
||
| 548 | */ |
||
| 549 | public function setType($type) |
||
| 555 | |||
| 556 | /** |
||
| 557 | * Get type |
||
| 558 | * |
||
| 559 | * @return bool |
||
| 560 | */ |
||
| 561 | public function getType() |
||
| 565 | |||
| 566 | /** |
||
| 567 | * Set status |
||
| 568 | * |
||
| 569 | * @param bool $status |
||
| 570 | * |
||
| 571 | * @return \AppBundle\Entity\Geocache |
||
| 572 | */ |
||
| 573 | public function setStatus($status) |
||
| 579 | |||
| 580 | /** |
||
| 581 | * Get status |
||
| 582 | * |
||
| 583 | * @return bool |
||
| 584 | */ |
||
| 585 | public function getStatus() |
||
| 589 | |||
| 590 | /** |
||
| 591 | * Set country |
||
| 592 | * |
||
| 593 | * @param string $country |
||
| 594 | * |
||
| 595 | * @return \AppBundle\Entity\Geocache |
||
| 596 | */ |
||
| 597 | public function setCountry($country) |
||
| 603 | |||
| 604 | /** |
||
| 605 | * Get country |
||
| 606 | * |
||
| 607 | * @return string |
||
| 608 | */ |
||
| 609 | public function getCountry() |
||
| 613 | |||
| 614 | /** |
||
| 615 | * Set dateHidden |
||
| 616 | * |
||
| 617 | * @param \DateTime $dateHidden |
||
| 618 | * |
||
| 619 | * @return \AppBundle\Entity\Geocache |
||
| 620 | */ |
||
| 621 | public function setDateHidden(DateTime $dateHidden) |
||
| 627 | |||
| 628 | /** |
||
| 629 | * Get dateHidden |
||
| 630 | * |
||
| 631 | * @return \DateTime |
||
| 632 | */ |
||
| 633 | public function getDateHidden() |
||
| 637 | |||
| 638 | /** |
||
| 639 | * Set size |
||
| 640 | * |
||
| 641 | * @param bool $size |
||
| 642 | * |
||
| 643 | * @return \AppBundle\Entity\Geocache |
||
| 644 | */ |
||
| 645 | public function setSize($size) |
||
| 651 | |||
| 652 | /** |
||
| 653 | * Get size |
||
| 654 | * |
||
| 655 | * @return bool |
||
| 656 | */ |
||
| 657 | public function getSize() |
||
| 661 | |||
| 662 | /** |
||
| 663 | * Set difficulty |
||
| 664 | * |
||
| 665 | * @param bool $difficulty |
||
| 666 | * |
||
| 667 | * @return \AppBundle\Entity\Geocache |
||
| 668 | */ |
||
| 669 | public function setDifficulty($difficulty) |
||
| 675 | |||
| 676 | /** |
||
| 677 | * Get difficulty |
||
| 678 | * |
||
| 679 | * @return bool |
||
| 680 | */ |
||
| 681 | public function getDifficulty() |
||
| 685 | |||
| 686 | /** |
||
| 687 | * Set terrain |
||
| 688 | * |
||
| 689 | * @param bool $terrain |
||
| 690 | * |
||
| 691 | * @return \AppBundle\Entity\Geocache |
||
| 692 | */ |
||
| 693 | public function setTerrain($terrain) |
||
| 699 | |||
| 700 | /** |
||
| 701 | * Get terrain |
||
| 702 | * |
||
| 703 | * @return bool |
||
| 704 | */ |
||
| 705 | public function getTerrain() |
||
| 709 | |||
| 710 | /** |
||
| 711 | * Set logpw |
||
| 712 | * |
||
| 713 | * @param string $logpw |
||
| 714 | * |
||
| 715 | * @return \AppBundle\Entity\Geocache |
||
| 716 | */ |
||
| 717 | public function setLogpw($logpw) |
||
| 723 | |||
| 724 | /** |
||
| 725 | * Get logpw |
||
| 726 | * |
||
| 727 | * @return string |
||
| 728 | */ |
||
| 729 | public function getLogpw() |
||
| 733 | |||
| 734 | /** |
||
| 735 | * Set searchTime |
||
| 736 | * |
||
| 737 | * @param float $searchTime |
||
| 738 | * |
||
| 739 | * @return \AppBundle\Entity\Geocache |
||
| 740 | */ |
||
| 741 | public function setSearchTime($searchTime) |
||
| 747 | |||
| 748 | /** |
||
| 749 | * Get searchTime |
||
| 750 | * |
||
| 751 | * @return float |
||
| 752 | */ |
||
| 753 | public function getSearchTime() |
||
| 757 | |||
| 758 | /** |
||
| 759 | * Set wayLength |
||
| 760 | * |
||
| 761 | * @param float $wayLength |
||
| 762 | * |
||
| 763 | * @return \AppBundle\Entity\Geocache |
||
| 764 | */ |
||
| 765 | public function setWayLength($wayLength) |
||
| 771 | |||
| 772 | /** |
||
| 773 | * Get wayLength |
||
| 774 | * |
||
| 775 | * @return float |
||
| 776 | */ |
||
| 777 | public function getWayLength() |
||
| 781 | |||
| 782 | /** |
||
| 783 | * Set wpGc |
||
| 784 | * |
||
| 785 | * @param string $wpGc |
||
| 786 | * |
||
| 787 | * @return \AppBundle\Entity\Geocache |
||
| 788 | */ |
||
| 789 | public function setWpGc($wpGc) |
||
| 795 | |||
| 796 | /** |
||
| 797 | * Get wpGc |
||
| 798 | * |
||
| 799 | * @return string |
||
| 800 | */ |
||
| 801 | public function getWpGc() |
||
| 805 | |||
| 806 | /** |
||
| 807 | * Set wpGcMaintained |
||
| 808 | * |
||
| 809 | * @param string $wpGcMaintained |
||
| 810 | * |
||
| 811 | * @return \AppBundle\Entity\Geocache |
||
| 812 | */ |
||
| 813 | public function setWpGcMaintained($wpGcMaintained) |
||
| 819 | |||
| 820 | /** |
||
| 821 | * Get wpGcMaintained |
||
| 822 | * |
||
| 823 | * @return string |
||
| 824 | */ |
||
| 825 | public function getWpGcMaintained() |
||
| 829 | |||
| 830 | /** |
||
| 831 | * Set wpNc |
||
| 832 | * |
||
| 833 | * @param string $wpNc |
||
| 834 | * |
||
| 835 | * @return \AppBundle\Entity\Geocache |
||
| 836 | */ |
||
| 837 | public function setWpNc($wpNc) |
||
| 843 | |||
| 844 | /** |
||
| 845 | * Get wpNc |
||
| 846 | * |
||
| 847 | * @return string |
||
| 848 | */ |
||
| 849 | public function getWpNc() |
||
| 853 | |||
| 854 | /** |
||
| 855 | * Set wpOc |
||
| 856 | * |
||
| 857 | * @param string $wpOc |
||
| 858 | * |
||
| 859 | * @return \AppBundle\Entity\Geocache |
||
| 860 | */ |
||
| 861 | public function setWpOc($wpOc) |
||
| 867 | |||
| 868 | /** |
||
| 869 | * Get wpOc |
||
| 870 | * |
||
| 871 | * @return string |
||
| 872 | */ |
||
| 873 | public function getWpOc() |
||
| 877 | |||
| 878 | /** |
||
| 879 | * Set descLanguages |
||
| 880 | * |
||
| 881 | * @param string $descLanguages |
||
| 882 | * |
||
| 883 | * @return \AppBundle\Entity\Geocache |
||
| 884 | */ |
||
| 885 | public function setDescLanguages($descLanguages) |
||
| 891 | |||
| 892 | /** |
||
| 893 | * Get descLanguages |
||
| 894 | * |
||
| 895 | * @return string |
||
| 896 | */ |
||
| 897 | public function getDescLanguages() |
||
| 901 | |||
| 902 | /** |
||
| 903 | * Set defaultDesclang |
||
| 904 | * |
||
| 905 | * @param string $defaultDesclang |
||
| 906 | * |
||
| 907 | * @return \AppBundle\Entity\Geocache |
||
| 908 | */ |
||
| 909 | public function setDefaultDesclang($defaultDesclang) |
||
| 915 | |||
| 916 | /** |
||
| 917 | * Get defaultDesclang |
||
| 918 | * |
||
| 919 | * @return string |
||
| 920 | */ |
||
| 921 | public function getDefaultDesclang() |
||
| 925 | |||
| 926 | /** |
||
| 927 | * Set dateActivate |
||
| 928 | * |
||
| 929 | * @param \DateTime $dateActivate |
||
| 930 | * |
||
| 931 | * @return \AppBundle\Entity\Geocache |
||
| 932 | */ |
||
| 933 | public function setDateActivate(DateTime $dateActivate) |
||
| 939 | |||
| 940 | /** |
||
| 941 | * Get dateActivate |
||
| 942 | * |
||
| 943 | * @return \DateTime |
||
| 944 | */ |
||
| 945 | public function getDateActivate() |
||
| 949 | |||
| 950 | /** |
||
| 951 | * Set needNpaRecalc |
||
| 952 | * |
||
| 953 | * @param bool $needNpaRecalc |
||
| 954 | * |
||
| 955 | * @return \AppBundle\Entity\Geocache |
||
| 956 | */ |
||
| 957 | public function setNeedNpaRecalc($needNpaRecalc) |
||
| 963 | |||
| 964 | /** |
||
| 965 | * Get needNpaRecalc |
||
| 966 | * |
||
| 967 | * @return bool |
||
| 968 | */ |
||
| 969 | public function getNeedNpaRecalc() |
||
| 973 | |||
| 974 | /** |
||
| 975 | * Set showCachelists |
||
| 976 | * |
||
| 977 | * @param bool $showCachelists |
||
| 978 | * |
||
| 979 | * @return \AppBundle\Entity\Geocache |
||
| 980 | */ |
||
| 981 | public function setShowCachelists($showCachelists) |
||
| 987 | |||
| 988 | /** |
||
| 989 | * Get showCachelists |
||
| 990 | * |
||
| 991 | * @return bool |
||
| 992 | */ |
||
| 993 | public function getShowCachelists() |
||
| 997 | |||
| 998 | /** |
||
| 999 | * Set protectOldCoords |
||
| 1000 | * |
||
| 1001 | * @param bool $protectOldCoords |
||
| 1002 | * |
||
| 1003 | * @return \AppBundle\Entity\Geocache |
||
| 1004 | */ |
||
| 1005 | public function setProtectOldCoords($protectOldCoords) |
||
| 1011 | |||
| 1012 | /** |
||
| 1013 | * Get protectOldCoords |
||
| 1014 | * |
||
| 1015 | * @return bool |
||
| 1016 | */ |
||
| 1017 | public function getProtectOldCoords() |
||
| 1021 | |||
| 1022 | /** |
||
| 1023 | * Set needsMaintenance |
||
| 1024 | * |
||
| 1025 | * @param bool $needsMaintenance |
||
| 1026 | * |
||
| 1027 | * @return \AppBundle\Entity\Geocache |
||
| 1028 | */ |
||
| 1029 | public function setNeedsMaintenance($needsMaintenance) |
||
| 1035 | |||
| 1036 | /** |
||
| 1037 | * Get needsMaintenance |
||
| 1038 | * |
||
| 1039 | * @return bool |
||
| 1040 | */ |
||
| 1041 | public function getNeedsMaintenance() |
||
| 1045 | |||
| 1046 | /** |
||
| 1047 | * Set listingOutdated |
||
| 1048 | * |
||
| 1049 | * @param bool $listingOutdated |
||
| 1050 | * |
||
| 1051 | * @return \AppBundle\Entity\Geocache |
||
| 1052 | */ |
||
| 1053 | public function setListingOutdated($listingOutdated) |
||
| 1059 | |||
| 1060 | /** |
||
| 1061 | * Get listingOutdated |
||
| 1062 | * |
||
| 1063 | * @return bool |
||
| 1064 | */ |
||
| 1065 | public function getListingOutdated() |
||
| 1069 | |||
| 1070 | /** |
||
| 1071 | * Set flagsLastModified |
||
| 1072 | * |
||
| 1073 | * @param \DateTime $flagsLastModified |
||
| 1074 | * |
||
| 1075 | * @return \AppBundle\Entity\Geocache |
||
| 1076 | */ |
||
| 1077 | public function setFlagsLastModified(DateTime $flagsLastModified) |
||
| 1083 | |||
| 1084 | /** |
||
| 1085 | * Get flagsLastModified |
||
| 1086 | * |
||
| 1087 | * @return \DateTime |
||
| 1088 | */ |
||
| 1089 | public function getFlagsLastModified() |
||
| 1093 | |||
| 1094 | /** |
||
| 1095 | * Get cacheId |
||
| 1096 | * |
||
| 1097 | * @return int |
||
| 1098 | */ |
||
| 1099 | public function getCacheId() |
||
| 1103 | } |
||
| 1104 |
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.