Git Product home page Git Product logo

gcm-test-task's Introduction

Task

Generators

Create generators services which would:

  • Generate a random string from a-z0-9, e.g.: fh4r5cf1s23s
  • Generate an array of random strings from a-z0-9, e.g.: ['vbk5g6', 'i5r8b1', '6mb8us']

You should be able to set a length of the string and amount of elements in the array (for second generator only)

Converters

Create converters that would:

  • Convert strings to numeric equivalents based on characters position in the alphabet, e.g.: 6a8bcd -> 618234
  • Convert strings using ROT13 converter (https://en.wikipedia.org/wiki/ROT13)

When user visits / path in browser, we should have a loop of 10 iterations that would create random generators with random string lengths. Each generator should use random converter and output generated -> converted string pair.

E.g. The first out of 10 iterations could have the following random combination: 2nd generator generates array of 3 strings that are 4 characters length each and converts it using 1st converter. So the output should be something like this:

abcd -> 1234
8a55 -> 8155
fa12 -> 6112

Please fork out of master and create a PR when you are done.

Requirements

  • At least PHP 7.4 syntax is required (PHP 8 is preferred)
  • PSR standards
  • Use Dependency Injection if possible
  • Unit tests is a plus

gcm-test-task's People

Contributors

meevly avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.