Skip to content

Commit

Permalink
Add psalm-immutable
Browse files Browse the repository at this point in the history
  • Loading branch information
Chemaclass committed May 28, 2020
1 parent ee290ce commit e85b204
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/EdifactParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use EdifactParser\Segments\SegmentFactory;
use EdifactParser\Segments\SegmentFactoryInterface;

/** @psalmphp-immutable */
final class EdifactParser
{
private SegmentFactoryInterface $segmentFactory;
Expand Down
1 change: 1 addition & 0 deletions src/Exception/InvalidFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Exception;
use function json_encode;

/** @psalmphp-immutable */
final class InvalidFile extends Exception
{
public static function withErrors(array $errors): self
Expand Down
1 change: 1 addition & 0 deletions src/SegmentedValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use EdifactParser\Segments\SegmentFactoryInterface;
use EdifactParser\Segments\SegmentInterface;

/** @psalmphp-immutable */
final class SegmentedValues
{
/** @psalm-var list<SegmentInterface> */
Expand Down
1 change: 1 addition & 0 deletions src/Segments/BGMBeginningOfMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace EdifactParser\Segments;

/** @psalmphp-immutable */
final class BGMBeginningOfMessage implements SegmentInterface
{
private array $rawValues;
Expand Down
1 change: 1 addition & 0 deletions src/Segments/CNTControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace EdifactParser\Segments;

/** @psalmphp-immutable */
final class CNTControl implements SegmentInterface
{
private array $rawValues;
Expand Down
1 change: 1 addition & 0 deletions src/Segments/DTMDateTimePeriod.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace EdifactParser\Segments;

/** @psalmphp-immutable */
final class DTMDateTimePeriod implements SegmentInterface
{
private array $rawValues;
Expand Down
1 change: 1 addition & 0 deletions src/Segments/MEADimensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace EdifactParser\Segments;

/** @psalmphp-immutable */
final class MEADimensions implements SegmentInterface
{
private array $rawValues;
Expand Down
1 change: 1 addition & 0 deletions src/Segments/NADNameAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace EdifactParser\Segments;

/** @psalmphp-immutable */
final class NADNameAddress implements SegmentInterface
{
private array $rawValues;
Expand Down
1 change: 1 addition & 0 deletions src/Segments/PCIPackageId.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace EdifactParser\Segments;

/** @psalmphp-immutable */
final class PCIPackageId implements SegmentInterface
{
private array $rawValues;
Expand Down
1 change: 1 addition & 0 deletions src/Segments/SegmentFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace EdifactParser\Segments;

/** @psalmphp-immutable */
final class SegmentFactory implements SegmentFactoryInterface
{
public function segmentFromArray(array $rawArray): SegmentInterface
Expand Down
1 change: 1 addition & 0 deletions src/Segments/UNHMessageHeader.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace EdifactParser\Segments;

/** @psalmphp-immutable */
final class UNHMessageHeader implements SegmentInterface
{
private array $rawValues;
Expand Down
1 change: 1 addition & 0 deletions src/Segments/UNTMessageFooter.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace EdifactParser\Segments;

/** @psalmphp-immutable */
final class UNTMessageFooter implements SegmentInterface
{
private array $rawValues;
Expand Down
1 change: 1 addition & 0 deletions src/Segments/UnknownSegment.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace EdifactParser\Segments;

/** @psalmphp-immutable */
final class UnknownSegment implements SegmentInterface
{
private array $rawValues;
Expand Down
1 change: 1 addition & 0 deletions src/TransactionMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use EdifactParser\Segments\SegmentInterface;

/** @psalmphp-immutable */
final class TransactionMessage
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/TransactionResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/**
* A transactionResult is a list of transactionMessages.
*
* @psalmphp-immutable
*/
final class TransactionResult
{
Expand Down

0 comments on commit e85b204

Please sign in to comment.