diff --git a/src/Bios2000.php b/src/Bios2000.php index d0d1d99..c6c6a16 100644 --- a/src/Bios2000.php +++ b/src/Bios2000.php @@ -14,6 +14,11 @@ use Bios2000\Models\Database\ProductionOrderPositions; use Bios2000\Models\Database\RepresentativeSales; +/** + * Class Bios2000 + * @package Bios2000 + * @deprecated + */ class Bios2000 { @@ -90,4 +95,4 @@ public function productionOrderPositions() { return new ProductionOrderPositions; } -} \ No newline at end of file +} diff --git a/src/Models/Adresse.php b/src/Models/Adresse.php new file mode 100644 index 0000000..8c976f8 --- /dev/null +++ b/src/Models/Adresse.php @@ -0,0 +1,44 @@ +hasMany(Ansprechpartner::class, 'KUNU', 'KUNU'); + } +} diff --git a/src/Models/Ansprechpartner.php b/src/Models/Ansprechpartner.php new file mode 100644 index 0000000..6febe5d --- /dev/null +++ b/src/Models/Ansprechpartner.php @@ -0,0 +1,44 @@ +belongsTo(Adresse::class, 'KUNU', 'KUNU'); + } + +} diff --git a/src/Models/Archiv.php b/src/Models/Archiv.php new file mode 100644 index 0000000..2964bc1 --- /dev/null +++ b/src/Models/Archiv.php @@ -0,0 +1,157 @@ + 'LS', + 'BELEG' => $number, + ]; + + /* + * Return only first Result + */ + return (new Archiv)->aw($filter)[0][0]; + } + + /** + * Returns meta data of a single delivery note + * + * @param int $number + * @return mixed + */ + public static function deliverynotePosten(int $number) + { + $filter = [ + 'ART' => 'LS', + 'BELEG' => $number, + ]; + + /* + * Return only first Result + */ + return (new Archiv)->aw($filter, false)[0]; + } + + /** + * Returns result filtered by $arguments of "Auftragswesen" (AW) + * + * @param array $arguments + * @param bool $kopf + * @return Collection + */ + private function aw(array $arguments, bool $kopf = true) + { + return $this->archive('AW', $arguments, $kopf); + } + + /** + * Returns result of all archives filtered by $arguments, selected by $archive + * + * @param string $archive + * @param array $arguments + * @param bool $kopf (default: true) true = _KOPF, false = _POSTEN + * @return Collection + */ + private function archive(string $archive, array $arguments, bool $kopf = true) + { + $year = date('Y'); + + $result = new Collection(); + + while (1) { + if ($kopf) { + $tableName = config('database.connections.bios2000.dba') . '.dbo.' . $archive . '_ARCHIV_' . $year . '_KOPF'; + } else { + $tableName = config('database.connections.bios2000.dba') . '.dbo.' . $archive . '_ARCHIV_' . $year . '_POSTEN'; + } + + try { + DB::connection('bios2000')->table($tableName)->select('ART')->first(); + } catch (Exception $e) { + if ($year == date('Y')) continue; + break; + } + + if ($kopf) { + if (DB::connection('bios2000')->table($tableName) + ->where($arguments) + ->orderBy('VERSION', 'desc') + ->count() != 0) { + + if ($year < date('Y')) { + $dbResult = Cache::rememberForever('bios2000_archive_' . $archive . '_' . $year . '_kopf_' . implode('-', $arguments), + function () use ($tableName, $arguments) { + return DB::connection('bios2000')->table($tableName) + ->where($arguments) + ->orderBy('VERSION', 'desc')->get()->all(); + }); + } else { + $dbResult = DB::connection('bios2000')->table($tableName) + ->where($arguments) + ->orderBy('VERSION', 'desc')->get()->all(); + } + + $result->push($dbResult); + } + + } else { + if (DB::connection('bios2000')->table($tableName) + ->where('POSITIONS_NR', '!=', null) + ->where($arguments) + ->orderBy('VERSION', 'desc') + ->count() != 0) { + + if ($year < date('Y')) { + $dbResult = Cache::rememberForever('bios2000_archive_' . $archive . '_' . $year . '_posten_' . implode('-', $arguments), + function () use ($tableName, $arguments) { + return DB::connection('bios2000')->table($tableName) + ->where('POSITIONS_NR', '!=', null) + ->where($arguments) + ->orderBy('VERSION', 'desc')->get()->all(); + }); + + } else { + $dbResult = DB::connection('bios2000')->table($tableName) + ->where('POSITIONS_NR', '!=', null) + ->where($arguments) + ->orderBy('VERSION', 'desc')->get()->all(); + } + + $result->push($dbResult); + + } + } + + $year--; + } + + return $result; + } + +} diff --git a/src/Models/Archive.php b/src/Models/Archive.php index 86828b1..ed06cc7 100644 --- a/src/Models/Archive.php +++ b/src/Models/Archive.php @@ -6,6 +6,11 @@ use Illuminate\Support\Facades\DB; use Exception; +/** + * Class Archive + * @package Bios2000\Models + * @deprecated + */ class Archive { diff --git a/src/Models/Artikel.php b/src/Models/Artikel.php new file mode 100644 index 0000000..0ceb239 --- /dev/null +++ b/src/Models/Artikel.php @@ -0,0 +1,93 @@ +hasMany(ChaotLager::class, 'ARTNR', 'ARTNR'); + } + + /** + * Returns additional texts relationship. + * + * @param int $lang Language number (optional, default is german) + * @return \Illuminate\Database\Eloquent\Relations\HasMany + */ + public function zusatztexte($lang = 0) + { + return $this->hasMany(ArtikelZusatztext::class, 'ARTNR', 'ARTNR') + ->where('SPRACHE', $lang); + } + + /** + * Return warehouses relationship. + * + * @return \Illuminate\Database\Eloquent\Relations\HasMany + */ + public function lager() + { + return $this->hasMany(ArtikelLager::class, 'ARTNR', 'ARTNR'); + } + + public function bestand() + { + return DB::connection($this->connection)->table('ARTIKEL_LAGER') + ->select(DB::raw("sum(BESTAND)-(SELECT ISNULL(sum(d.BESTAND), 0.00) FROM ARTIKEL_LAGER d (NOLOCK) WHERE + (d.ARTNR = '" . $this->ARTNR . "' AND d.LAGER = -1)) -(SELECT ISNULL(sum(d.BESTAND), 0.00) FROM + ARTIKEL_LAGER d (NOLOCK) WHERE (d.ARTNR = '" . $this->ARTNR . "' AND d.LAGER IN (SELECT y.NUMMER FROM + SCHLUESSEL y WHERE y.ART = 'LG' AND y.EU_KZ = 'J' ))) as SUM_BESTAND")) + ->addSelect(DB::raw("sum(BESTELLT) as SUM_BESTELLT")) + ->addSelect(DB::raw("sum(RUECKSTAND) as SUM_RUECKSTAND")) + ->addSelect(DB::raw("sum(MIBEST) as SUM_MIBEST")) + ->addSelect(DB::raw("sum(SOLLBEST) as SUM_SOLLBEST")) + ->addSelect(DB::raw("sum(BBK) as SUM_BBK")) + ->addSelect(DB::raw("(SELECT ISNULL(sum(a.GELIEFERT), 0.00) FROM AUFTRAG_POSTEN a (NOLOCK) WHERE (a.ART = 'A' AND a.ZEILEN_ART = 'L' AND a.ARTNR = '" . $this->ARTNR . "')) + +(SELECT ISNULL(sum(d.BESTAND), 0.00) FROM ARTIKEL_LAGER d (NOLOCK) WHERE (d.ARTNR = '" . $this->ARTNR . "' AND d.LAGER = -1)) + +(SELECT ISNULL(sum(p.ABRUFMENGE), 0.00) FROM VDA_ABRUF_POSTEN p (NOLOCK) + LEFT OUTER JOIN VDA_ABRUF_KOPF k (NOLOCK) ON (p.NUMMER = k.NUMMER) + WHERE (k.ARTNR = '" . $this->ARTNR . "') AND (k.TESTKENNZEICHEN = 0) AND (p.GELIEFERT_FLAG = 'J')) + +(SELECT ISNULL(sum(g.GELIEFERT),0.00) FROM PACKMITTEL_ARTNR_GELIEFERT g (NOLOCK) WHERE (g.ARTNR = '" . $this->ARTNR . "')) as SUM_RESERVIERT")) + ->where('ARTNR', '=', $this->ARTNR) + ->where('LAGER', '!=', '6')// 6 = Sperrlager + ->first(); + } +} diff --git a/src/Models/ArtikelLager.php b/src/Models/ArtikelLager.php new file mode 100644 index 0000000..a9afecf --- /dev/null +++ b/src/Models/ArtikelLager.php @@ -0,0 +1,35 @@ +hasMany(AuftragPosten::class, 'ART', 'ART') + ->where('KUNU', $this->KUNU) + ->where('NUMMER', $this->NUMMER); + } + +} diff --git a/src/Models/AuftragPosten.php b/src/Models/AuftragPosten.php new file mode 100644 index 0000000..35fb48a --- /dev/null +++ b/src/Models/AuftragPosten.php @@ -0,0 +1,34 @@ +connection)->table('ARTIKEL_LAGER') - ->select(DB::raw("sum(BESTAND)-(SELECT ISNULL(sum(d.BESTAND), 0.00) FROM ARTIKEL_LAGER d (NOLOCK) WHERE + ->select(DB::raw("sum(BESTAND)-(SELECT ISNULL(sum(d.BESTAND), 0.00) FROM ARTIKEL_LAGER d (NOLOCK) WHERE (d.ARTNR = '" . $this->ARTNR . "' AND d.LAGER = -1)) -(SELECT ISNULL(sum(d.BESTAND), 0.00) FROM ARTIKEL_LAGER d (NOLOCK) WHERE (d.ARTNR = '" . $this->ARTNR . "' AND d.LAGER IN (SELECT y.NUMMER FROM SCHLUESSEL y WHERE y.ART = 'LG' AND y.EU_KZ = 'J' ))) as SUM_BESTAND")) @@ -62,9 +67,9 @@ public function stock() ->addSelect(DB::raw("sum(BBK) as SUM_BBK")) ->addSelect(DB::raw("(SELECT ISNULL(sum(a.GELIEFERT), 0.00) FROM AUFTRAG_POSTEN a (NOLOCK) WHERE (a.ART = 'A' AND a.ZEILEN_ART = 'L' AND a.ARTNR = '" . $this->ARTNR . "')) +(SELECT ISNULL(sum(d.BESTAND), 0.00) FROM ARTIKEL_LAGER d (NOLOCK) WHERE (d.ARTNR = '" . $this->ARTNR . "' AND d.LAGER = -1)) - +(SELECT ISNULL(sum(p.ABRUFMENGE), 0.00) FROM VDA_ABRUF_POSTEN p (NOLOCK) - LEFT OUTER JOIN VDA_ABRUF_KOPF k (NOLOCK) ON (p.NUMMER = k.NUMMER) - WHERE (k.ARTNR = '" . $this->ARTNR . "') AND (k.TESTKENNZEICHEN = 0) AND (p.GELIEFERT_FLAG = 'J')) + +(SELECT ISNULL(sum(p.ABRUFMENGE), 0.00) FROM VDA_ABRUF_POSTEN p (NOLOCK) + LEFT OUTER JOIN VDA_ABRUF_KOPF k (NOLOCK) ON (p.NUMMER = k.NUMMER) + WHERE (k.ARTNR = '" . $this->ARTNR . "') AND (k.TESTKENNZEICHEN = 0) AND (p.GELIEFERT_FLAG = 'J')) +(SELECT ISNULL(sum(g.GELIEFERT),0.00) FROM PACKMITTEL_ARTNR_GELIEFERT g (NOLOCK) WHERE (g.ARTNR = '" . $this->ARTNR . "')) as SUM_RESERVIERT")) ->where('ARTNR', '=', $this->ARTNR) ->where('LAGER', '!=', '6')// 6 = Sperrlager diff --git a/src/Models/Database/ArticleAdditionaltext.php b/src/Models/Database/ArticleAdditionaltext.php index 58aa9e4..83c4b54 100644 --- a/src/Models/Database/ArticleAdditionaltext.php +++ b/src/Models/Database/ArticleAdditionaltext.php @@ -4,6 +4,11 @@ use Bios2000\Models\Bios2000Master; +/** + * Class ArticleAdditionaltext + * @package Bios2000\Models\Database + * @deprecated + */ class ArticleAdditionaltext extends Bios2000Master { /** diff --git a/src/Models/Database/ArticleChaoticWarehouse.php b/src/Models/Database/ArticleChaoticWarehouse.php index ea2f83e..93664d6 100644 --- a/src/Models/Database/ArticleChaoticWarehouse.php +++ b/src/Models/Database/ArticleChaoticWarehouse.php @@ -5,6 +5,11 @@ use Bios2000\Models\Bios2000Master; use Illuminate\Support\Facades\DB; +/** + * Class ArticleChaoticWarehouse + * @package Bios2000\Models\Database + * @deprecated + */ class ArticleChaoticWarehouse extends Bios2000Master { /** @@ -22,5 +27,5 @@ class ArticleChaoticWarehouse extends Bios2000Master protected $primaryKey = "ARTNR"; public $incrementing = false; - + } diff --git a/src/Models/Database/ArticleStocks.php b/src/Models/Database/ArticleStocks.php index 33f3e6e..ee51512 100644 --- a/src/Models/Database/ArticleStocks.php +++ b/src/Models/Database/ArticleStocks.php @@ -5,6 +5,11 @@ use Bios2000\Models\Bios2000Master; use Illuminate\Support\Facades\DB; +/** + * Class ArticleStocks + * @package Bios2000\Models\Database + * @deprecated + */ class ArticleStocks extends Bios2000Master { /** @@ -22,5 +27,5 @@ class ArticleStocks extends Bios2000Master protected $primaryKey = "ARTNR"; public $incrementing = false; - + } diff --git a/src/Models/Database/Capacities.php b/src/Models/Database/Capacities.php index d1f70e3..914c1bb 100644 --- a/src/Models/Database/Capacities.php +++ b/src/Models/Database/Capacities.php @@ -4,6 +4,11 @@ use Bios2000\Models\Bios2000Master; +/** + * Class Capacities + * @package Bios2000\Models\Database + * @deprecated + */ class Capacities extends Bios2000Master { /** diff --git a/src/Models/Database/ContactPerson.php b/src/Models/Database/ContactPerson.php index 41f5e2c..5cbef9a 100644 --- a/src/Models/Database/ContactPerson.php +++ b/src/Models/Database/ContactPerson.php @@ -4,6 +4,11 @@ use Bios2000\Models\Bios2000Master; +/** + * Class ContactPerson + * @package Bios2000\Models\Database + * @deprecated + */ class ContactPerson extends Bios2000Master { /** diff --git a/src/Models/Database/Country.php b/src/Models/Database/Country.php index 7075e40..7f06526 100644 --- a/src/Models/Database/Country.php +++ b/src/Models/Database/Country.php @@ -4,6 +4,11 @@ use Bios2000\Models\Bios2000Master; +/** + * Class Country + * @package Bios2000\Models\Database + * @deprecated + */ class Country extends Bios2000Master { /** diff --git a/src/Models/Database/Keys.php b/src/Models/Database/Keys.php index b3eb670..1ed0cc6 100644 --- a/src/Models/Database/Keys.php +++ b/src/Models/Database/Keys.php @@ -4,6 +4,11 @@ use Bios2000\Models\Bios2000Master; +/** + * Class Keys + * @package Bios2000\Models\Database + * @deprecated + */ class Keys extends Bios2000Master { /** diff --git a/src/Models/Database/OrderHead.php b/src/Models/Database/OrderHead.php index 4771b2e..fbe4c3b 100644 --- a/src/Models/Database/OrderHead.php +++ b/src/Models/Database/OrderHead.php @@ -4,6 +4,11 @@ use Bios2000\Models\Bios2000Master; +/** + * Class OrderHead + * @package Bios2000\Models\Database + * @deprecated + */ class OrderHead extends Bios2000Master { /** diff --git a/src/Models/Database/OrderItem.php b/src/Models/Database/OrderItem.php index 40474ee..b732f90 100644 --- a/src/Models/Database/OrderItem.php +++ b/src/Models/Database/OrderItem.php @@ -4,6 +4,11 @@ use Bios2000\Models\Bios2000Master; +/** + * Class OrderItem + * @package Bios2000\Models\Database + * @deprecated + */ class OrderItem extends Bios2000Master { /** diff --git a/src/Models/Database/ProductionOrderHead.php b/src/Models/Database/ProductionOrderHead.php index dcd0667..5a51212 100644 --- a/src/Models/Database/ProductionOrderHead.php +++ b/src/Models/Database/ProductionOrderHead.php @@ -4,6 +4,11 @@ use Bios2000\Models\Bios2000Master; +/** + * Class ProductionOrderHead + * @package Bios2000\Models\Database + * @deprecated + */ class ProductionOrderHead extends Bios2000Master { /** diff --git a/src/Models/Database/ProductionOrderPositions.php b/src/Models/Database/ProductionOrderPositions.php index 3130791..ecb6884 100644 --- a/src/Models/Database/ProductionOrderPositions.php +++ b/src/Models/Database/ProductionOrderPositions.php @@ -4,6 +4,11 @@ use Bios2000\Models\Bios2000Master; +/** + * Class ProductionOrderPositions + * @package Bios2000\Models\Database + * @deprecated + */ class ProductionOrderPositions extends Bios2000Master { /** diff --git a/src/Models/Database/RepresentativeSales.php b/src/Models/Database/RepresentativeSales.php index f7d29c4..92774f7 100644 --- a/src/Models/Database/RepresentativeSales.php +++ b/src/Models/Database/RepresentativeSales.php @@ -4,6 +4,11 @@ use Bios2000\Models\Bios2000Master; +/** + * Class RepresentativeSales + * @package Bios2000\Models\Database + * @deprecated + */ class RepresentativeSales extends Bios2000Master { /** diff --git a/src/Models/Fertigungsauftrag.php b/src/Models/Fertigungsauftrag.php new file mode 100644 index 0000000..27de39d --- /dev/null +++ b/src/Models/Fertigungsauftrag.php @@ -0,0 +1,46 @@ +hasMany(FertigungsauftragPosten::class, 'KUNU', 'KUNU') + ->where('NUMMER', $this->NUMMER) + ->where('AUFTRAG_POSITION', $this->AUFTRAG_POSITION); + } + +} diff --git a/src/Models/FertigungsauftragPosten.php b/src/Models/FertigungsauftragPosten.php new file mode 100644 index 0000000..7321373 --- /dev/null +++ b/src/Models/FertigungsauftragPosten.php @@ -0,0 +1,59 @@ +belongsTo(Fertigungsauftrag::class, 'KUNU', 'KUNU') + ->where('NUMMER', $this->NUMMER) + ->where('AUFTRAG_POSITION', $this->AUFTRAG_POSITION); + } + + /** + * Returns article relationship if it is a article position. + * + * @return \Illuminate\Database\Eloquent\Relations\HasOne + */ + public function artikel() + { + if ($this->ART == 'L') { + return $this->hasOne(Artikel::class, 'ARTNR', 'ARTNR'); + } + } + + +} diff --git a/src/Models/Kapazitaet.php b/src/Models/Kapazitaet.php new file mode 100644 index 0000000..257ef93 --- /dev/null +++ b/src/Models/Kapazitaet.php @@ -0,0 +1,36 @@ +getKeyName(); + if (!is_array($keys)) { + return parent::setKeysForSaveQuery($query); + } + + foreach ($keys as $keyName) { + $query->where($keyName, '=', $this->getKeyForSaveQuery($keyName)); + } + + return $query; + } + + /** + * Get the primary key value for a save query. + * + * @param mixed $keyName + * @return mixed + */ + protected function getKeyForSaveQuery($keyName = null) + { + if (is_null($keyName)) { + $keyName = $this->getKeyName(); + } + + if (isset($this->original[$keyName])) { + return $this->original[$keyName]; + } + + return $this->getAttribute($keyName); + } +} diff --git a/tests/Feature/.gitkeep b/tests/Feature/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/TestCase.php b/tests/TestCase.php new file mode 100644 index 0000000..89e2c2b --- /dev/null +++ b/tests/TestCase.php @@ -0,0 +1,34 @@ +assertArrayHasKey($key, $array, $message); + } + } + + /** + * Assert that a models has all given columns + * + * @param array $columns + * @param string $model + */ + protected function assertModelHasColumns(array $columns, string $model): void + { + $array = (new $model())->firstOrFail()->toArray(); + + $this->assertArrayHasKeys($columns, $array, 'Failed asserting that model \''.$model.'\' has all columns.'); + } +} diff --git a/tests/Unit/AdressenTest.php b/tests/Unit/AdressenTest.php new file mode 100644 index 0000000..a9c391e --- /dev/null +++ b/tests/Unit/AdressenTest.php @@ -0,0 +1,59 @@ +assertModelHasColumns($expectedDatabaseColumns, Adresse::class); + } + + /** @test */ + function a_address_has_contactperson_relationship() + { + $contactperson = Ansprechpartner::first(); + + $contactperson = Adresse::find($contactperson->KUNU)->ansprechpartner()->first(); + + $this->assertInstanceOf(Ansprechpartner::class, $contactperson); + } + + /** @test */ + function anlage_datum_and_aenderung_datum_are_carbon_objects() + { + $address = Adresse::first(); + + $this->assertInstanceOf(Carbon::class, $address->ANLAGE_DATUM); + $this->assertInstanceOf(Carbon::class, $address->AENDERUNG_DATUM); + } + + /* + * TODO: + * - Attribut VERTRETER_1_NAME + * - Attribut ZB_NAME + * - Attribut VB_NAME + * - Attribut ANLAGE_USER_NAME + * - Attribut AENDERUNG_USER_NAME + * - Attribut STATUS + * - Attribut isLiefersperre (englisch!) (KREDIT_LIMIT == 1.11) + */ +} diff --git a/tests/Unit/AnsprechpartnerTest.php b/tests/Unit/AnsprechpartnerTest.php new file mode 100644 index 0000000..46db7c7 --- /dev/null +++ b/tests/Unit/AnsprechpartnerTest.php @@ -0,0 +1,31 @@ +assertModelHasColumns($expectedDatabaseColumns, Ansprechpartner::class); + } + + /** @test */ + function a_ansprechartner_has_a_address_relationship() + { + $adresse = Ansprechpartner::first()->adresse()->first(); + + $this->assertInstanceOf(Adresse::class, $adresse); + } +} diff --git a/tests/Unit/ArchivTest.php b/tests/Unit/ArchivTest.php new file mode 100644 index 0000000..fe9e845 --- /dev/null +++ b/tests/Unit/ArchivTest.php @@ -0,0 +1,36 @@ +table(config('database.connections.bios2000.dba') . '.dbo.' . 'AW_ARCHIV_2018_KOPF') + ->where('ART', 'LS') + ->first(); + + $archivedDeliverynote = Archiv::deliverynote($deliverynote->BELEG); + + $this->assertEquals($deliverynote->KUNU, $archivedDeliverynote->KUNU); + } + + /** @test */ + function a_deliverynote_posten_can_be_found_in_archive() + { + $deliverynotePosten = DB::connection('bios2000') + ->table(config('database.connections.bios2000.dba') . '.dbo.' . 'AW_ARCHIV_2018_POSTEN') + ->where('ART', 'LS') + ->first(); + + $archivedDeliverynotePosten = Archiv::deliverynotePosten($deliverynotePosten->BELEG); + + $this->assertEquals($deliverynotePosten->ARTNR, $archivedDeliverynotePosten[0]->ARTNR); + } +} diff --git a/tests/Unit/ArtikelTest.php b/tests/Unit/ArtikelTest.php new file mode 100644 index 0000000..3931465 --- /dev/null +++ b/tests/Unit/ArtikelTest.php @@ -0,0 +1,96 @@ +assertModelHasColumns($expectedDatabaseColumns, Artikel::class); + } + + /** @test */ + function a_artikel_has_chaotlager() + { + $articlenumber = ChaotLager::first()->ARTNR; + + $article = Artikel::find($articlenumber); + + $this->assertInstanceOf(ChaotLager::class, $article->chaotLager()->first()); + } + + /** @test */ + function it_has_zusatztexte() + { + $articlenumber = ArtikelZusatztext::first()->ARTNR; + + $article = Artikel::find($articlenumber); + + $this->assertInstanceOf(ArtikelZusatztext::class, $article->zusatztexte()->first()); + } + + /** @test */ + function it_has_lager() + { + $articlenumber = ArtikelLager::where('ARTNR', '!=', '')->first()->ARTNR; + + $article = Artikel::find($articlenumber); + + $this->assertInstanceOf(ArtikelLager::class, $article->lager()->first()); + } + + /** @test */ + function anlage_datum_and_aenderung_datum_are_carbon_objects() + { + $article = Artikel::first(); + + $this->assertInstanceOf(Carbon::class, $article->ANLAGE_DATUM); + $this->assertInstanceOf(Carbon::class, $article->AENDERUNG_DATUM); + } + + /** @test */ + function it_returns_stock() + { + $articlenumber = ArtikelLager::where('ARTNR', '!=', '')->first(); + + $article = Artikel::find($articlenumber)->first(); + + $this->assertObjectHasAttribute('SUM_BESTAND', $article->bestand()); + $this->assertObjectHasAttribute('SUM_BESTELLT', $article->bestand()); + $this->assertObjectHasAttribute('SUM_RUECKSTAND', $article->bestand()); + $this->assertObjectHasAttribute('SUM_MIBEST', $article->bestand()); + $this->assertObjectHasAttribute('SUM_SOLLBEST', $article->bestand()); + $this->assertObjectHasAttribute('SUM_BBK', $article->bestand()); + $this->assertObjectHasAttribute('SUM_RESERVIERT', $article->bestand()); + } +} diff --git a/tests/Unit/AuftragTest.php b/tests/Unit/AuftragTest.php new file mode 100644 index 0000000..813b2b2 --- /dev/null +++ b/tests/Unit/AuftragTest.php @@ -0,0 +1,67 @@ +assertModelHasColumns($expectedDatabaseColumns, Auftrag::class); + } + + /** @test */ + function a_posten_has_needed_columns() + { + $expectedDatabaseColumns = [ + 'ART', 'KUNU', 'NUMMER', 'LFD_NR', 'POSITIONS_NR', 'VORGANGS_NUMMER', 'DISPO_INTERN', 'DISPO_KUNDE', + 'ARTNR', 'BEZ_1', 'BEZ_2', 'BEZ_1_ALIGN', 'BESTELLT', 'GELIEFERT', 'PREIS', 'RABATT_1', 'RABATT_2', 'EK', + 'EK_FLAG', 'GEWICHT', 'V_EINHEIT', 'EM_PREIS', 'LS_FLAG', 'ZEILEN_ART', 'JUMBO_FLAG', 'DRUCK_FLAG', + 'USER_MARKE', 'BRUTTO_NETTO', 'LS_NUMMER', 'LS_DATUM', 'LAGER', 'WG', 'WS', 'PE', 'US', 'VARIANTE', 'SW1', + 'SW2', 'SW3', 'BEMERKUNG', 'ZEILEN_SUMME', 'ZEILEN_DB', 'ORG_MENGE', 'ZN_REV', 'VIRTUELLER_AUFTRAG', + 'DISPO_ORG_WUNSCHTERMIN', + ]; + + $this->assertModelHasColumns($expectedDatabaseColumns, AuftragPosten::class); + } + + /** @test */ + function it_has_items() + { + $item = AuftragPosten::first(); + + $order = Auftrag::where('ART', $item->ART) + ->where('KUNU', $item->KUNU) + ->where('NUMMER', $item->NUMMER) + ->first(); + + $this->assertInstanceOf(AuftragPosten::class, $order->posten()->first()); + } +} diff --git a/tests/Unit/ChaotLagerTest.php b/tests/Unit/ChaotLagerTest.php new file mode 100644 index 0000000..733c08d --- /dev/null +++ b/tests/Unit/ChaotLagerTest.php @@ -0,0 +1,31 @@ +assertModelHasColumns($expectedDatabaseColumns, ChaotLager::class); + } + + /** @test */ + function a_chaotlager_datum_is_carbon_instance() + { + $chaotlager = ChaotLager::first(); + + $this->assertInstanceOf(Carbon::class, $chaotlager->DATUM); + } +} diff --git a/tests/Unit/FertigungsauftragTest.php b/tests/Unit/FertigungsauftragTest.php new file mode 100644 index 0000000..be19c7d --- /dev/null +++ b/tests/Unit/FertigungsauftragTest.php @@ -0,0 +1,98 @@ +assertModelHasColumns($expectedDatabaseColumns, Fertigungsauftrag::class); + } + + /** @test */ + function a_posten_has_needed_columns() + { + $expectedDatabaseColumns = [ + 'KUNU', 'NUMMER', 'AUFTRAG_POSITION', 'POS', 'BARCODE', 'ARTNR', 'PLAN_MENGE', 'IST_MENGE', 'PLAN_WERT', + 'IST_WERT', 'ANF_TERMIN', 'END_TERMIN', 'ANF_MINUTE', 'END_MINUTE', 'ART', 'REFA', 'DRUCK_FLAG', 'FB_KOPIE', + 'MEHR_PLATZ', 'TEXT_1', 'TEXT_2', 'TEXT_3', 'TEXT_4', 'TEXT_5', 'TEXT_6', 'TEXT_7', 'BEMERKUNG', + 'AUSSCHUSS', 'V_KZ', 'LEITSTAND', 'ART_EXT_AENDERUNG', 'HM1_NUMMER', 'HM2_NUMMER', 'HM3_NUMMER', + 'HM4_NUMMER', 'HM5_NUMMER', 'HM1_TEXT', 'HM2_TEXT', 'HM3_TEXT', 'HM4_TEXT', 'HM5_TEXT', 'C1', 'C2', 'C3', + 'C4', 'C5', 'C6', 'C7', 'C8', 'C9', 'C10', 'FIX_TERMIN', 'BERECHNUNGS_ART', 'DURCHMESSER', 'LAENGE', + 'BREITE', 'HOEHE', 'PLAN_ENTNAHME', 'IST_ENTNAHME', 'EK', 'PE', 'EK_FLAG', 'ENTNAHME_AUSGEBUCHT', + 'ENTNAHME_LAGER', 'SL_SW', 'MASCH_SATZ', 'LOHN_RZ_SATZ', 'LOHN_LZ_SATZ', 'PLAN_RZ_SEK', 'PLAN_LZ_SEK', + 'PLAN_UZ_SEK', 'IST_RZ_SEK', 'IST_LZ_SEK', 'IST_SZ_SEK', 'IST_UZ_SEK', 'APID_INDEX', 'ZUSCHLAG', + 'ZUSCHLAG_BP', 'TERMNR_AV', 'VON_MC', 'D2_UEBERLAPPEN', 'D2_UEBERLAPPEN_PROZ', 'PLAN_BZ_SEK', 'MEILENSTEIN', + 'D2_RK1', 'D2_RK2', 'AUTO_PLANZEIT_SEK', 'IST_MDE_LZ_SEK', 'AUSSCHUSS_WERT_MAT', 'AUSSCHUSS_WERT_RZ', + 'AUSSCHUSS_WERT_LZ', 'NACHARBEIT', 'REKLAMATION', 'ANZAHL_BEDIENER', 'MMB', 'EINMALKOSTEN', + 'DISPO2000_PM_ANZAHL_PALETTEN', 'DISPO2000_PM_ANZAHL_TEILE', 'FF_ME', 'FF_ME_FAKTOR', 'FUELLMENGE', + 'SPLIT_ORGMENGE', 'SPLIT_PLAN_RUESTWERT', 'SPLIT_IST_RUESTWERT', 'D2_PERSONALQUOTE', + 'D2_BEVORZUGTE_SCHICHT', 'D2_ALTERNATE_KAP1', 'D2_ALTERNATE_KAP2', 'D2_ALTERNATE_KAP3', 'D2_KAP_SPLIT', + 'BIOS_ANF_TERMIN', 'BIOS_END_TERMIN', 'BIOS_ANF_MINUTE', 'BIOS_END_MINUTE', 'D2_PLANUNGS_KZ', 'D2_AG_FOLGE', + 'PRUEF_PFLICHTIG', 'HM_1_FEINPLANUNG', 'HM_2_FEINPLANUNG', 'HM_3_FEINPLANUNG', 'HM_4_FEINPLANUNG', + 'HM_5_FEINPLANUNG', 'HM_1_FP_ERLEDIGT', 'HM_2_FP_ERLEDIGT', 'HM_3_FP_ERLEDIGT', 'HM_4_FP_ERLEDIGT', + 'HM_5_FP_ERLEDIGT', 'FF_PLAN_WERT_FIX', 'FF_PLAN_WERT_VAR', 'FF_PLAN_WERT_MINDEST', 'FERTIGUNGSFOLGE', + 'ORIGINAL_START', + ]; + + $this->assertModelHasColumns($expectedDatabaseColumns, FertigungsauftragPosten::class); + } + + /** @test */ + function it_has_items() + { + $item = FertigungsauftragPosten::first(); + + $productionOrder = Fertigungsauftrag::where('KUNU', $item->KUNU) + ->where('NUMMER', $item->NUMMER) + ->where('AUFTRAG_POSITION', $item->AUFTRAG_POSITION) + ->first(); + + $this->assertInstanceOf(FertigungsauftragPosten::class, $productionOrder->posten()->first()); + } + + /** @test */ + function a_posten_has_a_head() + { + $item = FertigungsauftragPosten::first(); + + $this->assertInstanceOf(Fertigungsauftrag::class, $item->kopf()->first()); + } + + /** @test */ + function a_article_posten_has_a_article() + { + $item = FertigungsauftragPosten::where('ART', 'L')->first(); + + $this->assertInstanceOf(Artikel::class, $item->artikel()->first()); + } +} diff --git a/tests/Unit/KapazitaetTest.php b/tests/Unit/KapazitaetTest.php new file mode 100644 index 0000000..58d0581 --- /dev/null +++ b/tests/Unit/KapazitaetTest.php @@ -0,0 +1,43 @@ +assertModelHasColumns($expectedDatabaseColumns, Kapazitaet::class); + } + + /** @test */ + function anlage_datum_and_aenderung_datum_are_carbon_objects() + { + $capacity = Kapazitaet::first(); + + $this->assertInstanceOf(Carbon::class, $capacity->ANLAGE_DATUM); + $this->assertInstanceOf(Carbon::class, $capacity->AENDERUNG_DATUM); + } +} diff --git a/tests/Unit/LandTest.php b/tests/Unit/LandTest.php new file mode 100644 index 0000000..132a23c --- /dev/null +++ b/tests/Unit/LandTest.php @@ -0,0 +1,27 @@ +assertModelHasColumns($expectedDatabaseColumns, Land::class); + } +} diff --git a/tests/Unit/SchluesselTest.php b/tests/Unit/SchluesselTest.php new file mode 100644 index 0000000..805bb60 --- /dev/null +++ b/tests/Unit/SchluesselTest.php @@ -0,0 +1,29 @@ +assertModelHasColumns($expectedDatabaseColumns, Schluessel::class); + } +} diff --git a/tests/Unit/VertreterBewegungTest.php b/tests/Unit/VertreterBewegungTest.php new file mode 100644 index 0000000..362b8fa --- /dev/null +++ b/tests/Unit/VertreterBewegungTest.php @@ -0,0 +1,29 @@ +assertModelHasColumns($expectedDatabaseColumns, VertreterBewegung::class); + } +} diff --git a/vendor/autoload.php b/vendor/autoload.php deleted file mode 100644 index 7f6226a..0000000 --- a/vendor/autoload.php +++ /dev/null @@ -1,7 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - * @see http://www.php-fig.org/psr/psr-0/ - * @see http://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - // PSR-4 - private $prefixLengthsPsr4 = array(); - private $prefixDirsPsr4 = array(); - private $fallbackDirsPsr4 = array(); - - // PSR-0 - private $prefixesPsr0 = array(); - private $fallbackDirsPsr0 = array(); - - private $useIncludePath = false; - private $classMap = array(); - private $classMapAuthoritative = false; - private $missingClasses = array(); - private $apcuPrefix; - - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); - } - - return array(); - } - - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - (array) $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - (array) $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - (array) $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * APCu prefix to use to cache found/not-found classes, if the extension is enabled. - * - * @param string|null $apcuPrefix - */ - public function setApcuPrefix($apcuPrefix) - { - $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; - } - - /** - * The APCu prefix in use, or null if APCu caching is not enabled. - * - * @return string|null - */ - public function getApcuPrefix() - { - return $this->apcuPrefix; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { - return false; - } - if (null !== $this->apcuPrefix) { - $file = apcu_fetch($this->apcuPrefix.$class, $hit); - if ($hit) { - return $file; - } - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if (false === $file && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if (null !== $this->apcuPrefix) { - apcu_add($this->apcuPrefix.$class, $file); - } - - if (false === $file) { - // Remember that this class does not exist. - $this->missingClasses[$class] = true; - } - - return $file; - } - - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - $subPath = $class; - while (false !== $lastPos = strrpos($subPath, '\\')) { - $subPath = substr($subPath, 0, $lastPos); - $search = $subPath . '\\'; - if (isset($this->prefixDirsPsr4[$search])) { - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); - foreach ($this->prefixDirsPsr4[$search] as $dir) { - if (file_exists($file = $dir . $pathEnd)) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - - return false; - } -} - -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - */ -function includeFile($file) -{ - include $file; -} diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE deleted file mode 100644 index f27399a..0000000 --- a/vendor/composer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - -Copyright (c) Nils Adermann, Jordi Boggiano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php deleted file mode 100644 index 7a91153..0000000 --- a/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,9 +0,0 @@ - array($baseDir . '/src'), -); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php deleted file mode 100644 index 89cbeab..0000000 --- a/vendor/composer/autoload_real.php +++ /dev/null @@ -1,52 +0,0 @@ -= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require_once __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInit04949a9e5947366cbbbccdd988cf75a6::getInitializer($loader)); - } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } - - $loader->register(true); - - return $loader; - } -} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php deleted file mode 100644 index 3012ef1..0000000 --- a/vendor/composer/autoload_static.php +++ /dev/null @@ -1,31 +0,0 @@ - - array ( - 'Bios2000\\' => 9, - ), - ); - - public static $prefixDirsPsr4 = array ( - 'Bios2000\\' => - array ( - 0 => __DIR__ . '/../..' . '/src', - ), - ); - - public static function getInitializer(ClassLoader $loader) - { - return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit04949a9e5947366cbbbccdd988cf75a6::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit04949a9e5947366cbbbccdd988cf75a6::$prefixDirsPsr4; - - }, null, ClassLoader::class); - } -} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json deleted file mode 100644 index fe51488..0000000 --- a/vendor/composer/installed.json +++ /dev/null @@ -1 +0,0 @@ -[]