Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix windows compatibility - Change internals namespace
- Loading branch information
Showing
31 changed files
with
310 additions
and
164 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
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,12 @@ | ||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
indent_style: space | ||
indent_size: 4 | ||
end_of_line: lf | ||
|
||
[**.{php,md,xml,yml,json,dist}] | ||
charset = utf-8 | ||
trim_trailing_whitespace: true | ||
insert_final_newline = true |
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
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
5 changes: 2 additions & 3 deletions
5
.../Utils/Internal/BaseConverterSequence.php → ...Utils/Internals/BaseConverterSequence.php
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,30 @@ | ||
<?php | ||
namespace CfdiUtils\Internals; | ||
|
||
/** | ||
* NormalizeLineEndingsTrait contains a private function normalizeLineEndings | ||
* This help the implementer class to work with EOL | ||
* | ||
* NOTE: Changes will not be considering a bracking compatibility change since this utility is for internal usage only | ||
* @internal | ||
*/ | ||
trait NormalizeLineEndingsTrait | ||
{ | ||
/** | ||
* Changes EOL CRLF or LF to PHP_EOL. | ||
* This won't alter CR that are not at EOL. | ||
* This won't alter LFCR used in old Mac style | ||
* | ||
* @param string $content | ||
* @return string | ||
* @internal | ||
*/ | ||
private function normalizeLineEndings(string $content): string | ||
{ | ||
// move '\r\n' or '\n' to PHP_EOL | ||
// first substitution '\r\n' -> '\n' | ||
// second substitution '\n' -> PHP_EOL | ||
// remove any EOL at the EOF | ||
return rtrim(str_replace(["\r\n", "\n"], ["\n", PHP_EOL], $content), PHP_EOL); | ||
} | ||
} |
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,13 @@ | ||
# CfdiUtils\Internals | ||
|
||
Dear user of `CfdiUtils`: | ||
|
||
**This namespace is for project internal usage.** | ||
**Do not use any of the elements (classes, traits, etc) stored in this namespaces.** | ||
|
||
The elements on this namespace could change and it won't be considered a Breack Compatilibity Change. | ||
|
||
The elements on this namespace must never be exposed outside this library (by example, by return). | ||
|
||
The elements on this namespace have the `@internal` annotation, if you use an IDE or a code inspector | ||
you will be warned about it. |
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
7 changes: 4 additions & 3 deletions
7
...iUtils/Utils/Internal/ShellExecResult.php → src/CfdiUtils/Internals/ShellExecResult.php
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
5 changes: 2 additions & 3 deletions
5
...tils/Utils/Internal/ShellExecTemplate.php → ...CfdiUtils/Internals/ShellExecTemplate.php
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
8 changes: 3 additions & 5 deletions
8
...fdiUtils/Utils/Internal/TemporaryFile.php → src/CfdiUtils/Internals/TemporaryFile.php
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
Oops, something went wrong.