Skip to content

Commit

Permalink
Merge pull request #108 from justimmo/feature/change-type-of-ownershi…
Browse files Browse the repository at this point in the history
…p-type

Changes the type of the ownershipType from string to OwnershipType
  • Loading branch information
Simon Mitterhofer committed Nov 27, 2018
2 parents a304a52 + 93da6ba commit 768f3f8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
21 changes: 21 additions & 0 deletions src/Entity/Realty/OwnershipType.php
@@ -0,0 +1,21 @@
<?php

namespace Justimmo\Api\Entity\Realty;

use Justimmo\Api\Annotation as JUSTIMMO;
use Justimmo\Api\Entity\Entity;
use Justimmo\Api\Entity\Identifiable;
use Justimmo\Api\Entity\Nameable;

/**
* @JUSTIMMO\Entity(cacheKey="id")
*/
class OwnershipType implements Entity
{
use Identifiable, Nameable;

public function __toString()
{
return (string) $this->getName();
}
}
6 changes: 3 additions & 3 deletions src/Entity/Realty/Realty.php
Expand Up @@ -117,8 +117,8 @@ class Realty implements Entity
private $prices;

/**
* @var string
* @JUSTIMMO\Column
* @var OwnershipType
* @JUSTIMMO\Relation(targetEntity="\Justimmo\Api\Entity\Realty\OwnershipType")
*/
private $ownershipType;

Expand Down Expand Up @@ -448,7 +448,7 @@ public function getCategories()
}

/**
* @return string
* @return OwnershipType
*/
public function getOwnershipType()
{
Expand Down

0 comments on commit 768f3f8

Please sign in to comment.