Skip to content

Commit

Permalink
Revert "Fix styling changes"
Browse files Browse the repository at this point in the history
This reverts commit 15e8428.
  • Loading branch information
Andrea Pollastri committed Nov 13, 2023
1 parent e207102 commit ebbed0a
Show file tree
Hide file tree
Showing 17 changed files with 157 additions and 415 deletions.
31 changes: 15 additions & 16 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,30 @@
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: 6 additions & 18 deletions test-temp.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
<?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';
require('vendor/autoload.php');

use Axiostudio\FatturaElettronica\FatturaElettronica;

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

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

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

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

var_dump($datiXml);

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

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

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

self::assertInstanceOf(Anagrafica::class, $anagrafica);
self::assertSame($denominazione, $anagrafica->Denominazione);
self::assertSame($nome, $anagrafica->Nome);
self::assertSame($cognome, $anagrafica->Cognome);
$this->assertInstanceOf(Anagrafica::class, $anagrafica);
$this->assertEquals($denominazione, $anagrafica->Denominazione);
$this->assertEquals($nome, $anagrafica->Nome);
$this->assertEquals($cognome, $anagrafica->Cognome);
}
}
34 changes: 9 additions & 25 deletions tests/CedentePrestatoreTest.php
Original file line number Diff line number Diff line change
@@ -1,46 +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\CedentePrestatore;
use Axiostudio\FatturaElettronica\Models\DatiAnagrafici;
use Axiostudio\FatturaElettronica\Models\Sede;
use PHPUnit\Framework\TestCase;
use Axiostudio\FatturaElettronica\Models\Sede;
use Axiostudio\FatturaElettronica\Models\DatiAnagrafici;
use Axiostudio\FatturaElettronica\Models\CedentePrestatore;

/**
* @internal
*
* @coversNothing
*/
final class CedentePrestatoreTest extends TestCase
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);

self::assertInstanceOf(CedentePrestatore::class, $cedentePrestatore);
self::assertInstanceOf(DatiAnagrafici::class, $cedentePrestatore->DatiAnagrafici);
self::assertInstanceOf(Sede::class, $cedentePrestatore->Sede);
$this->assertInstanceOf(CedentePrestatore::class, $cedentePrestatore);
$this->assertInstanceOf(DatiAnagrafici::class, $cedentePrestatore->DatiAnagrafici);
$this->assertInstanceOf(Sede::class, $cedentePrestatore->Sede);
}
}
36 changes: 10 additions & 26 deletions tests/CessionarioCommittente.php
Original file line number Diff line number Diff line change
@@ -1,46 +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\CessionarioCommittente;
use Axiostudio\FatturaElettronica\Models\DatiAnagrafici;
use Axiostudio\FatturaElettronica\Models\Sede;
use PHPUnit\Framework\TestCase;
use Axiostudio\FatturaElettronica\Models\Sede;
use Axiostudio\FatturaElettronica\Models\DatiAnagrafici;
use Axiostudio\FatturaElettronica\Models\CessionarioCommittente;

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

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

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

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

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

$datiAnagrafici = new DatiAnagrafici($id, $anagrafica, $codiceFiscale, $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);
$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);
}
}
25 changes: 4 additions & 21 deletions tests/DatiBeniservizi.php
Original file line number Diff line number Diff line change
@@ -1,34 +1,17 @@
<?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;

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

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

0 comments on commit ebbed0a

Please sign in to comment.