go back

Programista Backend (PHP)

class NovamediaCandidate{

    private $desiredSkills = ['php', 'python', 'angularjs'];

    private $firstName;
    private $lastName;
    private $knownLanguages;

    public function __construct($firstName, $lastName, array $knownLanguages){
        $this->firstName = $firstName;
        $this->lastName = $lastName;
        $this->knownLanguages = $knownLanguages;

    public function begin(){
        $counter = 0;
        foreach($this->knownLanguages as $key=>$value){
            if(in_array(strtolower($value), $this->desiredSkills)){

        if ($counter > 0){
            $output = "You are the one we are looking for. Welcome !";
            $output = "Leave your CV, and keep in touch with us. We will be waiting for you soon.";

        return $output;
Are you the one we are looking for?