From 8041b26bfe9f34acfcec9e4fd0c2c0b190535709 Mon Sep 17 00:00:00 2001 From: Shawn Meyer Date: Thu, 12 May 2016 21:36:31 -0400 Subject: [PATCH 1/4] Update README.md fixed typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 552f5b7..29cd9bb 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ If a value can not be converted you should return the following *falsy* value fo There are a few special cases: -1. If an `array` is passed as *input* to `convert_to_string()`, it should a string representation of the elements, in order, as a comma separated list. For example, an input of `[1, 2, 3]` should return `1, 2, 3`, an input of `[1]` should return `1`. +1. If an `array` is passed as *input* to `convert_to_string()`, it should be a string representation of the elements, in order, as a comma separated list. For example, an input of `[1, 2, 3]` should return `1, 2, 3`, an input of `[1]` should return `1`. 2. If any of the *falsy* values above or the string `null` is passed as *input* to `convert_to_null()`, it should return `null`. Otherwise, it should return the original *input*. ## Just getting started? From 86cb490819b9f299520eadb1f8b86b68844ec0e9 Mon Sep 17 00:00:00 2001 From: srbm Date: Thu, 19 May 2016 18:11:55 -0400 Subject: [PATCH 2/4] Good start to challenge, still failing 7 tests --- src/data_types.php | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/data_types.php diff --git a/src/data_types.php b/src/data_types.php new file mode 100644 index 0000000..4d20648 --- /dev/null +++ b/src/data_types.php @@ -0,0 +1,54 @@ + Date: Thu, 19 May 2016 21:47:07 -0400 Subject: [PATCH 3/4] Passed all tests, not very elegant --- src/data_types.php | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/src/data_types.php b/src/data_types.php index 4d20648..068c3bc 100644 --- a/src/data_types.php +++ b/src/data_types.php @@ -1,13 +1,8 @@ Date: Thu, 19 May 2016 21:59:18 -0400 Subject: [PATCH 4/4] fixed typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 552f5b7..29cd9bb 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ If a value can not be converted you should return the following *falsy* value fo There are a few special cases: -1. If an `array` is passed as *input* to `convert_to_string()`, it should a string representation of the elements, in order, as a comma separated list. For example, an input of `[1, 2, 3]` should return `1, 2, 3`, an input of `[1]` should return `1`. +1. If an `array` is passed as *input* to `convert_to_string()`, it should be a string representation of the elements, in order, as a comma separated list. For example, an input of `[1, 2, 3]` should return `1, 2, 3`, an input of `[1]` should return `1`. 2. If any of the *falsy* values above or the string `null` is passed as *input* to `convert_to_null()`, it should return `null`. Otherwise, it should return the original *input*. ## Just getting started?