/**
  * @param string $content
  *
  * @return array
  */
 public function parse($content)
 {
     if (!$content) {
         return [];
     }
     if (strpos($content, '@validator') === false) {
         return [];
     }
     $validatorSet = [];
     if (preg_match_all(self::ANNOTATION_PATTERN, $content, $matches)) {
         $typeBoolean = new InterpreterTypeBoolean();
         // simplify the matches and return only the parameter list
         $set = [];
         foreach ($matches[1] as $validator) {
             // if there is no validator name why even bother
             if (preg_match(self::VALIDATOR_NAME_PATTERN, $validator, $match)) {
                 $set[self::INDEX_INTERFACE] = $match[1];
             } else {
                 continue;
             }
             if (preg_match(self::VALIDATOR_OPERATOR_PATTERN, $validator, $match)) {
                 $set[self::INDEX_OPERATOR] = $match[1];
             } else {
                 $set[self::INDEX_OPERATOR] = self::DEFAULT_OPERATOR;
             }
             if (preg_match(self::VALIDATOR_MANDATORY_PATTERN, $validator, $match)) {
                 $set[self::INDEX_MANDATORY] = $typeBoolean->execute($match[1]);
             } else {
                 $set[self::INDEX_MANDATORY] = self::DEFAULT_MANDATORY;
             }
             if (preg_match(self::VALIDATOR_EXPECTATION_PATTERN, $validator, $match)) {
                 $set[self::INDEX_EXPECTED] = $typeBoolean->execute($match[1]);
             } else {
                 $set[self::INDEX_EXPECTED] = self::DEFAULT_EXPECTATION;
             }
             // add the set
             if ($set) {
                 array_push($validatorSet, $set);
             }
         }
     }
     return $validatorSet;
 }
 /**
  * @test
  */
 public function checkIfTheStringTrueFriendsGetsInterpretedAsBooleanTrue()
 {
     $type = new InterpreterTypeBoolean();
     self::assertNull($type->execute('TrueFriends'));
 }