Skip to content

Commit 12138f5

Browse files
committed
Move marker element removal to end
1 parent 03bfcae commit 12138f5

File tree

11 files changed

+65
-71
lines changed

11 files changed

+65
-71
lines changed

.github/workflows/CONTRIBUTING.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
composer-options: "--no-scripts"
5656

5757
- name: Run Code Standard Test
58-
run: composer run-script check-code-standards
58+
run: composer run-script code-standards-test
5959

6060
php-static-analysis-test:
6161
needs:
@@ -71,7 +71,7 @@ jobs:
7171
- uses: php-actions/composer@v6
7272

7373
- name: PHPStan Test
74-
run: composer run-script analyze
74+
run: composer run-script static-analysis-test
7575

7676
php-unit-test:
7777
name: "PHP ${{ matrix.php-version }} Unit Tests"

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ All releases must adhere to [SemVer 2](https://semver.org/) naming convention an
1111
## PHPMarkup [Unreleased]
1212
Released: TBA. Notable changes:
1313

14+
## PHPMarkup 4.2.5
15+
Released: 2021-10-08. Notable changes:
16+
* Changed: Marker attribute removal to end routine.
17+
1418
## PHPMarkup 4.2.5
1519
Released: 2021-10-08. Notable changes:
1620
* Fixed: QA tests.

CODING_STANDARDS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# PHPMarkup coding standards
22

3+
## Coding Guidelines
4+
5+
* PHPMarkup is built to adhere to the Unix philosophy.
6+
* PHPMarkup is designed for use in other applications; not to be a monolithic solution.
7+
* PHPMarkup use PHPDocs blocks.
8+
* Classes use S.O.L.I.D. Design Principle.
9+
10+
## Style Guidelines
11+
312
1. Variable names must be meaningful. One letter variable names must be avoided,
413
except for places where the variable has no real meaning or a trivial
514
meaning (e.g. `for (i=0; i<100; i++) ...`).

CONTRIBUTING.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,44 @@
22

33
First off, thanks for taking the time to contribute!
44

5+
## Workflow
56
For local package development use [Docker](https://www.docker.com/products/docker-desktop):
67

7-
**Step 1**) Pull code and build Test container
8+
### Step 1
9+
* Pull code and build Test container.
10+
* Fork the project.
11+
812
```
913
git clone https://github.com/Ouxsoft/phpmarkup.git
1014
cd phpmarkup
1115
docker build --target test --tag phpmarkup:latest -f Dockerfile .
1216
docker run -it --mount type=bind,source="$(pwd)"/,target=/application/ phpmarkup:latest composer install
1317
```
1418

15-
**Step 2**) Make code changes.
19+
### Step 2
20+
* Make your code changes using CODING_STANDARDS.md.
21+
* Run Automated QA using local volume.
22+
* Test your changes using `composer test`.
23+
* Update or add tests to avoid the change breaking in future releases.
1624

17-
**Step 3**) Run Automated QA using local volume
1825
```
1926
docker run -it --mount type=bind,source="$(pwd)"/,target=/application/ phpmarkup:latest composer qa
2027
```
2128

22-
**Step 4**) Rebuild Docs
29+
### Step 4
30+
* Run `composer update` to update composer packages and commit new `composer.lock` file.
31+
* Rebuild Docs
32+
2333
```
2434
docker build --target docs --tag phpmarkup:docs-latest -f Dockerfile .
2535
docker run -it --mount type=bind,source="$(pwd)"/,target=/app/ phpmarkup:docs-latest bash -c "cd /app/docs && doxygen Doxyfile && doxyphp2sphinx Ouxsoft::PHPMarkup"
2636
```
2737

28-
**Step 5**) Submit PR
38+
### Step 5
39+
* Submit a [pull request](https://github.com/ouxsoft/phpmarkup-dev/pulls).
40+
41+
## Reporting issues
42+
43+
Please report issue and open new tickets:
44+
45+
* [Report Issues](https://github.com/ouxsoft/livingMarkup/issues)

composer.json

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,15 @@
4444
"scripts": {
4545
"qc" : [
4646
"@fix-code-standards",
47-
"@check-code-standards",
48-
"@analyze",
49-
"@unit-test",
50-
"@feature-test",
51-
"@coverage-test",
52-
"@benchmark-test"
47+
"@test"
5348
],
5449
"test": [
5550
"@unit-test",
5651
"@feature-test",
5752
"@coverage-test",
58-
"@benchmark-test"
53+
"@benchmark-test",
54+
"@static-analysis-test",
55+
"@code-standards-test"
5956
],
6057
"unit-test": [
6158
"./vendor/bin/phpunit --no-coverage --testsuite unit"
@@ -69,14 +66,14 @@
6966
"benchmark-test" : [
7067
"./vendor/bin/phpbench run tests/src/Benchmark --report=env --progress=dots"
7168
],
72-
"analyze" : [
69+
"static-analysis-test" : [
7370
"./vendor/bin/phpstan analyse -c phpstan.neon"
7471
],
7572
"fix-code-standards": [
7673
"php-cs-fixer fix --using-cache=no src/",
7774
"php-cs-fixer fix --using-cache=no tests/"
7875
],
79-
"check-code-standards": [
76+
"code-standards-test": [
8077
"php-cs-fixer fix --dry-run --diff --verbose --using-cache=no src/ ",
8178
"php-cs-fixer fix --dry-run --diff --verbose --using-cache=no tests/"
8279
]

docs/api/argumentarray.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ ArgumentArray
7373
:param string $value:
7474
Default: ``null``
7575
:param ?string $type:
76-
Default: ``NULL``
76+
Default: ``null``
7777
:returns: void
7878

7979
.. php:method:: public valid () -> bool

docs/api/contract/engineinterface.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,13 @@ EngineInterface
8080
:param DOMElement $element:
8181
:param string $new_xml:
8282

83+
.. php:method:: public sanitizeXml (string $xml) -> string
84+
85+
:param string $xml:
86+
:returns: string --
87+
88+
.. php:method:: public stripAttributes (array $attributes)
89+
90+
:param array $attributes:
91+
:returns: void
92+

docs/api/engine.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,17 @@ Engine
108108

109109
.. php:method:: public sanitizeXml (string $xml) -> string
110110
111-
Remove args and INDEX_ATTRIBUTE
111+
Remove args
112112

113113
:param string $xml:
114114
:returns: string --
115115

116-
.. php:method:: public stripAttributes (string $xml, array $attributes) -> string
116+
.. php:method:: public stripAttributes (array $attributes)
117117
118118
Strip attributes
119119

120-
:param string $xml:
121120
:param array $attributes:
122-
:returns: string --
121+
:returns: void
123122

124123
.. php:method:: private instantiateElement (DOMElement $element, string $class_name) -> bool
125124

src/Contract/EngineInterface.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,10 @@ public function renderElement(string $element_id): bool;
7878
public function sanitizeXml(string $xml): string;
7979

8080
/**
81-
* @param string $xml
8281
* @param array $attributes
83-
* @return string
82+
* @return void
8483
*/
85-
public function stripAttributes(string $xml, array $attributes): string;
84+
public function stripAttributes(array $attributes): void;
8685

8786
/**
8887
* @param string $element_id

0 commit comments

Comments
 (0)