Move PdfMaker to Services/ folder & update namespaces

This commit is contained in:
Benjamin Beganović 2020-07-22 14:30:55 +02:00
parent 4ffda243b9
commit 60a73fada3
29 changed files with 229 additions and 119 deletions

View File

@ -0,0 +1,23 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Services\PdfMaker\Designs;
class Bold
{
public function html()
{
return file_get_contents(
base_path('app/Services/PdfMaker/Designs/html/bold.html')
);
}
}

View File

@ -0,0 +1,23 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Services\PdfMaker\Designs;
class Business
{
public function html()
{
return file_get_contents(
base_path('app/Services/PdfMaker/Designs/html/business.html')
);
}
}

View File

@ -0,0 +1,23 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Services\PdfMaker\Designs;
class Clean
{
public function html()
{
return file_get_contents(
base_path('app/Services/PdfMaker/Designs/html/clean.html')
);
}
}

View File

@ -0,0 +1,23 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Services\PdfMaker\Designs;
class Creative
{
public function html()
{
return file_get_contents(
base_path('app/Services/PdfMaker/Designs/html/creative.html')
);
}
}

View File

@ -0,0 +1,23 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Services\PdfMaker\Designs;
class Elegant
{
public function html()
{
return file_get_contents(
base_path('app/Services/PdfMaker/Designs/html/elegant.html')
);
}
}

View File

@ -0,0 +1,23 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Services\PdfMaker\Designs;
class Hipster
{
public function html()
{
return file_get_contents(
base_path('app/Services/PdfMaker/Designs/html/hipster.html')
);
}
}

View File

@ -0,0 +1,23 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Services\PdfMaker\Designs;
class Modern
{
public function html()
{
return file_get_contents(
base_path('app/Services/PdfMaker/Designs/html/modern.html')
);
}
}

View File

@ -0,0 +1,23 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Services\PdfMaker\Designs;
class Plain
{
public function html()
{
return file_get_contents(
base_path('app/Services/PdfMaker/Designs/html/plain.html')
);
}
}

View File

@ -0,0 +1,23 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Services\PdfMaker\Designs;
class Playful
{
public function html()
{
return file_get_contents(
base_path('app/Services/PdfMaker/Designs/html/playful.html')
);
}
}

View File

@ -1,6 +1,16 @@
<?php
namespace Tests\Feature\PdfMaker;
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Services\PdfMaker;
class PdfMaker
{

View File

@ -1,6 +1,16 @@
<?php
namespace Tests\Feature\PdfMaker;
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Services\PdfMaker;
use DOMDocument;
use DOMXPath;

View File

@ -1,13 +0,0 @@
<?php
namespace Tests\Feature\PdfMaker;
class Bold
{
public function html()
{
return file_get_contents(
base_path('tests/Feature/PdfMaker/designs/bold.html')
);
}
}

View File

@ -1,13 +0,0 @@
<?php
namespace Tests\Feature\PdfMaker;
class Business
{
public function html()
{
return file_get_contents(
base_path('tests/Feature/PdfMaker/designs/business.html')
);
}
}

View File

@ -1,13 +0,0 @@
<?php
namespace Tests\Feature\PdfMaker;
class Clean
{
public function html()
{
return file_get_contents(
base_path('tests/Feature/PdfMaker/designs/clean.html')
);
}
}

View File

@ -1,13 +0,0 @@
<?php
namespace Tests\Feature\PdfMaker;
class Creative
{
public function html()
{
return file_get_contents(
base_path('tests/Feature/PdfMaker/designs/creative.html')
);
}
}

View File

@ -1,13 +0,0 @@
<?php
namespace Tests\Feature\PdfMaker;
class Elegant
{
public function html()
{
return file_get_contents(
base_path('tests/Feature/PdfMaker/designs/elegant.html')
);
}
}

View File

@ -1,13 +0,0 @@
<?php
namespace Tests\Feature\PdfMaker;
class Hipster
{
public function html()
{
return file_get_contents(
base_path('tests/Feature/PdfMaker/designs/hipster.html')
);
}
}

View File

@ -1,13 +0,0 @@
<?php
namespace Tests\Feature\PdfMaker;
class Modern
{
public function html()
{
return file_get_contents(
base_path('tests/Feature/PdfMaker/designs/modern.html')
);
}
}

View File

@ -1,13 +0,0 @@
<?php
namespace Tests\Feature\PdfMaker;
class Plain
{
public function html()
{
return file_get_contents(
base_path('tests/Feature/PdfMaker/designs/plain.html')
);
}
}

View File

@ -1,13 +0,0 @@
<?php
namespace Tests\Feature\PdfMaker;
class Playful
{
public function html()
{
return file_get_contents(
base_path('tests/Feature/PdfMaker/designs/playful.html')
);
}
}