cleanup and tests added for ci/cd

This commit is contained in:
Dennis Eichhorn 2019-11-20 22:28:04 +01:00
parent 386ae3fbb9
commit 23afe11944
28 changed files with 722 additions and 6 deletions

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Import
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Import;
/**
* Import class.
*
* @package Modules\Exchange\Interfaces\GSD\Import
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class AccountImport
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Import
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Import;
/**
* Import class.
*
* @package Modules\Exchange\Interfaces\GSD\Import
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class ArticleImport
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Import
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Import;
/**
* Import class.
*
* @package Modules\Exchange\Interfaces\GSD\Import
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class BatchPostingImport
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Import
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Import;
/**
* Import class.
*
* @package Modules\Exchange\Interfaces\GSD\Import
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class CostCenterImport
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Import
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Import;
/**
* Import class.
*
* @package Modules\Exchange\Interfaces\GSD\Import
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class CostObjectImport
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Import
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Import;
/**
* Import class.
*
* @package Modules\Exchange\Interfaces\GSD\Import
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class CustomerImport
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Import
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Import;
/**
* Import class.
*
* @package Modules\Exchange\Interfaces\GSD\Import
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class InvoiceImport
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Import
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Import;
/**
* Import class.
*
* @package Modules\Exchange\Interfaces\GSD\Import
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class PostingImport
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Import
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Import;
/**
* Import class.
*
* @package Modules\Exchange\Interfaces\GSD\Import
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class SupplierImport
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Model;
/**
* Model class.
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class Account
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Model;
/**
* Model class.
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class BatchPosting
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Model;
/**
* Model class.
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class GSDAddress
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Model;
/**
* Model class.
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class GSDArticle
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Model;
/**
* Model class.
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class GSDCustomer
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Model;
/**
* Model class.
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class Invoice
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Model;
/**
* Model class.
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class Posting
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Model;
/**
* Model class.
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class Segment
{
}

View File

@ -1 +1,29 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Model;
use phpOMS\Stdlib\Base\Enum;
/**
* Segment type enum.
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
abstract class SegmentType extends Enum
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\GSD\Model;
/**
* Model class.
*
* @package Modules\Exchange\Interfaces\GSD\Model
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class Supplier
{
}

View File

@ -1 +0,0 @@

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\Intrexx\Import
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\Intrexx\Import;
/**
* Import class.
*
* @package Modules\Exchange\Interfaces\Intrexx\Import
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class PromotionImport
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\Intrexx\Import
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\Intrexx\Import;
/**
* Import class.
*
* @package Modules\Exchange\Interfaces\Intrexx\Import
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class SeminarImport
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\Intrexx\Import
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\Intrexx\Import;
/**
* Import class.
*
* @package Modules\Exchange\Interfaces\Intrexx\Import
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class VisitImport
{
}

View File

@ -0,0 +1,43 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Interfaces
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\Intrexx;
use Modules\Exchange\Models\ImporterAbstract;
use phpOMS\Message\RequestAbstract;
/**
* Intrexx import class
*
* @package Modules\Exchange\Models\Interfaces\Intrexx
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class Importer extends ImporterAbstract
{
/**
* Import data from request
*
* @param RequestAbstract $request Request
*
* @return bool
*
* @since 1.0.0
*/
public function importFromRequest(RequestAbstract $request) : bool
{
return true;
}
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\Intrexx\Model
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\Intrexx\Model;
/**
* Model class.
*
* @package Modules\Exchange\Interfaces\Intrexx\Model
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class Promotion
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\Intrexx\Model
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\Intrexx\Model;
/**
* Model class.
*
* @package Modules\Exchange\Interfaces\Intrexx\Model
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class Seminar
{
}

View File

@ -1 +1,28 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Exchange\Interfaces\Intrexx\Model
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Exchange\Interfaces\Intrexx\Model;
/**
* Model class.
*
* @package Modules\Exchange\Interfaces\Intrexx\Model
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class Visit
{
}

View File

@ -22,8 +22,6 @@ use Modules\Accounting\Models\CostObjectMapper;
use Modules\Exchange\Interfaces\OMS\Model\ExchangeType;
use Modules\Exchange\Models\ImporterAbstract;
use phpOMS\DataStorage\Database\Connection\ConnectionFactory;
use phpOMS\DataStorage\Database\DatabaseStatus;
use phpOMS\Message\RequestAbstract;
use Modules\ClientManagement\Models\ClientMapper;
@ -51,7 +49,7 @@ final class Importer extends ImporterAbstract
$start = new \DateTime($request->getData('start') ?? 'now');
$end = new \DateTime($request->getData('end') ?? 'now');
$type = (int) ($request->getData('type') ?? 0);
$type = (int) ($request->getData('type') ?? 0);
$source = (int) ($request->getData('source') ?? 0);
if ($type === ExchangeType::CUSTOMER) {
@ -136,7 +134,7 @@ final class Importer extends ImporterAbstract
public function importAddress(\DateTime $start, \DateTime $end): void
{
while (($line = \fgetcsv($this->remote)) !== false) {
var_dump($line);
}
}
@ -152,7 +150,7 @@ final class Importer extends ImporterAbstract
*/
public function importCustomer(\DateTime $start, \DateTime $end): void
{
$euTIN = CustomerIdTypeMapper::getByType(CustomerIdType::EU_TIN);
$euTIN = CustomerIdTypeMapper::getByType(CustomerIdType::EU_TIN);
$gerTIN = CustomerIdTypeMapper::getByType(CustomerIdType::GER_TIN);
while (($line = \fgetcsv($this->remote)) !== false) {