-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to PHP 8.1
- Loading branch information
Showing
16 changed files
with
202 additions
and
321 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# These are supported funding model platforms | ||
|
||
github: byjg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Tests" type="PHPUnitRunConfigurationType" factoryName="PHPUnit"> | ||
<TestRunner configuration_file="$PROJECT_DIR$/phpunit.xml.dist" scope="XML" use_alternative_configuration_file="true" /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
<?xml version="1.0"?> | ||
<psalm | ||
errorLevel="3" | ||
errorLevel="4" | ||
resolveFromConfigFile="true" | ||
findUnusedBaselineEntry="true" | ||
findUnusedCode="false" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="https://getpsalm.org/schema/config" | ||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" | ||
> | ||
<projectFiles> | ||
<directory name="src" /> | ||
<directory name="tests" /> | ||
<ignoreFiles> | ||
<directory name="vendor" /> | ||
</ignoreFiles> | ||
</projectFiles> | ||
</psalm> | ||
</psalm> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
namespace ByJG\AnyDataset\Text\Definition; | ||
|
||
use InvalidArgumentException; | ||
|
||
/** | ||
* @package xmlnuke | ||
*/ | ||
class FixedTextDefinition | ||
{ | ||
/** @var string */ | ||
public string $fieldName; | ||
|
||
/** @var int */ | ||
public int $startPos; | ||
|
||
/** @var int */ | ||
public int $length; | ||
|
||
/** @var ?array */ | ||
public ?array $requiredValue; | ||
|
||
/** @var TextTypeEnum */ | ||
public TextTypeEnum $type; | ||
|
||
/** @var array|null */ | ||
public ?array $subTypes = []; | ||
|
||
/** | ||
* | ||
* @param string $fieldName | ||
* @param int $startPos | ||
* @param int $length | ||
* @param TextTypeEnum $type | ||
* @param ?array $requiredValue | ||
* @param array|null $subTypes | ||
*/ | ||
public function __construct(string $fieldName, int $startPos, int $length, TextTypeEnum $type = TextTypeEnum::STRING, ?array $requiredValue = null, array $subTypes = null) | ||
{ | ||
$this->fieldName = $fieldName; | ||
$this->startPos = $startPos; | ||
$this->length = $length; | ||
$this->type = $type; | ||
$this->requiredValue = $requiredValue; | ||
$this->subTypes = $subTypes; | ||
|
||
if ($this->type != TextTypeEnum::NUMBER && $this->type != TextTypeEnum::STRING) { | ||
throw new InvalidArgumentException("Type must be 'string' or 'number'"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace ByJG\AnyDataset\Text\Definition; | ||
|
||
enum TextTypeEnum | ||
{ | ||
case STRING; | ||
case NUMBER; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.