Skip to content

Commit

Permalink
issue #244 - remove use InvalidArgumentException statement from EnumT…
Browse files Browse the repository at this point in the history
…ype classes

comment Tests line
  • Loading branch information
mikaelcom committed Apr 2, 2021
1 parent 0a8b553 commit 80d7ca9
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 9 deletions.
5 changes: 5 additions & 0 deletions src/File/StructEnum.php
Expand Up @@ -35,6 +35,11 @@ protected function fillClassConstants(ConstantContainer $constants): void
}
}

protected function defineUseStatements(): self
{
return AbstractModelFile::defineUseStatements();
}

protected function getConstantAnnotationBlock(PhpConstant $constant): ?PhpAnnotationBlock
{
$block = new PhpAnnotationBlock([
Expand Down
2 changes: 1 addition & 1 deletion tests/File/AbstractFile.php
Expand Up @@ -53,7 +53,7 @@ protected function assertSameFileContent(string $valid, File $file, string $file
}

// uncomment next line to easily regenerate all valid files :)
file_put_contents(sprintf('%s%s.%s', self::getTestDirectory(), $valid, $fileExtension), str_replace($file->getGenerator()->getWsdl()->getName(), '__WSDL_URL__', file_get_contents($file->getFileName())));
// file_put_contents(sprintf('%s%s.%s', self::getTestDirectory(), $valid, $fileExtension), str_replace($file->getGenerator()->getWsdl()->getName(), '__WSDL_URL__', file_get_contents($file->getFileName())));

$validContent = file_get_contents(sprintf('%s%s.%s', self::getTestDirectory(), $valid, $fileExtension));
$validContent = str_replace('__WSDL_URL__', $file->getGenerator()->getWsdl()->getName(), $validContent);
Expand Down
1 change: 0 additions & 1 deletion tests/resources/generated/ValidApiAdultOption.php
Expand Up @@ -4,7 +4,6 @@

namespace EnumType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructEnumBase;

/**
Expand Down
1 change: 0 additions & 1 deletion tests/resources/generated/ValidApiDs_weblog_formats.php
Expand Up @@ -4,7 +4,6 @@

namespace EnumType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructEnumBase;

/**
Expand Down
1 change: 0 additions & 1 deletion tests/resources/generated/ValidApiHouseStageEnum.php
Expand Up @@ -4,7 +4,6 @@

namespace EnumType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructEnumBase;

/**
Expand Down
1 change: 0 additions & 1 deletion tests/resources/generated/ValidApiPhonebookSortOption.php
Expand Up @@ -4,7 +4,6 @@

namespace Std\Opt\EnumType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructEnumBase;

/**
Expand Down
Expand Up @@ -4,7 +4,6 @@

namespace EnumType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructEnumBase;

/**
Expand Down
1 change: 0 additions & 1 deletion tests/resources/generated/ValidApiSourceType.php
Expand Up @@ -4,7 +4,6 @@

namespace EnumType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructEnumBase;

/**
Expand Down
Expand Up @@ -4,7 +4,6 @@

namespace EnumType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructEnumBase;

/**
Expand Down
1 change: 0 additions & 1 deletion tests/resources/generated/ValidApiWebSearchOption.php
Expand Up @@ -4,7 +4,6 @@

namespace EnumType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructEnumBase;

/**
Expand Down

0 comments on commit 80d7ca9

Please sign in to comment.