-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
8d23193
commit 3f9098c
Showing
4 changed files
with
95 additions
and
29 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
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,50 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: alex | ||
* Date: 30.01.17 | ||
* Time: 09:39 | ||
*/ | ||
|
||
namespace Demv\Werte\Person\Beziehung; | ||
|
||
use Demv\Werte\Person\Beziehung\Beruflich\Arbeitgeber; | ||
use Demv\Werte\Person\Beziehung\Beruflich\Arbeitnehmer; | ||
use Demv\Werte\Person\Beziehung\Beruflich\FirmaVon; | ||
use Demv\Werte\Person\Beziehung\Beruflich\Geschaeftsfuehrer; | ||
use Demv\Werte\Person\Beziehung\Familiaer\Eltern; | ||
use Demv\Werte\Person\Beziehung\Familiaer\Enkel; | ||
use Demv\Werte\Person\Beziehung\Familiaer\Geschwister; | ||
use Demv\Werte\Person\Beziehung\Familiaer\Grosseltern; | ||
use Demv\Werte\Person\Beziehung\Familiaer\Kind; | ||
use Demv\Werte\Person\Beziehung\Familiaer\Partner; | ||
use Demv\Werte\Person\Beziehung\Familiaer\Schwager; | ||
|
||
final class GegenbeziehungFactory | ||
{ | ||
/** | ||
* @return Gegenbeziehung | ||
*/ | ||
public static function create(): Gegenbeziehung | ||
{ | ||
return new Gegenbeziehung(self::getPairs()); | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
private static function getPairs(): array | ||
{ | ||
$pairs = []; | ||
$pairs[Partner::ID] = Partner::ID; | ||
$pairs[Eltern::ID] = Kind::ID; | ||
$pairs[Arbeitgeber::ID] = Arbeitnehmer::ID; | ||
$pairs[Geschaeftsfuehrer::ID] = FirmaVon::ID; | ||
$pairs[Geschwister::ID] = Geschwister::ID; | ||
$pairs[Schwager::ID] = Schwager::ID; | ||
$pairs[Grosseltern::ID] = Enkel::ID; | ||
|
||
return $pairs; | ||
} | ||
|
||
} |
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,23 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: alex | ||
* Date: 30.01.17 | ||
* Time: 09:43 | ||
*/ | ||
|
||
namespace Demv\Werte\Tests\Person\Beziehung; | ||
|
||
use Demv\Werte\Person\Beziehung\Gegenbeziehung; | ||
use Demv\Werte\Person\Beziehung\GegenbeziehungFactory; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class GegenbeziehungFactoryTest extends TestCase | ||
{ | ||
|
||
public function testCreate() | ||
{ | ||
$this->assertInstanceOf(Gegenbeziehung::class, GegenbeziehungFactory::create()); | ||
} | ||
|
||
} |
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