-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
104 changed files
with
2,538 additions
and
1,049 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: PHPStan tests | ||
|
||
on: | ||
push: | ||
branches: [ 4.x ] | ||
pull_request: | ||
branches: [ 4.x ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Validate composer.json | ||
run: composer validate --strict | ||
|
||
- name: Install dependencies | ||
uses: php-actions/composer@v6 | ||
|
||
- name: Run PHPStan tests | ||
run: bin/test-phpstan |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Application/Event/CommandWasExecuted.php → Domain/Event/CommandWasExecuted.php
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Ivoz\Core\Application\Event; | ||
namespace Ivoz\Core\Domain\Event; | ||
|
||
use Ramsey\Uuid\Uuid; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Ivoz\Core\Domain; | ||
|
||
use Doctrine\Common\Collections\ArrayCollection; | ||
use Ivoz\Core\Domain\Model\EntityInterface; | ||
|
||
interface ForeignKeyTransformerInterface | ||
{ | ||
/** | ||
* @param EntityInterface|DataTransferObjectInterface|null $element | ||
* @param bool $persist | ||
*/ | ||
public function transform($element, $persist = true); | ||
|
||
/** | ||
* @param array $elements | ||
* @return ArrayCollection<array-key, EntityInterface> | ||
*/ | ||
public function transformCollection(array $elements); | ||
} |
2 changes: 1 addition & 1 deletion
2
Application/Helper/ArrayObjectHelper.php → Domain/Helper/ArrayObjectHelper.php
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Ivoz\Core\Application\Helper; | ||
namespace Ivoz\Core\Domain\Helper; | ||
|
||
class ArrayObjectHelper | ||
{ | ||
|
6 changes: 3 additions & 3 deletions
6
Application/Helper/EntityClassHelper.php → Domain/Helper/EntityClassHelper.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
|
||
namespace Ivoz\Core\Domain\Model\Changelog; | ||
|
||
use Ivoz\Core\Domain\Event\EntityEventInterface; | ||
use Ivoz\Core\Domain\Model\LoggerEntityInterface; | ||
use Ivoz\Core\Domain\Model\Commandlog\CommandlogInterface; | ||
|
||
/** | ||
* Changelog | ||
*/ | ||
class Changelog extends ChangelogAbstract implements LoggerEntityInterface, ChangelogInterface | ||
{ | ||
use ChangelogTrait; | ||
|
||
/** | ||
* @param \Ivoz\Core\Domain\Event\EntityEventInterface $event | ||
* @return self | ||
*/ | ||
public static function fromEvent( | ||
EntityEventInterface $event, | ||
CommandlogInterface $command | ||
) { | ||
$entity = new static( | ||
$event->getEntityClass(), | ||
(string) $event->getEntityId(), | ||
$event->getOccurredOn(), | ||
$event->getMicrotime() | ||
); | ||
|
||
$entity->id = $event->getId(); | ||
$entity->setData( | ||
$event->getData() | ||
); | ||
|
||
$entity->setCommand($command); | ||
|
||
$entity->sanitizeValues(); | ||
$entity->initChangelog(); | ||
|
||
return $entity; | ||
} | ||
|
||
/** | ||
* @param array<array-key, mixed> $data | null | ||
* @return static | ||
*/ | ||
public function replaceData($data = null) | ||
{ | ||
return $this->setData($data); | ||
} | ||
|
||
/** | ||
* Get id | ||
* @codeCoverageIgnore | ||
* @return string | ||
*/ | ||
public function getId(): ?string | ||
{ | ||
return $this->id; | ||
} | ||
} |
Oops, something went wrong.