Browse Source

Initial commit: some Go, some PHP.

Frederic G. MARAND 4 years ago
commit
52853e2e06
81 changed files with 3202 additions and 0 deletions
  1. 2 0
      .gitignore
  2. 2 0
      go/.idea/.gitignore
  3. 1 0
      go/.idea/.name
  4. 18 0
      go/.idea/codeStyles/Project.xml
  5. 5 0
      go/.idea/codeStyles/codeStyleConfig.xml
  6. 8 0
      go/.idea/codewars.iml
  7. 8 0
      go/.idea/go.iml
  8. 6 0
      go/.idea/misc.xml
  9. 8 0
      go/.idea/modules.xml
  10. 11 0
      go/.idea/runConfigurations/k4_strings_mix.xml
  11. 11 0
      go/.idea/runConfigurations/k5_maximum_subarray_sum.xml
  12. 13 0
      go/.idea/runConfigurations/k6_are_they_the_same.xml
  13. 15 0
      go/.idea/runConfigurations/k6_convert_string_to_camel_case.xml
  14. 11 0
      go/.idea/runConfigurations/k7_a_rule_of_divisibility_by_7.xml
  15. 11 0
      go/.idea/runConfigurations/k7_alphabetical_addition.xml
  16. 11 0
      go/.idea/runConfigurations/k7_complementary_DNA.xml
  17. 11 0
      go/.idea/runConfigurations/k7_maximum_multiple.xml
  18. 11 0
      go/.idea/runConfigurations/k7_square_strings_1.xml
  19. 11 0
      go/.idea/runConfigurations/k7_strong_N.xml
  20. 11 0
      go/.idea/runConfigurations/k7_the_parperfold_sequence.xml
  21. 11 0
      go/.idea/runConfigurations/k7_zombie_shootout.xml
  22. 6 0
      go/.idea/vcs.xml
  23. 9 0
      go/go.mod
  24. 29 0
      go/go.sum
  25. 142 0
      go/kyu4/strings_mix/k.go
  26. 24 0
      go/kyu4/strings_mix/k_test.go
  27. 13 0
      go/kyu4/strings_mix/strings_mix_suite_test.go
  28. 50 0
      go/kyu5/maximum_subarray_sum/k.go
  29. 21 0
      go/kyu5/maximum_subarray_sum/k_test.go
  30. 13 0
      go/kyu5/maximum_subarray_sum/maximum_subarray_sum_suite_test.go
  31. 23 0
      go/kyu6/aretheythesame/aretheythesame.go
  32. 51 0
      go/kyu6/aretheythesame/aretheythesame_test.go
  33. 42 0
      go/kyu6/convertstringtocamelcase/convertstringtocamelcase.go
  34. 26 0
      go/kyu6/convertstringtocamelcase/convertstringtocamelcase_test.go
  35. 13 0
      go/kyu7/a_rule_of_divisibility_by_7/a_rule_of_divisibility_by_7_suite_test.go
  36. 16 0
      go/kyu7/a_rule_of_divisibility_by_7/k.go
  37. 23 0
      go/kyu7/a_rule_of_divisibility_by_7/k_test.go
  38. 13 0
      go/kyu7/alphabetical_addition/alphabetical_addition_suite_test.go
  39. 11 0
      go/kyu7/alphabetical_addition/kata.go
  40. 16 0
      go/kyu7/alphabetical_addition/kata_test.go
  41. 10 0
      go/kyu7/complementary_dna/k.go
  42. 13 0
      go/kyu7/complementary_dna/k7_complementary_dna_suite_test.go
  43. 17 0
      go/kyu7/complementary_dna/k_test.go
  44. 5 0
      go/kyu7/maximum_multiple/k.go
  45. 15 0
      go/kyu7/maximum_multiple/k_test.go
  46. 13 0
      go/kyu7/maximum_multiple/maximum_multiple_suite_test.go
  47. 14 0
      go/kyu7/shortest_word/k.go
  48. 13 0
      go/kyu7/shortest_word/k_test.go
  49. 13 0
      go/kyu7/shortest_word/shortest_word_suite_test.go
  50. 39 0
      go/kyu7/square_strings_1/k.go
  51. 31 0
      go/kyu7/square_strings_1/k_test.go
  52. 13 0
      go/kyu7/square_strings_1/square_strings_1_suite_test.go
  53. 22 0
      go/kyu7/strongn/k.go
  54. 23 0
      go/kyu7/strongn/k_test.go
  55. 13 0
      go/kyu7/strongn/strongn_suite_test.go
  56. 17 0
      go/kyu7/sum_odd_numbers/k.go
  57. 19 0
      go/kyu7/sum_odd_numbers/k_test.go
  58. 22 0
      go/kyu7/the_paperfold_sequence/k.go
  59. 22 0
      go/kyu7/the_paperfold_sequence/k_test.go
  60. 13 0
      go/kyu7/the_paperfold_sequence/the_paperfold_sequence_suite_test.go
  61. 30 0
      go/kyu7/zombie_shootout/k.go
  62. 14 0
      go/kyu7/zombie_shootout/k_test.go
  63. 13 0
      go/kyu7/zombie_shootout/zombie_shootout_suite_test.go
  64. 1 0
      php/.idea/.name
  65. 10 0
      php/.idea/CodeWars PHP.iml
  66. 14 0
      php/.idea/deployment.xml
  67. 6 0
      php/.idea/misc.xml
  68. 8 0
      php/.idea/modules.xml
  69. 14 0
      php/.idea/php-test-framework.xml
  70. 43 0
      php/.idea/php.xml
  71. 6 0
      php/.idea/runConfigurations/7_Count_the_divisors.xml
  72. 6 0
      php/.idea/runConfigurations/8_Are_the_the_same.xml
  73. 6 0
      php/.idea/symfony2.xml
  74. 6 0
      php/.idea/vcs.xml
  75. 244 0
      php/.idea/workspace.xml
  76. 16 0
      php/composer.json
  77. 1540 0
      php/composer.lock
  78. 80 0
      php/kyu6/aretheythesame/Test.php
  79. 17 0
      php/kyu6/aretheythesame/aretheythesame.php
  80. 23 0
      php/kyu7/counthedivisors/TestDivisorsCase.php
  81. 21 0
      php/kyu7/counthedivisors/countthedivisors.php

+ 2 - 0
.gitignore

@@ -0,0 +1,2 @@
+node_modules/
+vendor/

+ 2 - 0
go/.idea/.gitignore

@@ -0,0 +1,2 @@
+# Default ignored files
+/workspace.xml

+ 1 - 0
go/.idea/.name

@@ -0,0 +1 @@
+CodeWars Go

+ 18 - 0
go/.idea/codeStyles/Project.xml

@@ -0,0 +1,18 @@
+<component name="ProjectCodeStyleConfiguration">
+  <code_scheme name="Project" version="173">
+    <option name="SOFT_MARGINS" value="80" />
+    <HTMLCodeStyleSettings>
+      <option name="HTML_KEEP_BLANK_LINES" value="1" />
+      <option name="HTML_DO_NOT_INDENT_CHILDREN_OF" value="html" />
+      <option name="HTML_ENFORCE_QUOTES" value="true" />
+    </HTMLCodeStyleSettings>
+    <codeStyleSettings language="HTML">
+      <option name="WRAP_ON_TYPING" value="1" />
+      <indentOptions>
+        <option name="INDENT_SIZE" value="2" />
+        <option name="CONTINUATION_INDENT_SIZE" value="2" />
+        <option name="TAB_SIZE" value="2" />
+      </indentOptions>
+    </codeStyleSettings>
+  </code_scheme>
+</component>

+ 5 - 0
go/.idea/codeStyles/codeStyleConfig.xml

@@ -0,0 +1,5 @@
+<component name="ProjectCodeStyleConfiguration">
+  <state>
+    <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
+  </state>
+</component>

+ 8 - 0
go/.idea/codewars.iml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 8 - 0
go/.idea/go.iml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 6 - 0
go/.idea/misc.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="JavaScriptSettings">
+    <option name="languageLevel" value="ES6" />
+  </component>
+</project>

+ 8 - 0
go/.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/codewars.iml" filepath="$PROJECT_DIR$/.idea/codewars.iml" />
+    </modules>
+  </component>
+</project>

+ 11 - 0
go/.idea/runConfigurations/k4_strings_mix.xml

@@ -0,0 +1,11 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="k4 strings mix" type="GoTestRunConfiguration" factoryName="Go Test">
+    <module name="codewars" />
+    <working_directory value="$PROJECT_DIR$/" />
+    <go_parameters value="-i" />
+    <framework value="gotest" />
+    <kind value="PACKAGE" />
+    <package value="code.osinet.fr/fgm/codewars/kyu4/strings_mix" />
+    <method v="2" />
+  </configuration>
+</component>

+ 11 - 0
go/.idea/runConfigurations/k5_maximum_subarray_sum.xml

@@ -0,0 +1,11 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="k5 maximum subarray sum" type="GoTestRunConfiguration" factoryName="Go Test">
+    <module name="codewars" />
+    <working_directory value="$PROJECT_DIR$/" />
+    <go_parameters value="-i" />
+    <framework value="gotest" />
+    <kind value="PACKAGE" />
+    <package value="code.osinet.fr/fgm/codewars/kyu5/maximum_subarray_sum" />
+    <method v="2" />
+  </configuration>
+</component>

+ 13 - 0
go/.idea/runConfigurations/k6_are_they_the_same.xml

@@ -0,0 +1,13 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="k6 are they the same" type="GoTestRunConfiguration" factoryName="Go Test" singleton="false">
+    <working_directory value="$PROJECT_DIR$" />
+    <go_parameters value="-i" />
+    <framework value="gotest" />
+    <kind value="DIRECTORY" />
+    <package value="are" />
+    <directory value="$PROJECT_DIR$/kyu6/aretheythesame" />
+    <filePath value="$PROJECT_DIR$/" />
+    <pattern value="./..." />
+    <method v="2" />
+  </configuration>
+</component>

+ 15 - 0
go/.idea/runConfigurations/k6_convert_string_to_camel_case.xml

@@ -0,0 +1,15 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="k6 convert string to camel case" type="GoTestRunConfiguration" factoryName="Go Test" singleton="false">
+    <module name="codewars" />
+    <working_directory value="$PROJECT_DIR$" />
+    <go_parameters value="-i" />
+    <framework value="gotest" />
+    <kind value="PACKAGE" />
+    <package value="code.osinet.fr/fgm/codewars/kyu6/convertstringtocamelcase" />
+    <directory value="$PROJECT_DIR$/src/convertstringtocamelcase/" />
+    <filePath value="$PROJECT_DIR$/convertstringtocamelcase/convertstringtocamelcase_test.go" />
+    <pattern value="./..." />
+    <output_directory value="$PROJECT_DIR$" />
+    <method v="2" />
+  </configuration>
+</component>

+ 11 - 0
go/.idea/runConfigurations/k7_a_rule_of_divisibility_by_7.xml

@@ -0,0 +1,11 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="k7 a rule of divisibility by 7" type="GoTestRunConfiguration" factoryName="Go Test">
+    <module name="codewars" />
+    <working_directory value="$PROJECT_DIR$/" />
+    <go_parameters value="-i" />
+    <framework value="gotest" />
+    <kind value="PACKAGE" />
+    <package value="code.osinet.fr/fgm/codewars/kyu7/a_rule_of_divisibility_by_7" />
+    <method v="2" />
+  </configuration>
+</component>

+ 11 - 0
go/.idea/runConfigurations/k7_alphabetical_addition.xml

@@ -0,0 +1,11 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="k7 alphabetical addition" type="GoTestRunConfiguration" factoryName="Go Test">
+    <module name="codewars" />
+    <working_directory value="$PROJECT_DIR$/" />
+    <go_parameters value="-i" />
+    <framework value="gotest" />
+    <kind value="PACKAGE" />
+    <package value="code.osinet.fr/fgm/codewars/k7_alphabetical_addition" />
+    <method v="2" />
+  </configuration>
+</component>

+ 11 - 0
go/.idea/runConfigurations/k7_complementary_DNA.xml

@@ -0,0 +1,11 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="k7 complementary DNA" type="GoTestRunConfiguration" factoryName="Go Test">
+    <module name="codewars" />
+    <working_directory value="$PROJECT_DIR$/" />
+    <go_parameters value="-i" />
+    <framework value="gotest" />
+    <kind value="PACKAGE" />
+    <package value="code.osinet.fr/fgm/codewars/k7_complementary_dna" />
+    <method v="2" />
+  </configuration>
+</component>

+ 11 - 0
go/.idea/runConfigurations/k7_maximum_multiple.xml

@@ -0,0 +1,11 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="k7 maximum multiple" type="GoTestRunConfiguration" factoryName="Go Test">
+    <module name="codewars" />
+    <working_directory value="$PROJECT_DIR$/" />
+    <go_parameters value="-i" />
+    <framework value="gotest" />
+    <kind value="PACKAGE" />
+    <package value="code.osinet.fr/fgm/codewars/kyu7/maximum_multiple" />
+    <method v="2" />
+  </configuration>
+</component>

+ 11 - 0
go/.idea/runConfigurations/k7_square_strings_1.xml

@@ -0,0 +1,11 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="k7 square strings 1" type="GoTestRunConfiguration" factoryName="Go Test">
+    <module name="codewars" />
+    <working_directory value="$PROJECT_DIR$/" />
+    <go_parameters value="-i" />
+    <framework value="gotest" />
+    <kind value="PACKAGE" />
+    <package value="code.osinet.fr/fgm/codewars/k7_square_strings_1" />
+    <method v="2" />
+  </configuration>
+</component>

+ 11 - 0
go/.idea/runConfigurations/k7_strong_N.xml

@@ -0,0 +1,11 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="k7 strong N" type="GoTestRunConfiguration" factoryName="Go Test">
+    <module name="codewars" />
+    <working_directory value="$PROJECT_DIR$/" />
+    <go_parameters value="-i" />
+    <framework value="gotest" />
+    <kind value="PACKAGE" />
+    <package value="code.osinet.fr/fgm/codewars/k7_strongn" />
+    <method v="2" />
+  </configuration>
+</component>

+ 11 - 0
go/.idea/runConfigurations/k7_the_parperfold_sequence.xml

@@ -0,0 +1,11 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="k7 the parperfold sequence" type="GoTestRunConfiguration" factoryName="Go Test">
+    <module name="codewars" />
+    <working_directory value="$PROJECT_DIR$" />
+    <go_parameters value="-i -timeout 5s" />
+    <framework value="gotest" />
+    <kind value="PACKAGE" />
+    <package value="code.osinet.fr/fgm/codewars/kyu7/the_paperfold_sequence" />
+    <method v="2" />
+  </configuration>
+</component>

+ 11 - 0
go/.idea/runConfigurations/k7_zombie_shootout.xml

@@ -0,0 +1,11 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="k7 zombie shootout" type="GoTestRunConfiguration" factoryName="Go Test">
+    <module name="codewars" />
+    <working_directory value="$PROJECT_DIR$/" />
+    <go_parameters value="-i" />
+    <framework value="gotest" />
+    <kind value="PACKAGE" />
+    <package value="code.osinet.fr/fgm/codewars/k7_zombie_shootout" />
+    <method v="2" />
+  </configuration>
+</component>

+ 6 - 0
go/.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
+  </component>
+</project>

+ 9 - 0
go/go.mod

@@ -0,0 +1,9 @@
+module code.osinet.fr/fgm/codewars
+
+go 1.13
+
+require (
+	github.com/onsi/ginkgo v1.11.0
+	github.com/onsi/gomega v1.8.1
+	golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9 // indirect
+)

+ 29 - 0
go/go.sum

@@ -0,0 +1,29 @@
+github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
+github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
+github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
+github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/gomega v1.8.1 h1:C5Dqfs/LeauYDX0jJXIe2SWmwCbGzx9yF8C8xy3Lh34=
+github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs=
+golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9 h1:1/DFK4b7JH8DmkqhUk48onnSfrPzImPoVxuomtbT2nk=
+golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
+gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
+gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
+gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

+ 142 - 0
go/kyu4/strings_mix/k.go

@@ -0,0 +1,142 @@
+package kata
+
+import (
+	"fmt"
+	"sort"
+	"strings"
+	"unicode"
+)
+
+type count map[rune]int
+
+func (c count) String() (s string) {
+	var sl []string
+	for r := 'a'; r <= 'z'; r++ {
+		n, ok := c[r]
+		if ok {
+			sl = append(sl, fmt.Sprintf("%c: %d", r, n))
+		}
+	}
+	s = "[" + strings.Join(sl, ", ") + "]"
+	return s
+}
+
+func (c count) ascending() []string {
+	res := make([]string, len(c))
+	i := 0
+	for r, n := range c {
+		res[i] = string(rune(n)) + string(r)
+		i++
+	}
+	sort.Strings(res)
+	return res
+}
+
+func newCount() count {
+	c := make(count, 26)
+	for r := 'a'; r <= 'z'; r++ {
+		c[r] = 0
+	}
+	return c
+}
+
+
+func (c count) ingest(s string) {
+	// Count letters.
+	for _, r := range s {
+		if unicode.IsLower(r) {
+			c[r]++
+		}
+	}
+
+	// Remove non-repeated letters and order.
+	for r := 'a'; r <= 'z'; r++ {
+		occurrences := c[r]
+		if occurrences <= 1 {
+			delete(c, r)
+			continue
+		}
+	}
+}
+
+type hitList map[int]count
+
+func (h hitList) descendingKeys() []int {
+	keys:= make([]int, len(h))
+	i := 0
+	for k := range h {
+		keys[i] = k
+		i++
+	}
+	sort.Sort(sort.Reverse(sort.IntSlice(keys)))
+	return keys
+}
+
+func (h hitList) String() string {
+	var sl []string
+	for n, c := range h {
+		sl = append(sl, fmt.Sprintf("%d: %s", n, c))
+	}
+	res := "[" + strings.Join(sl, ", ") + "]"
+	return res
+}
+
+// Cull removes from each count entries not at least equal to the one in the other count.
+func cull(c1, c2 count) (r1, r2 count) {
+	r1, r2 = count{}, count{}
+	for r, n1 := range c1 {
+		n2, ok := c2[r]
+		if !ok || n1 >= n2 {
+			r1[r] = n1
+		}
+	}
+	for r, n2 := range c2 {
+		n1, ok := c1[r]
+		if !ok || n2 >= n1 {
+			r2[r] = n2
+		}
+	}
+	return
+}
+
+// Invert build an inverse count, assuming already culled counts.
+func invert(c1, c2 count) hitList {
+	union := hitList{}
+	for r, n := range c1 {
+		if _, ok := union[n]; !ok {
+			union[n] = count{}
+		}
+		// On the first string, every letter is missing, so just initialize.
+		union[n][r] = '1'
+	}
+	for r, n := range c2 {
+		if _, ok := union[n]; !ok {
+			union[n] = count{}
+		}
+		// On any subsequent string, letters may exist or not, so be careful.
+		_, ok  := union[n][r]
+		if !ok {
+			union[n][r] = '2'
+		} else {
+			union[n][r] = '='
+		}
+	}
+	return union
+}
+
+func Mix(s1, s2 string) string {
+	c1, c2 := newCount(), newCount()
+	c1.ingest(s1)
+	c2.ingest(s2)
+	c1, c2 = cull(c1, c2)
+	union := invert(c1, c2)
+	var sl []string
+	for _, n := range union.descendingKeys() {
+		for _, hits := range union[n].ascending() {
+			source, r := hits[0], hits[1]
+			sl = append(sl, fmt.Sprintf("%c:%s", source, strings.Repeat(string(r), n)))
+		}
+	}
+	s := strings.Join(sl, "/")
+	return s
+}

+ 24 - 0
go/kyu4/strings_mix/k_test.go

@@ -0,0 +1,24 @@
+package kata_test
+
+import (
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+
+	. "code.osinet.fr/fgm/codewars/kyu4/strings_mix"
+)
+
+func dotest(a1 string, a2 string, exp string) {
+	var ans = Mix(a1, a2)
+	Expect(ans).To(Equal(exp))
+}
+
+var _ = Describe("Tests Mix", func() {
+
+	It("should handle basic cases 1", func() {
+		dotest("Are they here", "yes, they are here", "2:eeeee/2:yy/=:hh/=:rr")
+		dotest("uuuuuu", "uuuuuu", "=:uuuuuu")
+		dotest("looping is fun but dangerous", "less dangerous than coding",
+			"1:ooo/1:uuu/2:sss/=:nnn/1:ii/2:aa/2:dd/2:ee/=:gg")
+
+	})
+})

+ 13 - 0
go/kyu4/strings_mix/strings_mix_suite_test.go

@@ -0,0 +1,13 @@
+package kata_test
+
+import (
+	"testing"
+
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+func TestStringsMix(t *testing.T) {
+	RegisterFailHandler(Fail)
+	RunSpecs(t, "StringsMix Suite")
+}

+ 50 - 0
go/kyu5/maximum_subarray_sum/k.go

@@ -0,0 +1,50 @@
+package kata
+
+func isDegeneratePositive(numbers []int) bool {
+	for _, n := range numbers {
+		if n < 0 {
+			return false
+		}
+	}
+	return true
+}
+
+func isDegenerateNegative(numbers []int) bool {
+	for _, n := range numbers {
+		if n > 0 {
+			return false
+		}
+	}
+	return true
+}
+
+func sum(s []int) int {
+	res := 0
+	for _, n := range s {
+		res += n
+	}
+	return res
+}
+
+func MaximumSubarraySum(numbers []int) int {
+	// Covers the empty case as well.
+	if isDegeneratePositive(numbers) {
+		return sum(numbers)
+	}
+	// Would cover the empty case as well, but it was handled above.
+	if isDegenerateNegative(numbers) {
+		return 0
+	}
+
+	max := 0
+	for i := 0; i < len(numbers); i++ {
+		for j := i; j <= len(numbers); j++ {
+			sliced := numbers[i:j]
+			candidate := sum(sliced)
+			if candidate > max {
+				max = candidate
+			}
+		}
+	}
+	return max
+}

+ 21 - 0
go/kyu5/maximum_subarray_sum/k_test.go

@@ -0,0 +1,21 @@
+package kata_test
+
+import (
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+var _ = Describe("Tests", func() {
+	It("Basic tests", func() {
+		Describe("Empty arrays should have a max of 0", func() {
+			Expect(MaximumSubarraySum([]int{})).To(Equal(0))
+		})
+
+		Describe("Example array should have a max of 6", func() {
+			Expect(MaximumSubarraySum([]int{-2, 1, -3, 4, -1, 2, 1, -5, 4})).To(Equal(6))
+		})
+
+		Describe("Example array with all negative values should have a max of 0", func() {
+			Expect(MaximumSubarraySum([]int{-2, -1, -3, -4, -1, -2, -1, -5, -4})).To(Equal(0))
+		})
+	})
+})

+ 13 - 0
go/kyu5/maximum_subarray_sum/maximum_subarray_sum_suite_test.go

@@ -0,0 +1,13 @@
+package kata_test
+
+import (
+	"testing"
+
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+func TestMaximumSubarraySum(t *testing.T) {
+	RegisterFailHandler(Fail)
+	RunSpecs(t, "MaximumSubarraySum Suite")
+}

+ 23 - 0
go/kyu6/aretheythesame/aretheythesame.go

@@ -0,0 +1,23 @@
+package aretheythesame
+
+import "sort"
+
+func Comp(a, b []int) bool {
+	if a == nil && b != nil || a != nil && b == nil {
+		return false
+	}
+
+	if len(a) != len(b) {
+		return false
+	}
+
+	sort.Ints(a)
+	sort.Ints(b)
+	for i := 0; i < len(a); i++ {
+		x := a[i] * a[i]
+		if x != b[i] {
+			return false
+		}
+	}
+	return true
+}

+ 51 - 0
go/kyu6/aretheythesame/aretheythesame_test.go

@@ -0,0 +1,51 @@
+package aretheythesame
+
+import "testing"
+
+type check struct {
+	name     string
+	one, two []int
+	expected bool
+}
+
+func TestComp(t *testing.T) {
+	checks := []check{
+		{
+			"Good",
+			[]int{121, 144, 19, 161, 19, 144, 19, 11},
+			[]int{121, 14641, 20736, 361, 25921, 361, 20736, 361},
+			true,
+		},
+		{
+			"132 is not 11^2",
+			[]int{121, 144, 19, 161, 19, 144, 19, 11},
+			[]int{132, 14641, 20736, 361, 25921, 361, 20736, 361},
+			false,
+		},
+		{
+			"36100 is not the square of any member of a",
+			[]int{121, 144, 19, 161, 19, 144, 19, 11},
+			[]int{121, 14641, 20736, 36100, 25921, 361, 20736, 361},
+			false,
+		},
+		{
+			"Bad pair",
+			[]int{4, 4},
+			[]int{1, 31},
+			false,
+		},
+		{
+			"Empty and null",
+			[]int{},
+			nil,
+			false,
+		},
+	}
+
+	for _, check := range checks {
+		actual := Comp(check.one, check.two);
+		if actual != check.expected {
+			t.Errorf("%s: expected %v got %v", check.name, check.expected, actual)
+		}
+	}
+}

+ 42 - 0
go/kyu6/convertstringtocamelcase/convertstringtocamelcase.go

@@ -0,0 +1,42 @@
+package kata
+
+import (
+	"fmt"
+	"strings"
+	"unicode"
+)
+
+func ToCamelCase(s string) string {
+	// Only handle the underscore case.
+	u := strings.ReplaceAll(s, `-`, `_`)
+	fmt.Println("Checking", u)
+
+	res := make([]rune, 0, len(u))
+	atFirst := true
+	atInitial := true
+	for _, r := range u {
+		fmt.Printf("%c: ", r)
+		if r == '_' {
+			fmt.Println("Skipping _, setting Initial")
+			atInitial = true
+			continue
+		}
+
+		if atFirst {
+			fmt.Println("First")
+			res = append(res, r)
+			atFirst = false
+			atInitial = false
+			continue
+		} else if atInitial {
+			fmt.Println("atInitial")
+			res = append(res, unicode.ToUpper(r))
+		} else {
+			fmt.Println("not")
+			res = append(res, r)
+		}
+		atInitial = false
+	}
+
+	return string(res)
+}

+ 26 - 0
go/kyu6/convertstringtocamelcase/convertstringtocamelcase_test.go

@@ -0,0 +1,26 @@
+package kata
+
+import (
+	"testing"
+)
+
+type check struct {
+	name     string
+	src      string
+	expected string
+}
+
+func TestToCamelCase(t *testing.T) {
+	checks := []check{
+		{"dashes", "the-stealth-warrior", "theStealthWarrior"},
+		{"snake", "the_stealth_warrior", "theStealthWarrior"},
+		{"Snake", "The_stealth_warrior", "TheStealthWarrior"},
+	}
+
+	for _, check := range checks {
+		actual := ToCamelCase(check.src);
+		if actual != check.expected {
+			t.Errorf("%s: expected %v got %v", check.name, check.expected, actual)
+		}
+	}
+}

+ 13 - 0
go/kyu7/a_rule_of_divisibility_by_7/a_rule_of_divisibility_by_7_suite_test.go

@@ -0,0 +1,13 @@
+package kata_test
+
+import (
+	"testing"
+
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+func TestARuleOfDivisibilityBy7(t *testing.T) {
+	RegisterFailHandler(Fail)
+	RunSpecs(t, "ARuleOfDivisibilityBy7 Suite")
+}

+ 16 - 0
go/kyu7/a_rule_of_divisibility_by_7/k.go

@@ -0,0 +1,16 @@
+package kata
+
+func Seven(n int64) []int {
+	steps := 0
+	current := int(n)
+	for {
+		n1, n2 := current / 10, current % 10
+		if current < 100 {
+			break
+		}
+		current = n1 - 2*n2
+		steps++
+	}
+
+	return []int{current, steps}
+}

+ 23 - 0
go/kyu7/a_rule_of_divisibility_by_7/k_test.go

@@ -0,0 +1,23 @@
+package kata_test
+
+import (
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+func doTest(n int64, exp []int) {
+	var ans = Seven(n)
+	Expect(ans).To(Equal(exp))
+}
+
+var _ = Describe("Tests Seven", func() {
+
+	It("should handle basic cases", func() {
+		//doTest(371, []int{10, 2})
+		doTest(371, []int{35, 1})
+		doTest(1603, []int{7, 2})
+		doTest(477557101, []int{28, 7})
+		doTest(477557102, []int{47, 7})
+	})
+})
+

+ 13 - 0
go/kyu7/alphabetical_addition/alphabetical_addition_suite_test.go

@@ -0,0 +1,13 @@
+package kata
+
+import (
+	"testing"
+
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+func TestK7AlphabeticalAddition(t *testing.T) {
+	RegisterFailHandler(Fail)
+	RunSpecs(t, "K7AlphabeticalAddition Suite")
+}

+ 11 - 0
go/kyu7/alphabetical_addition/kata.go

@@ -0,0 +1,11 @@
+package kata
+
+func AddLetters(letters []rune) rune {
+	var off rune = 0
+
+	for _, letter := range letters {
+		off += letter - 'a' + 1
+	}
+	var res rune = 'a' + (25 + off) % 26
+	return res
+}

+ 16 - 0
go/kyu7/alphabetical_addition/kata_test.go

@@ -0,0 +1,16 @@
+package kata_test
+
+import (
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+var _ = Describe("Basic Tests", func() {
+	It("Testing for []rune{'a'}", func() { Expect(AddLetters([]rune{'a'})).To(Equal('a')) })
+	It("Testing for []rune{'a', 'b', 'c'}", func() { Expect(AddLetters([]rune{'a', 'b', 'c'})).To(Equal('f')) })
+	It("Testing for []rune{'z'}", func() { Expect(AddLetters([]rune{'z'})).To(Equal('z')) })
+	It("Testing for []rune{'a', 'b'}", func() { Expect(AddLetters([]rune{'a', 'b'})).To(Equal('c')) })
+	It("Testing for []rune{'c'}", func() { Expect(AddLetters([]rune{'c'})).To(Equal('c')) })
+	It("Testing for []rune{'z', 'a'}", func() { Expect(AddLetters([]rune{'z', 'a'})).To(Equal('a')) })
+	It("Testing for []rune{'y', 'c', 'b'}", func() { Expect(AddLetters([]rune{'y', 'c', 'b'})).To(Equal('d')) })
+	It("Testing for []rune{}", func() { Expect(AddLetters([]rune{})).To(Equal('z')) })
+})

+ 10 - 0
go/kyu7/complementary_dna/k.go

@@ -0,0 +1,10 @@
+package kata
+
+func DNAStrand(dna string) string {
+	s := make([]rune, len(dna))
+	complements := map[rune]rune{'A':'T', 'T':'A', 'C':'G', 'G': 'C'}
+	for i, r := range dna {
+		s[i] = complements[r]
+	}
+	return string(s)
+}

+ 13 - 0
go/kyu7/complementary_dna/k7_complementary_dna_suite_test.go

@@ -0,0 +1,13 @@
+package kata_test
+
+import (
+	"testing"
+
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+func TestK7ComplementaryDna(t *testing.T) {
+	RegisterFailHandler(Fail)
+	RunSpecs(t, "K7ComplementaryDna Suite")
+}

+ 17 - 0
go/kyu7/complementary_dna/k_test.go

@@ -0,0 +1,17 @@
+// Ginkgo BDD Testing Framework <http://onsi.github.io/ginkgo></http:>
+// Gomega Matcher Library <http://onsi.github.io/gomega></http:>
+
+package kata_test
+
+import (
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+var _ = Describe("Test Example", func() {
+	It("Basic Tests", func() {
+		Expect(DNAStrand("AAAA")).To(Equal("TTTT"))
+		Expect(DNAStrand("ATTGC")).To(Equal("TAACG"))
+		Expect(DNAStrand("GTAT")).To(Equal("CATA"))
+	})
+})

+ 5 - 0
go/kyu7/maximum_multiple/k.go

@@ -0,0 +1,5 @@
+package kata
+
+func MaxMultiple(divisor, bound int) int {
+	return (bound / divisor) * divisor
+}

+ 15 - 0
go/kyu7/maximum_multiple/k_test.go

@@ -0,0 +1,15 @@
+package kata_test
+
+import (
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+var _ = Describe("Basic tests", func() {
+	It("MaxMultiple(2, 7)", func() { Expect(MaxMultiple(2, 7)).To(Equal(6)) })
+	It("MaxMultiple(3, 10)", func() { Expect(MaxMultiple(3, 10)).To(Equal(9)) })
+	It("MaxMultiple(7, 17)", func() { Expect(MaxMultiple(7, 17)).To(Equal(14)) })
+	It("MaxMultiple(10, 50)", func() { Expect(MaxMultiple(10, 50)).To(Equal(50)) })
+	It("MaxMultiple(37, 200)", func() { Expect(MaxMultiple(37, 200)).To(Equal(185)) })
+	It("MaxMultiple(7, 100)", func() { Expect(MaxMultiple(7, 100)).To(Equal(98)) })
+})

+ 13 - 0
go/kyu7/maximum_multiple/maximum_multiple_suite_test.go

@@ -0,0 +1,13 @@
+package kata_test
+
+import (
+	"testing"
+
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+func TestMaximumMultiple(t *testing.T) {
+	RegisterFailHandler(Fail)
+	RunSpecs(t, "MaximumMultiple Suite")
+}

+ 14 - 0
go/kyu7/shortest_word/k.go

@@ -0,0 +1,14 @@
+package kata
+
+import "strings"
+
+func FindShort(s string) int {
+	sr := strings.Split(s, " ")
+	min := len(s)
+	for _, row := range sr {
+		if len(row) < min {
+			min = len(row)
+		}
+	}
+	return min
+}

+ 13 - 0
go/kyu7/shortest_word/k_test.go

@@ -0,0 +1,13 @@
+package kata_test
+
+import (
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+var _ = Describe("Test Example", func() {
+	It("should test that the solution returns the correct value", func() {
+		Expect(FindShort("bitcoin take over the world maybe who knows perhaps")).To(Equal(3))
+		Expect(FindShort("turns out random test cases are easier than writing out basic ones")).To(Equal(3))
+	})
+})

+ 13 - 0
go/kyu7/shortest_word/shortest_word_suite_test.go

@@ -0,0 +1,13 @@
+package kata_test
+
+import (
+	"testing"
+
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+func TestK7ShortestWord(t *testing.T) {
+	RegisterFailHandler(Fail)
+	RunSpecs(t, "K7ShortestWord Suite")
+}

+ 39 - 0
go/kyu7/square_strings_1/k.go

@@ -0,0 +1,39 @@
+package kata
+
+import "strings"
+
+func Reverse(s string) string {
+	rs := []rune(s)
+	for i, j := 0, len(rs)-1; i < j; i, j = i+1, j-1 {
+		rs[i], rs[j] = rs[j], rs[i]
+	}
+	return string(rs)
+}
+
+const NL = "\n"
+
+// VertMirror reverses each line in the multiline string.
+func VertMirror(s string) string {
+	ss := strings.Split(s, NL)
+	rs := make([]string, len(ss))
+	for i, row := range ss {
+		rs[i] = Reverse(row)
+	}
+	rev := strings.Join(rs, NL)
+	return rev
+}
+
+// HorMirror reverses the line order in the multiline strings.
+func HorMirror(s string) string {
+	ss := strings.Split(s, NL)
+	for i, j := 0, len(ss)-1; i < j; i, j = i+1, j-1 {
+		ss[i], ss[j] = ss[j], ss[i]
+	}
+	return strings.Join(ss, NL)
+}
+
+type FParam func(string) string
+
+func Oper(f FParam, x string) string {
+	return f(x)
+}

+ 31 - 0
go/kyu7/square_strings_1/k_test.go

@@ -0,0 +1,31 @@
+package kata_test
+
+import (
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+func dotestVert(a1 string, exp string) {
+	var ans = Oper(VertMirror, a1)
+	Expect(ans).To(Equal(exp))
+}
+func dotestHor(a1 string, exp string) {
+	var ans = Oper(HorMirror, a1)
+	Expect(ans).To(Equal(exp))
+}
+
+var _ = Describe("Tests Moves", func() {
+
+	It("should handle basic cases Oper VertMirror", func() {
+		dotestVert("hSgdHQ\nHnDMao\nClNNxX\niRvxxH\nbqTVvA\nwvSyRu", "QHdgSh\noaMDnH\nXxNNlC\nHxxvRi\nAvVTqb\nuRySvw")
+
+	})
+	It("should handle basic cases Oper HorMirror", func() {
+		dotestHor("lVHt\nJVhv\nCSbg\nyeCt", "yeCt\nCSbg\nJVhv\nlVHt")
+
+	})
+
+	It("should reverse single row string", func() {
+		Expect(Reverse("Andante")).To(Equal("etnadnA"))
+	})
+})

+ 13 - 0
go/kyu7/square_strings_1/square_strings_1_suite_test.go

@@ -0,0 +1,13 @@
+package kata_test
+
+import (
+	"testing"
+
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+func TestK7SquareStrings1(t *testing.T) {
+	RegisterFailHandler(Fail)
+	RunSpecs(t, "K7SquareStrings1 Suite")
+}

+ 22 - 0
go/kyu7/strongn/k.go

@@ -0,0 +1,22 @@
+package kata
+
+import "strconv"
+
+func fact(n int) int {
+	if n <= 1 {
+		return 1
+	}
+	return n * fact(n - 1)
+}
+
+func Strong(n int) string {
+	s := strconv.Itoa(n)
+	fSum := 0
+	for _, r := range s {
+		fSum += fact(int(r - '0'))
+	}
+	if fSum == n {
+		return "STRONG!!!!"
+	}
+	return "Not Strong !!"
+}

+ 23 - 0
go/kyu7/strongn/k_test.go

@@ -0,0 +1,23 @@
+package kata_test
+
+import (
+	"strconv"
+
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+func Tester(n int, exp string) {
+	It("Testing for " + strconv.Itoa(n), func() {
+		Expect(Strong(n)).To(Equal(exp))
+	})
+}
+
+var _ = Describe("Basic tests", func() {
+	Tester(1, "STRONG!!!!")
+	Tester(2, "STRONG!!!!")
+	Tester(145, "STRONG!!!!")
+	Tester(7, "Not Strong !!")
+	Tester(93, "Not Strong !!")
+	Tester(185, "Not Strong !!")
+})

+ 13 - 0
go/kyu7/strongn/strongn_suite_test.go

@@ -0,0 +1,13 @@
+package kata_test
+
+import (
+	"testing"
+
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+func TestStrongn(t *testing.T) {
+	RegisterFailHandler(Fail)
+	RunSpecs(t, "Strongn Suite")
+}

+ 17 - 0
go/kyu7/sum_odd_numbers/k.go

@@ -0,0 +1,17 @@
+package kata
+
+/*
+             1                 1 1^3
+          3     5              8 2^3
+       7     9    11          27 3^3
+   13    15    17    19       64 4^3
+21    23    25    27    29   125 5^3
+
+First: 1, prev+2, prev+4, prev+6, prev+8...
+s(n) = n^3 ?
+=> s(n-1) = n^3 -3*n^2+3*n-1
+ */
+
+func RowSumOddNumbers(n int) int {
+	return n*n*n
+}

+ 19 - 0
go/kyu7/sum_odd_numbers/k_test.go

@@ -0,0 +1,19 @@
+package kata_test
+
+import (
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+var _ = Describe("Fixed tests", func() {
+	It("Testing for 1", func() { Expect(RowSumOddNumbers(1)).To(Equal(1)) })
+	It("Testing for 2", func() { Expect(RowSumOddNumbers(2)).To(Equal(8)) })
+	It("Testing for 13", func() { Expect(RowSumOddNumbers(13)).To(Equal(2197)) })
+	It("Testing for 19", func() { Expect(RowSumOddNumbers(19)).To(Equal(6859)) })
+	It("Testing for 41", func() { Expect(RowSumOddNumbers(41)).To(Equal(68921)) })
+	It("Testing for 42", func() { Expect(RowSumOddNumbers(42)).To(Equal(74088)) })
+	It("Testing for 74", func() { Expect(RowSumOddNumbers(74)).To(Equal(405224)) })
+	It("Testing for 86", func() { Expect(RowSumOddNumbers(86)).To(Equal(636056)) })
+	It("Testing for 93", func() { Expect(RowSumOddNumbers(93)).To(Equal(804357)) })
+	It("Testing for 101", func() { Expect(RowSumOddNumbers(101)).To(Equal(1030301)) })
+})

+ 22 - 0
go/kyu7/the_paperfold_sequence/k.go

@@ -0,0 +1,22 @@
+package kata
+
+/*
+Paperfold implements the general paperfold generation (OEIS A0014577) based
+on the algorithm given by Joerg Arndt, Apr 15 2010.
+
+See https://oeis.org/A014577
+ */
+func PaperFold(ch chan<- int) {
+	i := 1
+	for {
+		k := i
+		h := k & -k
+		k &= h << 1
+		if k == 0 {
+			ch <- 1
+		} else {
+			ch <- 0
+		}
+		i++
+	}
+}

+ 22 - 0
go/kyu7/the_paperfold_sequence/k_test.go

@@ -0,0 +1,22 @@
+package kata_test
+
+import (
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+
+	. "code.osinet.fr/fgm/codewars/kyu7/the_paperfold_sequence"
+)
+
+var _ = Describe("PaperFold sequence", func() {
+	It("20 elements", func() {
+		arr := []int{}
+		p := make(chan int, 100)
+		go PaperFold(p)
+
+		for i := 0; i < 20; i++ {
+			arr = append(arr, <-p)
+		}
+
+		Expect(arr).To(Equal([]int{1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1}))
+	})
+})

+ 13 - 0
go/kyu7/the_paperfold_sequence/the_paperfold_sequence_suite_test.go

@@ -0,0 +1,13 @@
+package kata_test
+
+import (
+	"testing"
+
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+func TestThePaperfoldSequence(t *testing.T) {
+	RegisterFailHandler(Fail)
+	RunSpecs(t, "ThePaperfoldSequence Suite")
+}

+ 30 - 0
go/kyu7/zombie_shootout/k.go

@@ -0,0 +1,30 @@
+package kata
+
+import "fmt"
+
+func Zombie_shootout(zombies, initial_range, ammo int) string {
+	remaining := func(time int) int {
+		return zombies - time
+	}
+	distance := func(time int) int {
+		if initial_range <= time / 2 {
+			return 0
+		}
+		return initial_range - time / 2
+	}
+
+	time := 0
+	for {
+		currentAmmo := ammo - time
+		if remaining(time) == 0 {
+			return fmt.Sprintf("You shot all %d zombies.", zombies)
+		}
+		if distance(time) == 0 {
+			return fmt.Sprintf("You shot %d zombies before being eaten: overwhelmed.", time)
+		}
+		if currentAmmo == 0 {
+			return fmt.Sprintf("You shot %d zombies before being eaten: ran out of ammo.", time)
+		}
+		time++
+	}
+}

+ 14 - 0
go/kyu7/zombie_shootout/k_test.go

@@ -0,0 +1,14 @@
+package kata_test
+
+import (
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+var _ = Describe("Basic tests", func() {
+	It("Zombie_shootout(20, 10, 20)", func() { Expect(Zombie_shootout(20, 10, 20)).To(Equal("You shot all 20 zombies.")) })
+	It("Zombie_shootout(50, 10, 49)", func() { Expect(Zombie_shootout(50, 10, 49)).To(Equal("You shot 20 zombies before being eaten: overwhelmed.")) })
+	It("Zombie_shootout(3, 10, 10)", func() { Expect(Zombie_shootout(3, 10, 10)).To(Equal("You shot all 3 zombies.")) })
+	It("Zombie_shootout(100, 8, 200)", func() { Expect(Zombie_shootout(100, 8, 200)).To(Equal("You shot 16 zombies before being eaten: overwhelmed.")) })
+	It("Zombie_shootout(50, 10, 8)", func() { Expect(Zombie_shootout(50, 10, 8)).To(Equal("You shot 8 zombies before being eaten: ran out of ammo.")) })
+})

+ 13 - 0
go/kyu7/zombie_shootout/zombie_shootout_suite_test.go

@@ -0,0 +1,13 @@
+package kata_test
+
+import (
+	"testing"
+
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+)
+
+func TestK7ZombieShootout(t *testing.T) {
+	RegisterFailHandler(Fail)
+	RunSpecs(t, "K7ZombieShootout Suite")
+}

+ 1 - 0
php/.idea/.name

@@ -0,0 +1 @@
+CodeWars PHP

+ 10 - 0
php/.idea/CodeWars PHP.iml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/vendor" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 14 - 0
php/.idea/deployment.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="PublishConfigData">
+    <serverData>
+      <paths name="SACD NEA">
+        <serverdata>
+          <mappings>
+            <mapping local="$PROJECT_DIR$" web="/" />
+          </mappings>
+        </serverdata>
+      </paths>
+    </serverData>
+  </component>
+</project>

+ 6 - 0
php/.idea/misc.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="JavaScriptSettings">
+    <option name="languageLevel" value="ES6" />
+  </component>
+</project>

+ 8 - 0
php/.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/CodeWars PHP.iml" filepath="$PROJECT_DIR$/.idea/CodeWars PHP.iml" />
+    </modules>
+  </component>
+</project>

+ 14 - 0
php/.idea/php-test-framework.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="PhpTestFrameworkVersionCache">
+    <tools_cache>
+      <tool tool_name="PHPUnit">
+        <cache>
+          <versions>
+            <info id="Local" version="8.5.2" />
+          </versions>
+        </cache>
+      </tool>
+    </tools_cache>
+  </component>
+</project>

+ 43 - 0
php/.idea/php.xml

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="PhpIncludePathManager">
+    <include_path>
+      <path value="$PROJECT_DIR$/vendor/composer" />
+      <path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
+      <path value="$PROJECT_DIR$/vendor/myclabs/deep-copy" />
+      <path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-docblock" />
+      <path value="$PROJECT_DIR$/vendor/webmozart/assert" />
+      <path value="$PROJECT_DIR$/vendor/phpspec/prophecy" />
+      <path value="$PROJECT_DIR$/vendor/phar-io/version" />
+      <path value="$PROJECT_DIR$/vendor/phar-io/manifest" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/type" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/recursion-context" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/environment" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/version" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/resource-operations" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/exporter" />
+      <path value="$PROJECT_DIR$/vendor/phpdocumentor/type-resolver" />
+      <path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-common" />
+      <path value="$PROJECT_DIR$/vendor/phpunit/phpunit" />
+      <path value="$PROJECT_DIR$/vendor/doctrine/instantiator" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/global-state" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/comparator" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/object-reflector" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/object-enumerator" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/diff" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/code-unit-reverse-lookup" />
+      <path value="$PROJECT_DIR$/vendor/phpunit/php-token-stream" />
+      <path value="$PROJECT_DIR$/vendor/phpunit/php-timer" />
+      <path value="$PROJECT_DIR$/vendor/phpunit/php-code-coverage" />
+      <path value="$PROJECT_DIR$/vendor/phpunit/php-text-template" />
+      <path value="$PROJECT_DIR$/vendor/theseer/tokenizer" />
+      <path value="$PROJECT_DIR$/vendor/phpunit/php-file-iterator" />
+    </include_path>
+  </component>
+  <component name="PhpProjectSharedConfiguration" php_language_level="7.4" />
+  <component name="PhpUnit">
+    <phpunit_settings>
+      <PhpUnitSettings load_method="PHPUNIT_PHAR" custom_loader_path="$PROJECT_DIR$/vendor/phpunit/phpunit/phpunit" phpunit_phar_path="$PROJECT_DIR$/vendor/phpunit/phpunit/phpunit" />
+    </phpunit_settings>
+  </component>
+</project>

+ 6 - 0
php/.idea/runConfigurations/7_Count_the_divisors.xml

@@ -0,0 +1,6 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="7 Count the divisors" type="PHPUnitRunConfigurationType" factoryName="PHPUnit">
+    <TestRunner class="TestDivisorsCase" directory="Test" file="$PROJECT_DIR$/counthedivisors/TestDivisorsCase.php" scope="Class" options="-v --debug " />
+    <method v="2" />
+  </configuration>
+</component>

+ 6 - 0
php/.idea/runConfigurations/8_Are_the_the_same.xml

@@ -0,0 +1,6 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="8 Are the the same" type="PHPUnitRunConfigurationType" factoryName="PHPUnit" singleton="false">
+    <TestRunner class="TestCompCase" directory="$PROJECT_DIR$/aretheythesame" file="$PROJECT_DIR$/aretheythesame/Test.php" scope="Class" options="-v --debug " />
+    <method v="2" />
+  </configuration>
+</component>

+ 6 - 0
php/.idea/symfony2.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Symfony2PluginSettings">
+    <option name="pluginEnabled" value="true" />
+  </component>
+</project>

+ 6 - 0
php/.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
+  </component>
+</project>

+ 244 - 0
php/.idea/workspace.xml

@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ChangeListManager">
+    <list default="true" id="4dbf7897-7552-490b-b266-845b385e4550" name="Default Changelist" comment="">
+      <change afterPath="$PROJECT_DIR$/../go/.idea/codewars.iml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../go/.idea/go.iml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/CodeWars PHP.iml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/deployment.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/php-test-framework.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/php.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/runConfigurations/7_Count_the_divisors.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/runConfigurations/8_Are_the_the_same.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/symfony2.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/composer.json" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/composer.lock" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/kyu6/aretheythesame/Test.php" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/kyu6/aretheythesame/aretheythesame.php" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/kyu7/counthedivisors/TestDivisorsCase.php" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/kyu7/counthedivisors/countthedivisors.php" afterDir="false" />
+    </list>
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="ComposerSettings" doNotAsk="true" synchronizationState="SYNCHRONIZE">
+    <pharConfigPath>$PROJECT_DIR$/composer.json</pharConfigPath>
+    <execution>
+      <executable />
+    </execution>
+  </component>
+  <component name="CoverageViewManager">
+    <option name="myElementSize" value="375" />
+  </component>
+  <component name="Git.Settings">
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
+  </component>
+  <component name="PhpDebugGeneral" xdebug_debug_port="9001" />
+  <component name="PhpWorkspaceProjectConfiguration" interpreter_name="PHP 7.2 Brew">
+    <include_path>
+      <path value="$PROJECT_DIR$/vendor/composer" />
+      <path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
+      <path value="$PROJECT_DIR$/vendor/myclabs/deep-copy" />
+      <path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-docblock" />
+      <path value="$PROJECT_DIR$/vendor/webmozart/assert" />
+      <path value="$PROJECT_DIR$/vendor/phpspec/prophecy" />
+      <path value="$PROJECT_DIR$/vendor/phar-io/version" />
+      <path value="$PROJECT_DIR$/vendor/phar-io/manifest" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/type" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/recursion-context" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/environment" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/version" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/resource-operations" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/exporter" />
+      <path value="$PROJECT_DIR$/vendor/phpdocumentor/type-resolver" />
+      <path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-common" />
+      <path value="$PROJECT_DIR$/vendor/phpunit/phpunit" />
+      <path value="$PROJECT_DIR$/vendor/doctrine/instantiator" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/global-state" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/comparator" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/object-reflector" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/object-enumerator" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/diff" />
+      <path value="$PROJECT_DIR$/vendor/sebastian/code-unit-reverse-lookup" />
+      <path value="$PROJECT_DIR$/vendor/phpunit/php-token-stream" />
+      <path value="$PROJECT_DIR$/vendor/phpunit/php-timer" />
+      <path value="$PROJECT_DIR$/vendor/phpunit/php-code-coverage" />
+      <path value="$PROJECT_DIR$/vendor/phpunit/php-text-template" />
+      <path value="$PROJECT_DIR$/vendor/theseer/tokenizer" />
+      <path value="$PROJECT_DIR$/vendor/phpunit/php-file-iterator" />
+    </include_path>
+  </component>
+  <component name="ProjectId" id="1WknsVZKyJNxWH3xtjICDWxpJIu" />
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
+  <component name="ProjectViewState">
+    <option name="autoscrollFromSource" value="true" />
+    <option name="hideEmptyMiddlePackages" value="true" />
+    <option name="showExcludedFiles" value="true" />
+    <option name="showLibraryContents" value="true" />
+  </component>
+  <component name="PropertiesComponent">
+    <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
+    <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
+    <property name="WebServerToolWindowFactoryState" value="true" />
+    <property name="WebServerToolWindowPanel.toolwindow.highlight.mappings" value="true" />
+    <property name="WebServerToolWindowPanel.toolwindow.highlight.symlinks" value="true" />
+    <property name="WebServerToolWindowPanel.toolwindow.show.date" value="false" />
+    <property name="WebServerToolWindowPanel.toolwindow.show.permissions" value="false" />
+    <property name="WebServerToolWindowPanel.toolwindow.show.size" value="false" />
+    <property name="com.jetbrains.php.phpunit.codeGeneration.PhpNewTestDialog.defaultLibrary" value="PHPUnit 6+" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
+    <property name="node.js.detected.package.eslint" value="true" />
+    <property name="node.js.detected.package.tslint" value="true" />
+    <property name="node.js.path.for.package.eslint" value="project" />
+    <property name="node.js.path.for.package.tslint" value="project" />
+    <property name="node.js.selected.package.eslint" value="(autodetect)" />
+    <property name="node.js.selected.package.tslint" value="(autodetect)" />
+    <property name="settings.editor.selected.configurable" value="reference.webide.settings.project.settings.php.debug" />
+  </component>
+  <component name="RecentsManager">
+    <key name="MoveFile.RECENT_KEYS">
+      <recent name="$PROJECT_DIR$/kyu7" />
+      <recent name="$PROJECT_DIR$/kyu6" />
+    </key>
+  </component>
+  <component name="RunManager" selected="PHPUnit.7 Count the divisors">
+    <configuration name="countthedivisors.php" type="PhpLocalRunConfigurationType" factoryName="PHP Console" temporary="true" path="$PROJECT_DIR$/counthedivisors/countthedivisors.php">
+      <method v="2" />
+    </configuration>
+    <list>
+      <item itemvalue="PHP Script.countthedivisors.php" />
+      <item itemvalue="PHPUnit.7 Count the divisors" />
+      <item itemvalue="PHPUnit.8 Are the the same" />
+    </list>
+    <recent_temporary>
+      <list>
+        <item itemvalue="PHP Script.countthedivisors.php" />
+      </list>
+    </recent_temporary>
+  </component>
+  <component name="ServiceViewManager">
+    <option name="viewStates">
+      <list>
+        <serviceView>
+          <treeState>
+            <expand />
+            <select />
+          </treeState>
+        </serviceView>
+      </list>
+    </option>
+  </component>
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="Default task">
+      <changelist id="4dbf7897-7552-490b-b266-845b385e4550" name="Default Changelist" comment="" />
+      <created>1579702666574</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1579702666574</updated>
+      <workItem from="1579702668542" duration="6025000" />
+      <workItem from="1580305831734" duration="12000" />
+      <workItem from="1580305849240" duration="23000" />
+      <workItem from="1580305880657" duration="28000" />
+      <workItem from="1580305931255" duration="88000" />
+    </task>
+    <servers />
+  </component>
+  <component name="TypeScriptGeneratedFilesManager">
+    <option name="version" value="1" />
+  </component>
+  <component name="WindowStateProjectService">
+    <state x="493" y="191" key="#8_Are_the_the_same" timestamp="1579703344853">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state x="493" y="191" key="#8_Are_the_the_same/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579703344852" />
+    <state x="428" y="199" key="#CLI_Interpreters" timestamp="1579703342959">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state x="428" y="199" key="#CLI_Interpreters/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579703342959" />
+    <state x="514" y="127" key="#PHP" timestamp="1579703299947">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state x="514" y="127" key="#PHP/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579703299947" />
+    <state x="428" y="200" key="#Test_Frameworks" timestamp="1579703629705">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state x="428" y="200" key="#Test_Frameworks/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579703629704" />
+    <state x="304" y="200" width="1071" height="740" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1579713560676">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state x="304" y="200" width="1071" height="740" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579713560676" />
+    <state x="100" y="123" width="1480" height="827" key="#com.intellij.execution.junit2.states.ComparisonFailureState$DiffDialog" timestamp="1579703802073">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state x="100" y="123" width="1480" height="827" key="#com.intellij.execution.junit2.states.ComparisonFailureState$DiffDialog/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579703802073" />
+    <state x="581" y="31" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog" timestamp="1579713482085">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state x="581" y="31" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579713482085" />
+    <state width="1638" height="345" key="GridCell.Tab.0.bottom" timestamp="1579715573122">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state width="1638" height="345" key="GridCell.Tab.0.bottom/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579715573122" />
+    <state width="1638" height="345" key="GridCell.Tab.0.center" timestamp="1579715573121">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state width="1638" height="345" key="GridCell.Tab.0.center/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579715573121" />
+    <state width="1638" height="345" key="GridCell.Tab.0.left" timestamp="1579715573120">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state width="1638" height="345" key="GridCell.Tab.0.left/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579715573120" />
+    <state width="1638" height="345" key="GridCell.Tab.0.right" timestamp="1579715573122">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state width="1638" height="345" key="GridCell.Tab.0.right/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579715573122" />
+    <state width="1638" height="345" key="GridCell.Tab.1.bottom" timestamp="1579715573123">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state width="1638" height="345" key="GridCell.Tab.1.bottom/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579715573123" />
+    <state width="1638" height="345" key="GridCell.Tab.1.center" timestamp="1579715573123">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state width="1638" height="345" key="GridCell.Tab.1.center/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579715573123" />
+    <state width="1638" height="345" key="GridCell.Tab.1.left" timestamp="1579715573122">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state width="1638" height="345" key="GridCell.Tab.1.left/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579715573122" />
+    <state width="1638" height="345" key="GridCell.Tab.1.right" timestamp="1579715573123">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state width="1638" height="345" key="GridCell.Tab.1.right/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579715573123" />
+    <state x="661" y="470" key="NewPhpFileDialog" timestamp="1579712472765">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state x="661" y="470" key="NewPhpFileDialog/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579712472765" />
+    <state x="349" y="175" key="SettingsEditor" timestamp="1579713540401">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state x="349" y="175" key="SettingsEditor/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579713540401" />
+    <state x="496" y="371" key="com.intellij.ide.util.TipDialog" timestamp="1580305881277">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state x="496" y="371" key="com.intellij.ide.util.TipDialog/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1580305881277" />
+    <state x="606" y="207" key="com.jetbrains.php.test.PhpNewTestDialog" timestamp="1579713178459">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state x="606" y="207" key="com.jetbrains.php.test.PhpNewTestDialog/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579713178459" />
+    <state width="1039" height="471" key="javadoc.popup.new" timestamp="1579713798239">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state width="1039" height="471" key="javadoc.popup.new/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579713798239" />
+    <state x="505" y="250" width="670" height="676" key="search.everywhere.popup" timestamp="1579712652226">
+      <screen x="0" y="23" width="1680" height="1027" />
+    </state>
+    <state x="505" y="250" width="670" height="676" key="search.everywhere.popup/0.23.1680.1027/-135.-1177.1920.1177@0.23.1680.1027" timestamp="1579712652226" />
+  </component>
+  <component name="com.intellij.coverage.CoverageDataManagerImpl">
+    <SUITE FILE_PATH="coverage/PHP@8_Are_the_the_same.xml" NAME="8 Are the the same Coverage Results" MODIFIED="1579704010273" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="PhpCoverage" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
+  </component>
+</project>

+ 16 - 0
php/composer.json

@@ -0,0 +1,16 @@
+{
+    "name": "fgm/codewars",
+    "type": "project",
+    "require-dev": {
+        "phpunit/phpunit": "8.5.x-dev"
+    },
+    "license": "GPL-3",
+    "authors": [
+        {
+            "name": "Frederic G. MARAND",
+            "email": "fgm@osinet.fr"
+        }
+    ],
+    "minimum-stability": "dev",
+    "require": {}
+}

+ 1540 - 0
php/composer.lock

@@ -0,0 +1,1540 @@
+{
+    "_readme": [
+        "This file locks the dependencies of your project to a known state",
+        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
+        "This file is @generated automatically"
+    ],
+    "content-hash": "85265ebf326ed06cda05cacb3f16e3ca",
+    "packages": [],
+    "packages-dev": [
+        {
+            "name": "doctrine/instantiator",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/doctrine/instantiator.git",
+                "reference": "6a1471ddbf2f448b35f3a8e390c903435e6dd5de"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/doctrine/instantiator/zipball/6a1471ddbf2f448b35f3a8e390c903435e6dd5de",
+                "reference": "6a1471ddbf2f448b35f3a8e390c903435e6dd5de",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1"
+            },
+            "require-dev": {
+                "doctrine/coding-standard": "^6.0",
+                "ext-pdo": "*",
+                "ext-phar": "*",
+                "phpbench/phpbench": "^0.13",
+                "phpstan/phpstan-phpunit": "^0.11",
+                "phpstan/phpstan-shim": "^0.11",
+                "phpunit/phpunit": "^7.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.4.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Marco Pivetta",
+                    "email": "ocramius@gmail.com",
+                    "homepage": "http://ocramius.github.com/"
+                }
+            ],
+            "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
+            "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
+            "keywords": [
+                "constructor",
+                "instantiate"
+            ],
+            "time": "2019-12-23T19:18:31+00:00"
+        },
+        {
+            "name": "myclabs/deep-copy",
+            "version": "1.x-dev",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/myclabs/DeepCopy.git",
+                "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef",
+                "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1"
+            },
+            "replace": {
+                "myclabs/deep-copy": "self.version"
+            },
+            "require-dev": {
+                "doctrine/collections": "^1.0",
+                "doctrine/common": "^2.6",
+                "phpunit/phpunit": "^7.1"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "DeepCopy\\": "src/DeepCopy/"
+                },
+                "files": [
+                    "src/DeepCopy/deep_copy.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "description": "Create deep copies (clones) of your objects",
+            "keywords": [
+                "clone",
+                "copy",
+                "duplicate",
+                "object",
+                "object graph"
+            ],
+            "time": "2020-01-17T21:11:47+00:00"
+        },
+        {
+            "name": "phar-io/manifest",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phar-io/manifest.git",
+                "reference": "3d94e3b6eb309e921a100a4992f72314299bb03f"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phar-io/manifest/zipball/3d94e3b6eb309e921a100a4992f72314299bb03f",
+                "reference": "3d94e3b6eb309e921a100a4992f72314299bb03f",
+                "shasum": ""
+            },
+            "require": {
+                "ext-dom": "*",
+                "ext-phar": "*",
+                "ext-xmlwriter": "*",
+                "phar-io/version": "^2.0",
+                "php": "^7.2"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^8.2"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Arne Blankerts",
+                    "email": "arne@blankerts.de",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Sebastian Heuer",
+                    "email": "sebastian@phpeople.de",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "Developer"
+                }
+            ],
+            "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
+            "time": "2019-12-29T10:29:09+00:00"
+        },
+        {
+            "name": "phar-io/version",
+            "version": "2.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phar-io/version.git",
+                "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6",
+                "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.6 || ^7.0"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Arne Blankerts",
+                    "email": "arne@blankerts.de",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Sebastian Heuer",
+                    "email": "sebastian@phpeople.de",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "Developer"
+                }
+            ],
+            "description": "Library for handling version information and constraints",
+            "time": "2018-07-08T19:19:57+00:00"
+        },
+        {
+            "name": "phpdocumentor/reflection-common",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
+                "reference": "b0843c8cbcc2dc5eda5158e583c7199a5e44c86d"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/b0843c8cbcc2dc5eda5158e583c7199a5e44c86d",
+                "reference": "b0843c8cbcc2dc5eda5158e583c7199a5e44c86d",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~6"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "phpDocumentor\\Reflection\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Jaap van Otterdijk",
+                    "email": "opensource@ijaap.nl"
+                }
+            ],
+            "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
+            "homepage": "http://www.phpdoc.org",
+            "keywords": [
+                "FQSEN",
+                "phpDocumentor",
+                "phpdoc",
+                "reflection",
+                "static analysis"
+            ],
+            "time": "2019-12-20T12:45:35+00:00"
+        },
+        {
+            "name": "phpdocumentor/reflection-docblock",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
+                "reference": "cf16f630f2211d388b8d254bf2ea936c232b3cb4"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cf16f630f2211d388b8d254bf2ea936c232b3cb4",
+                "reference": "cf16f630f2211d388b8d254bf2ea936c232b3cb4",
+                "shasum": ""
+            },
+            "require": {
+                "ext-filter": "^7.1",
+                "php": "^7.2",
+                "phpdocumentor/reflection-common": "^2.0",
+                "phpdocumentor/type-resolver": "^1.0",
+                "webmozart/assert": "^1"
+            },
+            "require-dev": {
+                "doctrine/instantiator": "^1",
+                "mockery/mockery": "^1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "phpDocumentor\\Reflection\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Mike van Riel",
+                    "email": "me@mikevanriel.com"
+                },
+                {
+                    "name": "Jaap van Otterdijk",
+                    "email": "account@ijaap.nl"
+                }
+            ],
+            "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
+            "time": "2020-01-16T08:49:07+00:00"
+        },
+        {
+            "name": "phpdocumentor/type-resolver",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpDocumentor/TypeResolver.git",
+                "reference": "28517b98024f4d578e7a0774fa4a73ca2a73c724"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/28517b98024f4d578e7a0774fa4a73ca2a73c724",
+                "reference": "28517b98024f4d578e7a0774fa4a73ca2a73c724",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.2",
+                "phpdocumentor/reflection-common": "^2.0"
+            },
+            "require-dev": {
+                "ext-tokenizer": "^7.2",
+                "mockery/mockery": "~1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "phpDocumentor\\Reflection\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Mike van Riel",
+                    "email": "me@mikevanriel.com"
+                }
+            ],
+            "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
+            "time": "2019-12-27T21:51:48+00:00"
+        },
+        {
+            "name": "phpspec/prophecy",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpspec/prophecy.git",
+                "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b4400efc9d206e83138e2bb97ed7f5b14b831cd9",
+                "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9",
+                "shasum": ""
+            },
+            "require": {
+                "doctrine/instantiator": "^1.0.2",
+                "php": "^5.3|^7.0",
+                "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
+                "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0",
+                "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0"
+            },
+            "require-dev": {
+                "phpspec/phpspec": "^2.5 || ^3.2",
+                "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.10.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Prophecy\\": "src/Prophecy"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Konstantin Kudryashov",
+                    "email": "ever.zet@gmail.com",
+                    "homepage": "http://everzet.com"
+                },
+                {
+                    "name": "Marcello Duarte",
+                    "email": "marcello.duarte@gmail.com"
+                }
+            ],
+            "description": "Highly opinionated mocking framework for PHP 5.3+",
+            "homepage": "https://github.com/phpspec/prophecy",
+            "keywords": [
+                "Double",
+                "Dummy",
+                "fake",
+                "mock",
+                "spy",
+                "stub"
+            ],
+            "time": "2020-01-20T15:57:02+00:00"
+        },
+        {
+            "name": "phpunit/php-code-coverage",
+            "version": "7.0.10",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
+                "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf",
+                "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf",
+                "shasum": ""
+            },
+            "require": {
+                "ext-dom": "*",
+                "ext-xmlwriter": "*",
+                "php": "^7.2",
+                "phpunit/php-file-iterator": "^2.0.2",
+                "phpunit/php-text-template": "^1.2.1",
+                "phpunit/php-token-stream": "^3.1.1",
+                "sebastian/code-unit-reverse-lookup": "^1.0.1",
+                "sebastian/environment": "^4.2.2",
+                "sebastian/version": "^2.0.1",
+                "theseer/tokenizer": "^1.1.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^8.2.2"
+            },
+            "suggest": {
+                "ext-xdebug": "^2.7.2"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "7.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
+            "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
+            "keywords": [
+                "coverage",
+                "testing",
+                "xunit"
+            ],
+            "time": "2019-11-20T13:55:58+00:00"
+        },
+        {
+            "name": "phpunit/php-file-iterator",
+            "version": "2.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
+                "reference": "050bedf145a257b1ff02746c31894800e5122946"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946",
+                "reference": "050bedf145a257b1ff02746c31894800e5122946",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "FilterIterator implementation that filters files based on a list of suffixes.",
+            "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
+            "keywords": [
+                "filesystem",
+                "iterator"
+            ],
+            "time": "2018-09-13T20:33:42+00:00"
+        },
+        {
+            "name": "phpunit/php-text-template",
+            "version": "1.2.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-text-template.git",
+                "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+                "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Simple template engine.",
+            "homepage": "https://github.com/sebastianbergmann/php-text-template/",
+            "keywords": [
+                "template"
+            ],
+            "time": "2015-06-21T13:50:34+00:00"
+        },
+        {
+            "name": "phpunit/php-timer",
+            "version": "2.1.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-timer.git",
+                "reference": "1038454804406b0b5f5f520358e78c1c2f71501e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e",
+                "reference": "1038454804406b0b5f5f520358e78c1c2f71501e",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^7.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.1-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Utility class for timing",
+            "homepage": "https://github.com/sebastianbergmann/php-timer/",
+            "keywords": [
+                "timer"
+            ],
+            "time": "2019-06-07T04:22:29+00:00"
+        },
+        {
+            "name": "phpunit/php-token-stream",
+            "version": "3.1.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-token-stream.git",
+                "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff",
+                "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff",
+                "shasum": ""
+            },
+            "require": {
+                "ext-tokenizer": "*",
+                "php": "^7.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^7.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.1-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Wrapper around PHP's tokenizer extension.",
+            "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
+            "keywords": [
+                "tokenizer"
+            ],
+            "time": "2019-09-17T06:23:10+00:00"
+        },
+        {
+            "name": "phpunit/phpunit",
+            "version": "8.5.x-dev",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/phpunit.git",
+                "reference": "e862ccf15d44cccf68cfcbaa1767bcef1efb1e94"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e862ccf15d44cccf68cfcbaa1767bcef1efb1e94",
+                "reference": "e862ccf15d44cccf68cfcbaa1767bcef1efb1e94",
+                "shasum": ""
+            },
+            "require": {
+                "doctrine/instantiator": "^1.2.0",
+                "ext-dom": "*",
+                "ext-json": "*",
+                "ext-libxml": "*",
+                "ext-mbstring": "*",
+                "ext-xml": "*",
+                "ext-xmlwriter": "*",
+                "myclabs/deep-copy": "^1.9.1",
+                "phar-io/manifest": "^1.0.3",
+                "phar-io/version": "^2.0.1",
+                "php": "^7.2",
+                "phpspec/prophecy": "^1.8.1",
+                "phpunit/php-code-coverage": "^7.0.7",
+                "phpunit/php-file-iterator": "^2.0.2",
+                "phpunit/php-text-template": "^1.2.1",
+                "phpunit/php-timer": "^2.1.2",
+                "sebastian/comparator": "^3.0.2",
+                "sebastian/diff": "^3.0.2",
+                "sebastian/environment": "^4.2.2",
+                "sebastian/exporter": "^3.1.1",
+                "sebastian/global-state": "^3.0.0",
+                "sebastian/object-enumerator": "^3.0.3",
+                "sebastian/resource-operations": "^2.0.1",
+                "sebastian/type": "^1.1.3",
+                "sebastian/version": "^2.0.1"
+            },
+            "require-dev": {
+                "ext-pdo": "*"
+            },
+            "suggest": {
+                "ext-soap": "*",
+                "ext-xdebug": "*",
+                "phpunit/php-invoker": "^2.0.0"
+            },
+            "bin": [
+                "phpunit"
+            ],
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "8.5-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "The PHP Unit Testing framework.",
+            "homepage": "https://phpunit.de/",
+            "keywords": [
+                "phpunit",
+                "testing",
+                "xunit"
+            ],
+            "time": "2020-01-22T09:35:48+00:00"
+        },
+        {
+            "name": "sebastian/code-unit-reverse-lookup",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
+                "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
+                "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.6 || ^7.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^5.7 || ^6.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Looks up which function or method a line of code belongs to",
+            "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
+            "time": "2017-03-04T06:30:41+00:00"
+        },
+        {
+            "name": "sebastian/comparator",
+            "version": "3.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/comparator.git",
+                "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da",
+                "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1",
+                "sebastian/diff": "^3.0",
+                "sebastian/exporter": "^3.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Jeff Welch",
+                    "email": "whatthejeff@gmail.com"
+                },
+                {
+                    "name": "Volker Dusch",
+                    "email": "github@wallbash.com"
+                },
+                {
+                    "name": "Bernhard Schussek",
+                    "email": "bschussek@2bepublished.at"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Provides the functionality to compare PHP values for equality",
+            "homepage": "https://github.com/sebastianbergmann/comparator",
+            "keywords": [
+                "comparator",
+                "compare",
+                "equality"
+            ],
+            "time": "2018-07-12T15:12:46+00:00"
+        },
+        {
+            "name": "sebastian/diff",
+            "version": "3.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/diff.git",
+                "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
+                "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^7.5 || ^8.0",
+                "symfony/process": "^2 || ^3.3 || ^4"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Kore Nordmann",
+                    "email": "mail@kore-nordmann.de"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Diff implementation",
+            "homepage": "https://github.com/sebastianbergmann/diff",
+            "keywords": [
+                "diff",
+                "udiff",
+                "unidiff",
+                "unified diff"
+            ],
+            "time": "2019-02-04T06:01:07+00:00"
+        },
+        {
+            "name": "sebastian/environment",
+            "version": "4.2.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/environment.git",
+                "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368",
+                "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^7.5"
+            },
+            "suggest": {
+                "ext-posix": "*"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "4.2-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Provides functionality to handle HHVM/PHP environments",
+            "homepage": "http://www.github.com/sebastianbergmann/environment",
+            "keywords": [
+                "Xdebug",
+                "environment",
+                "hhvm"
+            ],
+            "time": "2019-11-20T08:46:58+00:00"
+        },
+        {
+            "name": "sebastian/exporter",
+            "version": "3.1.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/exporter.git",
+                "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e",
+                "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.0",
+                "sebastian/recursion-context": "^3.0"
+            },
+            "require-dev": {
+                "ext-mbstring": "*",
+                "phpunit/phpunit": "^6.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.1.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                },
+                {
+                    "name": "Jeff Welch",
+                    "email": "whatthejeff@gmail.com"
+                },
+                {
+                    "name": "Volker Dusch",
+                    "email": "github@wallbash.com"
+                },
+                {
+                    "name": "Adam Harvey",
+                    "email": "aharvey@php.net"
+                },
+                {
+                    "name": "Bernhard Schussek",
+                    "email": "bschussek@gmail.com"
+                }
+            ],
+            "description": "Provides the functionality to export PHP variables for visualization",
+            "homepage": "http://www.github.com/sebastianbergmann/exporter",
+            "keywords": [
+                "export",
+                "exporter"
+            ],
+            "time": "2019-09-14T09:02:43+00:00"
+        },
+        {
+            "name": "sebastian/global-state",
+            "version": "3.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/global-state.git",
+                "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4",
+                "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.2",
+                "sebastian/object-reflector": "^1.1.1",
+                "sebastian/recursion-context": "^3.0"
+            },
+            "require-dev": {
+                "ext-dom": "*",
+                "phpunit/phpunit": "^8.0"
+            },
+            "suggest": {
+                "ext-uopz": "*"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Snapshotting of global state",
+            "homepage": "http://www.github.com/sebastianbergmann/global-state",
+            "keywords": [
+                "global state"
+            ],
+            "time": "2019-02-01T05:30:01+00:00"
+        },
+        {
+            "name": "sebastian/object-enumerator",
+            "version": "3.0.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/object-enumerator.git",
+                "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5",
+                "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.0",
+                "sebastian/object-reflector": "^1.1.1",
+                "sebastian/recursion-context": "^3.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^6.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Traverses array structures and object graphs to enumerate all referenced objects",
+            "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
+            "time": "2017-08-03T12:35:26+00:00"
+        },
+        {
+            "name": "sebastian/object-reflector",
+            "version": "1.1.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/object-reflector.git",
+                "reference": "773f97c67f28de00d397be301821b06708fca0be"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be",
+                "reference": "773f97c67f28de00d397be301821b06708fca0be",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^6.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.1-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Allows reflection of object attributes, including inherited and non-public ones",
+            "homepage": "https://github.com/sebastianbergmann/object-reflector/",
+            "time": "2017-03-29T09:07:27+00:00"
+        },
+        {
+            "name": "sebastian/recursion-context",
+            "version": "3.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/recursion-context.git",
+                "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
+                "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^6.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Jeff Welch",
+                    "email": "whatthejeff@gmail.com"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                },
+                {
+                    "name": "Adam Harvey",
+                    "email": "aharvey@php.net"
+                }
+            ],
+            "description": "Provides functionality to recursively process PHP variables",
+            "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
+            "time": "2017-03-03T06:23:57+00:00"
+        },
+        {
+            "name": "sebastian/resource-operations",
+            "version": "2.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/resource-operations.git",
+                "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9",
+                "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Provides a list of PHP built-in functions that operate on resources",
+            "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
+            "time": "2018-10-04T04:07:39+00:00"
+        },
+        {
+            "name": "sebastian/type",
+            "version": "1.1.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/type.git",
+                "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3",
+                "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.2"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^8.2"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.1-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Collection of value objects that represent the types of the PHP type system",
+            "homepage": "https://github.com/sebastianbergmann/type",
+            "time": "2019-07-02T08:10:15+00:00"
+        },
+        {
+            "name": "sebastian/version",
+            "version": "2.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/version.git",
+                "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
+                "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.6"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Library that helps with managing the version number of Git-hosted PHP projects",
+            "homepage": "https://github.com/sebastianbergmann/version",
+            "time": "2016-10-03T07:35:21+00:00"
+        },
+        {
+            "name": "symfony/polyfill-ctype",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-ctype.git",
+                "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38",
+                "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "suggest": {
+                "ext-ctype": "For best performance"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.14-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Ctype\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Gert de Pagter",
+                    "email": "BackEndTea@gmail.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill for ctype functions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "ctype",
+                "polyfill",
+                "portable"
+            ],
+            "time": "2020-01-13T11:15:53+00:00"
+        },
+        {
+            "name": "theseer/tokenizer",
+            "version": "1.1.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/theseer/tokenizer.git",
+                "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
+                "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
+                "shasum": ""
+            },
+            "require": {
+                "ext-dom": "*",
+                "ext-tokenizer": "*",
+                "ext-xmlwriter": "*",
+                "php": "^7.0"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Arne Blankerts",
+                    "email": "arne@blankerts.de",
+                    "role": "Developer"
+                }
+            ],
+            "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
+            "time": "2019-06-13T22:48:21+00:00"
+        },
+        {
+            "name": "webmozart/assert",
+            "version": "1.6.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/webmozart/assert.git",
+                "reference": "573381c0a64f155a0d9a23f4b0c797194805b925"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925",
+                "reference": "573381c0a64f155a0d9a23f4b0c797194805b925",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.3.3 || ^7.0",
+                "symfony/polyfill-ctype": "^1.8"
+            },
+            "conflict": {
+                "vimeo/psalm": "<3.6.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^4.8.36 || ^7.5.13"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Webmozart\\Assert\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Bernhard Schussek",
+                    "email": "bschussek@gmail.com"
+                }
+            ],
+            "description": "Assertions to validate method input/output with nice error messages.",
+            "keywords": [
+                "assert",
+                "check",
+                "validate"
+            ],
+            "time": "2019-11-24T13:36:37+00:00"
+        }
+    ],
+    "aliases": [],
+    "minimum-stability": "dev",
+    "stability-flags": {
+        "phpunit/phpunit": 20
+    },
+    "prefer-stable": false,
+    "prefer-lowest": false,
+    "platform": [],
+    "platform-dev": []
+}

+ 80 - 0
php/kyu6/aretheythesame/Test.php

@@ -0,0 +1,80 @@
+<?php
+declare(strict_types=1);
+
+use PHPUnit\Framework\TestCase;
+
+require_once __DIR__ . "/aretheythesame.php";
+
+class Check {
+
+  /**
+   * @var string
+   */
+  public $name;
+
+  /**
+   * @var array
+   */
+  public $one;
+
+  /**
+   * @var array
+   */
+  public $two;
+
+  /**
+   * @var bool
+   */
+  public $expected;
+
+  public function __construct(string $name, array $a, $b, bool $expected) {
+    $this->one = $a;
+    $this->two = $b;
+    $this->expected = $expected;
+    $this->name = $name;
+  }
+}
+
+class TestCompCase extends TestCase {
+
+  function testComp() {
+    $checks = [
+      new Check(
+        "Good",
+        [121, 144, 19, 161, 19, 144, 19, 11],
+        [121, 14641, 20736, 361, 25921, 361, 20736, 361],
+        true
+      ),
+      new Check(
+        "132 is not 11^2",
+        [121, 144, 19, 161, 19, 144, 19, 11],
+        [132, 14641, 20736, 361, 25921, 361, 20736, 361],
+        false
+      ),
+      new Check(
+        "36100 is not the square of any member of a",
+        [121, 144, 19, 161, 19, 144, 19, 11],
+        [121, 14641, 20736, 36100, 25921, 361, 20736, 361],
+        false
+      ),
+      new Check(
+        "Bad pair",
+        [4, 4],
+        [1, 31],
+        false
+      ),
+      new Check(
+        "Empty and null",
+        [],
+        NULL,
+        false
+      )
+    ];
+
+    /** @var \Check $check */
+    foreach ($checks as $check) {
+      $actual = comp($check->one, $check->two);
+    }
+    $this->assertEquals($check->expected, $actual, $check->name);
+  }
+}

+ 17 - 0
php/kyu6/aretheythesame/aretheythesame.php

@@ -0,0 +1,17 @@
+<?php
+
+function comp($a = [], $b = []): bool {
+  // Protect against degenerate cases using invalid arguments.
+  if (gettype($a) !== gettype($b) || count($a) != count($b)) {
+    return false;
+  }
+  sort($a);
+  sort($b);
+  for ($i = 0; $i < count($a); $i++) {
+    $x = $a[$i]*$a[$i];
+    if ($x != $b[$i]) {
+      return false;
+    }
+  }
+  return true;
+}

+ 23 - 0
php/kyu7/counthedivisors/TestDivisorsCase.php

@@ -0,0 +1,23 @@
+<?php
+
+use PHPUnit\Framework\TestCase;
+
+require_once __DIR__ . "/countthedivisors.php";
+
+class TestDivisorsCase extends TestCase {
+  public function testCountTheDivisors() {
+    $checks = [
+      [1, 1], // 1
+      [4, 3], // 1, 2, 4
+      [12, 6], // 1, 2, 3, 4, 6, 12
+      [30, 8], // 1, 2, 3, 5, 6, 10, 15, 30
+      [500000, 42],
+    ];
+
+    foreach ($checks as $check) {
+      $expected = $check[1];
+      $actual = divisors($check[0]);
+      $this->assertEquals($expected, $actual, $check[0]);
+    }
+  }
+}

+ 21 - 0
php/kyu7/counthedivisors/countthedivisors.php

@@ -0,0 +1,21 @@
+<?php
+
+function divisors($n) {
+  // Shortcut evaluation for 1.
+  if ($n === 1) {
+    return 1;
+  }
+  $candidates = range(2, (int) ceil(sqrt($n)));
+
+  $curr = $n;
+  $divs = [1, $curr];
+  while ($candidates) {
+    $candidate = array_shift($candidates);
+    if ($curr % $candidate == 0) {
+      $divs[$candidate] = $candidate;
+      $other = $curr / $candidate;
+      $divs[$other] = $other;
+    }
+  }
+  return count($divs);
+}