From eec75ce7dbc24967e4639475197371782c10aa35 Mon Sep 17 00:00:00 2001 From: hxtree Date: Sun, 2 Jan 2022 02:06:12 -0600 Subject: [PATCH] Add null check for empty values --- CODING_STANDARDS.md | 2 ++ CONTRIBUTING.md | 2 +- tests/src/Unit/Element/AbstractElementTest.php | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CODING_STANDARDS.md b/CODING_STANDARDS.md index 0d495d2..95ee73e 100644 --- a/CODING_STANDARDS.md +++ b/CODING_STANDARDS.md @@ -100,3 +100,5 @@ ``` Rule inherited from [PHP](https://github.com/php/php-src/edit/master/CODING_STANDARDS.md). + +5. All code must adhere to automated coding style checks. \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fef23ca..ff3e1a8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,7 +23,7 @@ docker run -it --mount type=bind,source="$(pwd)"/,target=/application/ phpmarkup * Update or add tests to avoid the change breaking in future releases. ``` -docker run -it --mount type=bind,source="$(pwd)"/,target=/application/ phpmarkup:latest composer qa +docker run -it --mount type=bind,source="$(pwd)"/,target=/application/ phpmarkup:latest composer qc ``` ### Step 4 diff --git a/tests/src/Unit/Element/AbstractElementTest.php b/tests/src/Unit/Element/AbstractElementTest.php index 8db9454..dffb621 100644 --- a/tests/src/Unit/Element/AbstractElementTest.php +++ b/tests/src/Unit/Element/AbstractElementTest.php @@ -46,6 +46,8 @@ public function testGetArgByName() { $this->element->args['test'] = 'pass'; $this->assertEquals('pass', $this->element->getArgByName('test')); + + $this->assertEquals(null, $this->element->getArgByName('doesntexist')); } /**