Skip to content
Permalink
Browse files

ID#323: introduced type declaration for GORM classes.

  • Loading branch information...
Christian Achatz
Christian Achatz committed May 17, 2018
1 parent 8730d3c commit e2a1c35c3e2e63f5c47e5c77c9aabdf3d67fb662
Showing with 336 additions and 151 deletions.
  1. +1 −1 extensions/news/biz/News.php
  2. +8 −6 extensions/news/biz/NewsBase.php
  3. +1 −1 extensions/postbox/biz/Message.php
  4. +8 −6 extensions/postbox/biz/MessageBase.php
  5. +1 −1 extensions/postbox/biz/MessageChannel.php
  6. +8 −6 extensions/postbox/biz/MessageChannelBase.php
  7. +1 −1 extensions/postbox/biz/PostboxFolder.php
  8. +8 −6 extensions/postbox/biz/PostboxFolderBase.php
  9. +1 −1 extensions/postbox/biz/RecipientList.php
  10. +8 −6 extensions/postbox/biz/RecipientListBase.php
  11. +17 −13 modules/genericormapper/data/GenericDomainObject.php
  12. +3 −3 modules/genericormapper/data/GenericORMapper.php
  13. +13 −13 modules/genericormapper/data/GenericORMapperDataObject.php
  14. +14 −14 modules/genericormapper/data/GenericORRelationMapper.php
  15. +9 −7 modules/genericormapper/data/tools/GenericORMapperDomainObjectGenerator.php
  16. +1 −1 modules/usermanagement/biz/model/UmgtApplication.php
  17. +8 −6 modules/usermanagement/biz/model/UmgtApplicationBase.php
  18. +1 −1 modules/usermanagement/biz/model/UmgtAuthToken.php
  19. +8 −6 modules/usermanagement/biz/model/UmgtAuthTokenBase.php
  20. +1 −1 modules/usermanagement/biz/model/UmgtGroup.php
  21. +8 −6 modules/usermanagement/biz/model/UmgtGroupBase.php
  22. +1 −1 modules/usermanagement/biz/model/UmgtPermission.php
  23. +8 −6 modules/usermanagement/biz/model/UmgtPermissionBase.php
  24. +1 −1 modules/usermanagement/biz/model/UmgtRole.php
  25. +8 −6 modules/usermanagement/biz/model/UmgtRoleBase.php
  26. +1 −1 modules/usermanagement/biz/model/UmgtUser.php
  27. +8 −6 modules/usermanagement/biz/model/UmgtUserBase.php
  28. +1 −1 modules/usermanagement/biz/model/UmgtVisibilityDefinition.php
  29. +8 −6 modules/usermanagement/biz/model/UmgtVisibilityDefinitionBase.php
  30. +1 −1 modules/usermanagement/biz/model/UmgtVisibilityDefinitionType.php
  31. +8 −6 modules/usermanagement/biz/model/UmgtVisibilityDefinitionTypeBase.php
  32. +157 −6 tests/suites/modules/genericormapper/GenericORMapperTest.php
  33. +6 −4 tests/suites/modules/genericormapper/tools/GenericORMapperDomainObjectGeneratorTest.php
@@ -38,7 +38,7 @@ class News extends NewsBase {
*
* @param string $objectName The internal object name of the domain object.
*/
public function __construct($objectName = null) {
public function __construct(string $objectName = null) {
parent::__construct();
}
@@ -78,19 +78,19 @@ abstract class NewsBase extends GenericDomainObject {
'Text'
];
public function __construct($objectName = null) {
public function __construct(string $objectName = null) {
parent::__construct('News');
}
public function getProperty($name) {
public function getProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
return $this->$name;
}
return null;
}
public function setProperty($name, $value) {
public function setProperty(string $name, $value) {
if (in_array($name, $this->propertyNames)) {
$this->$name = $value;
}
@@ -106,22 +106,24 @@ public function getProperties() {
return $properties;
}
public function setProperties($properties = []) {
public function setProperties(array $properties = []) {
foreach ($properties as $key => $value) {
if (in_array($key, $this->propertyNames)) {
$this->$key = $value;
}
}
}
public function deleteProperty($name) {
public function deleteProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
$this->$name = null;
}
}
public function setObjectId($id) {
public function setObjectId(int $id) {
$this->NewsID = $id;
return $this;
}
public function getObjectId() {
@@ -38,7 +38,7 @@ class Message extends MessageBase {
*
* @param string $objectName The internal object name of the domain object.
*/
public function __construct($objectName = null) {
public function __construct(string $objectName = null) {
parent::__construct();
}
@@ -66,19 +66,19 @@ abstract class MessageBase extends AbstractMessage {
'AuthorNameFallback'
];
public function __construct($objectName = null) {
public function __construct(string $objectName = null) {
parent::__construct('Message');
}
public function getProperty($name) {
public function getProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
return $this->$name;
}
return null;
}
public function setProperty($name, $value) {
public function setProperty(string $name, $value) {
if (in_array($name, $this->propertyNames)) {
$this->$name = $value;
}
@@ -94,22 +94,24 @@ public function getProperties() {
return $properties;
}
public function setProperties($properties = []) {
public function setProperties(array $properties = []) {
foreach ($properties as $key => $value) {
if (in_array($key, $this->propertyNames)) {
$this->$key = $value;
}
}
}
public function deleteProperty($name) {
public function deleteProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
$this->$name = null;
}
}
public function setObjectId($id) {
public function setObjectId(int $id) {
$this->MessageID = $id;
return $this;
}
public function getObjectId() {
@@ -38,7 +38,7 @@ class MessageChannel extends MessageChannelBase {
*
* @param string $objectName The internal object name of the domain object.
*/
public function __construct($objectName = null) {
public function __construct(string $objectName = null) {
parent::__construct();
}
@@ -60,19 +60,19 @@ abstract class MessageChannelBase extends AbstractMessageChannel {
'Title'
];
public function __construct($objectName = null) {
public function __construct(string $objectName = null) {
parent::__construct('MessageChannel');
}
public function getProperty($name) {
public function getProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
return $this->$name;
}
return null;
}
public function setProperty($name, $value) {
public function setProperty(string $name, $value) {
if (in_array($name, $this->propertyNames)) {
$this->$name = $value;
}
@@ -88,22 +88,24 @@ public function getProperties() {
return $properties;
}
public function setProperties($properties = []) {
public function setProperties(array $properties = []) {
foreach ($properties as $key => $value) {
if (in_array($key, $this->propertyNames)) {
$this->$key = $value;
}
}
}
public function deleteProperty($name) {
public function deleteProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
$this->$name = null;
}
}
public function setObjectId($id) {
public function setObjectId(int $id) {
$this->MessageChannelID = $id;
return $this;
}
public function getObjectId() {
@@ -38,7 +38,7 @@ class PostboxFolder extends PostboxFolderBase {
*
* @param string $objectName The internal object name of the domain object.
*/
public function __construct($objectName = null) {
public function __construct(string $objectName = null) {
parent::__construct();
}
@@ -60,19 +60,19 @@ abstract class PostboxFolderBase extends AbstractPostboxFolder {
'Name'
];
public function __construct($objectName = null) {
public function __construct(string $objectName = null) {
parent::__construct('PostboxFolder');
}
public function getProperty($name) {
public function getProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
return $this->$name;
}
return null;
}
public function setProperty($name, $value) {
public function setProperty(string $name, $value) {
if (in_array($name, $this->propertyNames)) {
$this->$name = $value;
}
@@ -88,22 +88,24 @@ public function getProperties() {
return $properties;
}
public function setProperties($properties = []) {
public function setProperties(array $properties = []) {
foreach ($properties as $key => $value) {
if (in_array($key, $this->propertyNames)) {
$this->$key = $value;
}
}
}
public function deleteProperty($name) {
public function deleteProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
$this->$name = null;
}
}
public function setObjectId($id) {
public function setObjectId(int $id) {
$this->PostboxFolderID = $id;
return $this;
}
public function getObjectId() {
@@ -38,7 +38,7 @@ class RecipientList extends RecipientListBase {
*
* @param string $objectName The internal object name of the domain object.
*/
public function __construct($objectName = null) {
public function __construct(string $objectName = null) {
parent::__construct();
}
@@ -60,19 +60,19 @@ abstract class RecipientListBase extends AbstractRecipientList {
'Name'
];
public function __construct($objectName = null) {
public function __construct(string $objectName = null) {
parent::__construct('RecipientList');
}
public function getProperty($name) {
public function getProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
return $this->$name;
}
return null;
}
public function setProperty($name, $value) {
public function setProperty(string $name, $value) {
if (in_array($name, $this->propertyNames)) {
$this->$name = $value;
}
@@ -88,22 +88,24 @@ public function getProperties() {
return $properties;
}
public function setProperties($properties = []) {
public function setProperties(array $properties = []) {
foreach ($properties as $key => $value) {
if (in_array($key, $this->propertyNames)) {
$this->$key = $value;
}
}
}
public function deleteProperty($name) {
public function deleteProperty(string $name) {
if (in_array($name, $this->propertyNames)) {
$this->$name = null;
}
}
public function setObjectId($id) {
public function setObjectId(int $id) {
$this->RecipientListID = $id;
return $this;
}
public function getObjectId() {
Oops, something went wrong.

0 comments on commit e2a1c35

Please sign in to comment.
You can’t perform that action at this time.