partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 03f863ec9606b961deb97c7b67ce0830525f22d5
parent dc7d72da67564db885200c1313151f391ae83e2a
Author: Felicitus <felicitus@felicitus.org>
Date:   Mon, 21 Sep 2015 15:07:30 +0200

Refactored getters/setters for boolean values to conform to "isNNN" instead of "getIsNNN"

Diffstat:
Msrc/PartKeepr/PartBundle/Entity/PartAttachment.php | 2+-
Msrc/PartKeepr/PartBundle/Entity/PartMeasurementUnit.php | 14++++++--------
2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/src/PartKeepr/PartBundle/Entity/PartAttachment.php b/src/PartKeepr/PartBundle/Entity/PartAttachment.php @@ -63,7 +63,7 @@ class PartAttachment extends UploadedFile * * @return True if the attachment is an image, false otherwise */ - public function getIsImage() + public function isImage() { return $this->isImage; } diff --git a/src/PartKeepr/PartBundle/Entity/PartMeasurementUnit.php b/src/PartKeepr/PartBundle/Entity/PartMeasurementUnit.php @@ -50,7 +50,7 @@ class PartMeasurementUnit extends BaseEntity { * * @var boolean */ - private $isDefault; + private $default; /** * The parts used by this PartMeasurementUnit @@ -67,7 +67,7 @@ class PartMeasurementUnit extends BaseEntity { */ public function __construct () { $this->parts = new ArrayCollection(); - $this->setIsDefault(false); + $this->setDefault(false); } /** @@ -110,8 +110,8 @@ class PartMeasurementUnit extends BaseEntity { * Defines if the unit is default or not. * @param boolean $default True if the unit is default, false otherwise */ - public function setIsDefault ($default) { - $this->isDefault = (bool)$default; + public function setDefault ($default) { + $this->default = (bool)$default; } /** @@ -119,8 +119,8 @@ class PartMeasurementUnit extends BaseEntity { * @param none * @return boolean True if the unit is default, false for not */ - public function getIsDefault () { - return $this->isDefault; + public function isDefault () { + return $this->default; } /** @@ -131,4 +131,3 @@ class PartMeasurementUnit extends BaseEntity { return $this->parts; } } - - \ No newline at end of file