diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index cab9f5e..ad8944e 100755
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -12,9 +12,7 @@ If you have a good idea for improvement feel free to create a new issue with all
### Issues
-Feel free to grab any open issue implement it and create a new pull request. Most issues can be found in the `Project.md` file in the `Docs` repository.
-
-The issue information can be used to provide additional information such as priority, difficulty and type. For your first issue try to find a issue marked `[d:first]` or `[d:beginner]`.
+Feel free to grab any open issue implement it and create a new pull request. Most issues can be found in the code marked with `@todo` or in the [PROJECT.md](https://github.com/Orange-Management/Docs/blob/master/Project/PROJECT.md) file.
### Code Style
diff --git a/Models/NullContactElement.php b/Models/NullContactElement.php
index e3bfb70..5eff073 100755
--- a/Models/NullContactElement.php
+++ b/Models/NullContactElement.php
@@ -24,4 +24,15 @@ namespace Modules\Profile\Models;
*/
final class NullContactElement extends ContactElement
{
+ /**
+ * Constructor
+ *
+ * @param int $id Model id
+ *
+ * @since 1.0.0
+ */
+ public function __construct(int $id = 0)
+ {
+ $this->id = $id;
+ }
}
diff --git a/Models/Profile.php b/Models/Profile.php
index b57aae5..22bab24 100755
--- a/Models/Profile.php
+++ b/Models/Profile.php
@@ -239,7 +239,7 @@ class Profile implements \JsonSerializable
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function toArray() : array
{
return [
'id' => $this->id,
@@ -252,4 +252,12 @@ class Profile implements \JsonSerializable
'contactelements' => $this->contactElements,
];
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function jsonSerialize()
+ {
+ return $this->toArray();
+ }
}
diff --git a/Theme/Backend/profile-single.tpl.php b/Theme/Backend/profile-single.tpl.php
index c80bdef..dc9f0f4 100755
--- a/Theme/Backend/profile-single.tpl.php
+++ b/Theme/Backend/profile-single.tpl.php
@@ -133,8 +133,8 @@ echo $this->getData('nav')->render();
| = $this->getHtml('cType' . $contact->getType()); ?>
- | = $contact->getType() === ContactType::WEBSITE ? '' : ''; ?>
- = $contact->getContent(); ?>
+ | = $contact->getType() === ContactType::WEBSITE ? '' : ''; ?>
+ = $contact->content; ?>
= $contact->getType() === ContactType::WEBSITE ? '' : ''; ?>
|
diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php
index 4859176..c9aeeb0 100755
--- a/tests/Controller/ApiControllerTest.php
+++ b/tests/Controller/ApiControllerTest.php
@@ -25,17 +25,17 @@ use phpOMS\Account\PermissionType;
use phpOMS\Application\ApplicationAbstract;
use phpOMS\Dispatcher\Dispatcher;
use phpOMS\Event\EventManager;
+use phpOMS\Localization\ISO3166TwoEnum;
use phpOMS\Message\Http\HttpRequest;
use phpOMS\Message\Http\HttpResponse;
use phpOMS\Message\Http\RequestStatusCode;
+use phpOMS\Module\ModuleAbstract;
use phpOMS\Module\ModuleManager;
use phpOMS\Router\WebRouter;
+use phpOMS\Stdlib\Base\AddressType;
use phpOMS\System\MimeType;
use phpOMS\Uri\HttpUri;
use phpOMS\Utils\TestUtils;
-use phpOMS\Module\ModuleAbstract;
-use phpOMS\Stdlib\Base\AddressType;
-use phpOMS\Localization\ISO3166TwoEnum;
/**
* @internal
@@ -240,6 +240,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
$this->module->apiAddressCreate($request, $response);
self::assertGreaterThan(0, $response->get('')['response']->getId());
}
+
/**
* @covers Modules\Profile\Controller\ApiController
* @group module
diff --git a/tests/Models/ContactTest.php b/tests/Models/ContactTest.php
index 54c1458..ff2334a 100644
--- a/tests/Models/ContactTest.php
+++ b/tests/Models/ContactTest.php
@@ -44,7 +44,7 @@ final class ContactTest extends \PHPUnit\Framework\TestCase
self::assertEquals('', $this->contact->description);
self::assertEquals('', $this->contact->company);
self::assertEquals('', $this->contact->job);
- self::assertEquals(null, $this->contact->birthday);
+ self::assertNull($this->contact->birthday);
self::assertInstanceOf('\Modules\Media\Models\Media', $this->contact->image);
}
}
diff --git a/tests/Models/NullContactElementTest.php b/tests/Models/NullContactElementTest.php
new file mode 100644
index 0000000..7c5184d
--- /dev/null
+++ b/tests/Models/NullContactElementTest.php
@@ -0,0 +1,42 @@
+getId());
+ }
+}