Skip to content

Commit

Permalink
Fix styling changes
Browse files Browse the repository at this point in the history
  • Loading branch information
apaxio authored and github-actions[bot] committed Nov 13, 2023
1 parent 8c16121 commit 15e8428
Show file tree
Hide file tree
Showing 17 changed files with 415 additions and 157 deletions.
31 changes: 16 additions & 15 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,31 @@
declare(strict_types=1);

/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <[email protected]>
* Dariusz Rumiński <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <[email protected]>
* Dariusz Rumiński <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

$header = <<<'EOF'
This file is part of PHP CS Fixer.
This file is part of PHP CS Fixer.
(c) Fabien Potencier <[email protected]>
Dariusz Rumiński <[email protected]>
(c) Fabien Potencier <[email protected]>
Dariusz Rumiński <[email protected]>
This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
EOF;
This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
EOF;

$finder = (new PhpCsFixer\Finder())
->ignoreDotFiles(false)
->ignoreVCSIgnored(true)
->exclude(['dev-tools/phpstan', 'tests/Fixtures'])
->in(__DIR__);
->in(__DIR__)
;

return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
Expand Down
24 changes: 18 additions & 6 deletions test-temp.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
<?php

require('vendor/autoload.php');
declare(strict_types=1);

/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <[email protected]>
* Dariusz Rumiński <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

require 'vendor/autoload.php';

use Axiostudio\FatturaElettronica\FatturaElettronica;

Expand All @@ -21,7 +33,7 @@
$header = [
$datiTrasmissione,
$cedentePrestatore,
$cessionarioCommittente
$cessionarioCommittente,
];

$datiGeneraliDocumento = ['123', '2021-01-01', '345.22'];
Expand All @@ -34,7 +46,7 @@

$body = [
$datiGenerali,
$datiDatiPagamento
$datiDatiPagamento,
];

$dettaglioLinee = [
Expand All @@ -54,9 +66,9 @@

var_dump($datiXml);

/*
/*
$data = [
'FatturaElettronicaBody' => [
'DatiGenerali' => [
'DatiGeneraliDocumento' => [
Expand Down Expand Up @@ -101,4 +113,4 @@
]
]
];
*/
*/
27 changes: 22 additions & 5 deletions tests/AnagraficaTest.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
<?php

declare(strict_types=1);

/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <[email protected]>
* Dariusz Rumiński <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

namespace Axiostudio\FatturaElettronica\Tests;

use Axiostudio\FatturaElettronica\Models\Anagrafica;
use PHPUnit\Framework\TestCase;

class AnagraficaTest extends TestCase
/**
* @internal
*
* @coversNothing
*/
final class AnagraficaTest extends TestCase
{
public function testConstructor(): void
{
Expand All @@ -15,9 +32,9 @@ public function testConstructor(): void

$anagrafica = new Anagrafica($denominazione, $nome, $cognome);

$this->assertInstanceOf(Anagrafica::class, $anagrafica);
$this->assertEquals($denominazione, $anagrafica->Denominazione);
$this->assertEquals($nome, $anagrafica->Nome);
$this->assertEquals($cognome, $anagrafica->Cognome);
self::assertInstanceOf(Anagrafica::class, $anagrafica);
self::assertSame($denominazione, $anagrafica->Denominazione);
self::assertSame($nome, $anagrafica->Nome);
self::assertSame($cognome, $anagrafica->Cognome);
}
}
34 changes: 25 additions & 9 deletions tests/CedentePrestatoreTest.php
Original file line number Diff line number Diff line change
@@ -1,30 +1,46 @@
<?php

declare(strict_types=1);

/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <[email protected]>
* Dariusz Rumiński <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

namespace Axiostudio\FatturaElettronica\Tests;

use PHPUnit\Framework\TestCase;
use Axiostudio\FatturaElettronica\Models\Sede;
use Axiostudio\FatturaElettronica\Models\DatiAnagrafici;
use Axiostudio\FatturaElettronica\Models\CedentePrestatore;
use Axiostudio\FatturaElettronica\Models\DatiAnagrafici;
use Axiostudio\FatturaElettronica\Models\Sede;
use PHPUnit\Framework\TestCase;

class CedentePrestatoreTest extends TestCase
/**
* @internal
*
* @coversNothing
*/
final class CedentePrestatoreTest extends TestCase
{
public function testConstructor(): void
{

$DatiAnagrafici = ['Company Ltd', '0123456789'];
$Sede = [
'Via Roma, 1',
'00100',
'Roma',
'RM',
'IT'
'IT',
];

$cedentePrestatore = new CedentePrestatore($DatiAnagrafici, $Sede);

$this->assertInstanceOf(CedentePrestatore::class, $cedentePrestatore);
$this->assertInstanceOf(DatiAnagrafici::class, $cedentePrestatore->DatiAnagrafici);
$this->assertInstanceOf(Sede::class, $cedentePrestatore->Sede);
self::assertInstanceOf(CedentePrestatore::class, $cedentePrestatore);
self::assertInstanceOf(DatiAnagrafici::class, $cedentePrestatore->DatiAnagrafici);
self::assertInstanceOf(Sede::class, $cedentePrestatore->Sede);
}
}
36 changes: 26 additions & 10 deletions tests/CessionarioCommittente.php
Original file line number Diff line number Diff line change
@@ -1,30 +1,46 @@
<?php

declare(strict_types=1);

/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <[email protected]>
* Dariusz Rumiński <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

namespace Axiostudio\FatturaElettronica\Tests;

use PHPUnit\Framework\TestCase;
use Axiostudio\FatturaElettronica\Models\Sede;
use Axiostudio\FatturaElettronica\Models\DatiAnagrafici;
use Axiostudio\FatturaElettronica\Models\CessionarioCommittente;
use Axiostudio\FatturaElettronica\Models\DatiAnagrafici;
use Axiostudio\FatturaElettronica\Models\Sede;
use PHPUnit\Framework\TestCase;

class CessionarioCommittenteTest extends TestCase
/**
* @internal
*
* @coversNothing
*/
final class CessionarioCommittente extends TestCase
{
public function testConstructor(): void
{

$DatiAnagrafici = ['Company Ltd', '0123456789'];
$Sede = [
'Via Roma, 1',
'00100',
'Roma',
'RM',
'IT'
'IT',
];

$cedentePrestatore = new CessionarioCommittente($DatiAnagrafici, $Sede);
$cedentePrestatore = new self($DatiAnagrafici, $Sede);

$this->assertInstanceOf(CessionarioCommittente::class, $cedentePrestatore);
$this->assertInstanceOf(DatiAnagrafici::class, $cedentePrestatore->DatiAnagrafici);
$this->assertInstanceOf(Sede::class, $cedentePrestatore->Sede);
self::assertInstanceOf(self::class, $cedentePrestatore);
self::assertInstanceOf(DatiAnagrafici::class, $cedentePrestatore->DatiAnagrafici);
self::assertInstanceOf(Sede::class, $cedentePrestatore->Sede);
}
}
31 changes: 24 additions & 7 deletions tests/DatiAnagraficiTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
<?php

declare(strict_types=1);

/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <[email protected]>
* Dariusz Rumiński <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

namespace Axiostudio\FatturaElettronica\Tests;

use Axiostudio\FatturaElettronica\Models\Anagrafica;
use Axiostudio\FatturaElettronica\Models\DatiAnagrafici;
use Axiostudio\FatturaElettronica\Models\Id;
use Axiostudio\FatturaElettronica\Models\Anagrafica;
use PHPUnit\Framework\TestCase;

class DatiAnagraficiTest extends TestCase
/**
* @internal
*
* @coversNothing
*/
final class DatiAnagraficiTest extends TestCase
{
public function testConstructor(): void
{
Expand All @@ -19,10 +36,10 @@ public function testConstructor(): void

$datiAnagrafici = new DatiAnagrafici($id, $anagrafica, $codiceFiscale, $regimeFiscale);

$this->assertInstanceOf(DatiAnagrafici::class, $datiAnagrafici);
$this->assertInstanceOf(Id::class, $datiAnagrafici->IdFiscaleIVA);
$this->assertInstanceOf(Anagrafica::class, $datiAnagrafici->Anagrafica);
$this->assertEquals($codiceFiscale, $datiAnagrafici->CodiceFiscale);
$this->assertEquals($regimeFiscale, $datiAnagrafici->RegimeFiscale);
self::assertInstanceOf(DatiAnagrafici::class, $datiAnagrafici);
self::assertInstanceOf(Id::class, $datiAnagrafici->IdFiscaleIVA);
self::assertInstanceOf(Anagrafica::class, $datiAnagrafici->Anagrafica);
self::assertSame($codiceFiscale, $datiAnagrafici->CodiceFiscale);
self::assertSame($regimeFiscale, $datiAnagrafici->RegimeFiscale);
}
}
25 changes: 21 additions & 4 deletions tests/DatiBeniservizi.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,34 @@
<?php

declare(strict_types=1);

/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <[email protected]>
* Dariusz Rumiński <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

namespace Axiostudio\FatturaElettronica\Tests;

use Axiostudio\FatturaElettronica\Models\DatiBeniServizi;
use PHPUnit\Framework\TestCase;

class DatiBeniServiziTest extends TestCase
/**
* @internal
*
* @coversNothing
*/
final class DatiBeniservizi extends TestCase
{
public function testConstructor(): void
{
$datiBeniServizi = new DatiBeniServizi();
$datiBeniServizi = new self();

$this->assertInstanceOf(DatiBeniServizi::class, $datiBeniServizi);
$this->assertNull($datiBeniServizi->XmlDatiBeniServizi);
self::assertInstanceOf(self::class, $datiBeniServizi);
self::assertNull($datiBeniServizi->XmlDatiBeniServizi);
}
}
Loading

0 comments on commit 15e8428

Please sign in to comment.