@param string $earlyInternCompleted

@return Education
773399
public function setEarlyInternCompleted($earlyInternCompleted)
    {
        if (
                !is_string($earlyInternCompleted)
             && !is_null($earlyInternCompleted)
        ) {
            throw new \InvalidArgumentException(
                __CLASS__ . ' ' . __METHOD__ . ': Not a string'
            );
        }

        $this->earlyInternCompleted = $earlyInternCompleted;

        return $this;
    }
112438
public function checkInterfaceImplements(self $classDefinition, self $interfaceDefinition)
    {
        foreach ($interfaceDefinition->getMethods() as $method) {
            if (!$classDefinition->hasMethod($method->getName())) {
                throw new CompilerException(
                    sprintf(
                        'Class %s must implement a method called: "%s" as requirement of interface: "%s"',
                        $classDefinition->getCompleteName(),
                        $method->getName(),
                        $interfaceDefinition->getCompleteName()
                    )
                );
            }

            if (!$method->hasParameters()) {
                continue;
            }

            $implementedMethod = $classDefinition->getMethod($method->getName());
            if ($implementedMethod->getNumberOfRequiredParameters() > $method->getNumberOfRequiredParameters() ||
                $implementedMethod->getNumberOfParameters() < $method->getNumberOfParameters()
            ) {
                throw new CompilerException(
                    sprintf(
                        'Method %s::%s() does not have the same number of required parameters in interface: "%s"',
                        $classDefinition->getCompleteName(),
                        $method->getName(),
                        $interfaceDefinition->getCompleteName()
                    )
                );
            }
        }
    }
100644
public function finish( $class = "ezcMail" )
    {
        $mail = new $class();
        $mail->setHeaders( $this->headers->getCaseSensitiveArray() );
        ezcMailPartParser::parsePartHeaders( $this->headers, $mail );

        // from
        if ( isset( $this->headers['From'] ) )
        {
            $mail->from = ezcMailTools::parseEmailAddress( $this->headers['From'] );
        }
        // to
        if ( isset( $this->headers['To'] ) )
        {
            $mail->to = ezcMailTools::parseEmailAddresses( $this->headers['To'] );
        }
        // cc
        if ( isset( $this->headers['Cc'] ) )
        {
            $mail->cc = ezcMailTools::parseEmailAddresses( $this->headers['Cc'] );
        }
        // bcc
        if ( isset( $this->headers['Bcc'] ) )
        {
            $mail->bcc = ezcMailTools::parseEmailAddresses( $this->headers['Bcc'] );
        }
        // subject
        if ( isset( $this->headers['Subject'] ) )
        {
            $mail->subject = ezcMailTools::mimeDecode( $this->headers['Subject'] );
            $mail->subjectCharset = 'utf-8';
        }
        // message ID
        if ( isset( $this->headers['Message-Id'] ) )
        {
            $mail->messageID = $this->headers['Message-Id'];
        }

        // Return-Path
        if ( isset( $this->headers['Return-Path'] ) )
        {
            $mail->returnPath = ezcMailTools::parseEmailAddress( $this->headers['Return-Path'] );
        }

        if ( $this->bodyParser !== null )
        {
            $mail->body = $this->bodyParser->finish();
        }
        return $mail;
    }
271095
public function setAutocomplete($bit = true)
    {
        $this->autocomplete = (Boolean) $bit;
        $this->setSearchProperty($bit);
        return $this;
    }
259694
public function getLocalOrParentInitMethod()
    {
        $method = $this->getInitMethod();
        if ($method) {
            $parentClassDefinition = $this->getExtendsClassDefinition();
            if ($parentClassDefinition instanceof self) {
                $method = $parentClassDefinition->getInitMethod();
                if ($method) {
                    $this->addInitMethod($method->getStatementsBlock());
                }
            }
        }

        return $method;
    }
379513
public long getCompletedPrefix()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getCompletedPrefix");
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getCompletedPrefix", Long.valueOf(_targetStream.getCompletedPrefix()));

    return _targetStream.getCompletedPrefix();
  }
478588
public static function factory($rawFeed)
    {
        $repository = new static;
        $skills     = new SkillsRepository();

        $exploded = explode("\n", $rawFeed);

        $spliced = array_splice(
            $exploded,
            0,
            $skills->count()
        );

        for ($id = 0; $id < count($spliced); $id++) {
            list($rank, $level, $experience) = explode(',', $spliced[$id]);
            $skill                           = $skills->find($id);

            $repository->push(
                new Stat(
                    $skill,
                    $level,
                    $rank,
                    $experience
                )
            );
        }

        return $repository;
    }
607719
public function fillInDrupalAutocomplete($locator, $text) {

    $session = $this->getSession();
    $el = $session->getPage()->findField($locator);

    if (empty($el)) {
      throw new ExpectationException('No such autocomplete element ' . $locator, $session);
    }

    // Set the text and trigger the autocomplete with a space keystroke.
    $el->setValue($text);

    try {
      $el->keyDown(' ');
      $el->keyUp(' ');

      // Wait for ajax.
      $this->getSession()->wait(1000, '(typeof(jQuery)=="undefined" || (0 === jQuery.active && 0 === jQuery(\':animated\').length))');
      // Wait a second, just to be sure.
      sleep(1);

      // Select the autocomplete popup with the name we are looking for.
      $popup = $session->getPage()->find('xpath', "//ul[contains(@class, 'ui-autocomplete')]/li/a[text() = '{$text}']");

      if (empty($popup)) {
        throw new ExpectationException('No such option ' . $text . ' in ' . $locator, $session);
      }

      // Clicking on the popup fills the autocomplete properly.
      $popup->click();
    }
    catch (UnsupportedDriverActionException $e) {
      // So javascript is not supported.
      // We did set the value correctly, so Drupal will figure it out.
    }

  }
311101
private function autocomplete(OutputInterface $output, Question $question, $inputStream)
    {
        $autocomplete = $question->getAutocompleterValues();
        $ret = '';

        $i = 0;
        $ofs = -1;
        $matches = $autocomplete;
        $numMatches = count($matches);

        $sttyMode = shell_exec('stty -g');

        // Disable icanon (so we can fread each keypress) and echo (we'll do echoing here instead)
        shell_exec('stty -icanon -echo');

        // Add highlighted text style
        $output->getFormatter()->setStyle('hl', new OutputFormatterStyle('black', 'white'));

        // Read a keypress
        while (!feof($inputStream)) {
            $c = fread($inputStream, 1);

            // Backspace Character
            if ("\177" === $c) {
                if (0 === $numMatches && 0 !== $i) {
                    --$i;
                    // Move cursor backwards
                    $output->write("\033[1D");
                }

                if ($i === 0) {
                    $ofs = -1;
                    $matches = $autocomplete;
                    $numMatches = count($matches);
                } else {
                    $numMatches = 0;
                }

                // Pop the last character off the end of our string
                $ret = substr($ret, 0, $i);
            } elseif ("\033" === $c) {
                // Did we read an escape sequence?
                $c .= fread($inputStream, 2);

                // A = Up Arrow. B = Down Arrow
                if (isset($c[2]) && ('A' === $c[2] || 'B' === $c[2])) {
                    if ('A' === $c[2] && -1 === $ofs) {
                        $ofs = 0;
                    }

                    if (0 === $numMatches) {
                        continue;
                    }

                    $ofs += ('A' === $c[2]) ? -1 : 1;
                    $ofs = ($numMatches + $ofs) % $numMatches;
                }
            } elseif (ord($c) < 32) {
                if ("\t" === $c || "\n" === $c) {
                    if ($numMatches > 0 && -1 !== $ofs) {
                        $ret = $matches[$ofs];
                        // Echo out remaining chars for current match
                        $output->write(substr($ret, $i));
                        $i = strlen($ret);
                    }

                    if ("\n" === $c) {
                        $output->write($c);
                        break;
                    }

                    $numMatches = 0;
                }

                continue;
            } else {
                $output->write($c);
                $ret .= $c;
                ++$i;

                $numMatches = 0;
                $ofs = 0;

                foreach ($autocomplete as $value) {
                    // If typed characters match the beginning chunk of value (e.g. [AcmeDe]moBundle)
                    if (0 === strpos($value, $ret) && $i !== strlen($value)) {
                        $matches[$numMatches++] = $value;
                    }
                }
            }

            // Erase characters from cursor to end of line
            $output->write("\033[K");

            if ($numMatches > 0 && -1 !== $ofs) {
                // Save cursor position
                $output->write("\0337");
                // Write highlighted text
                $output->write('<hl>'.substr($matches[$ofs], $i).'</hl>');
                // Restore cursor position
                $output->write("\0338");
            }
        }

        // Reset stty so it behaves normally again
        shell_exec(sprintf('stty %s', $sttyMode));

        return $ret;
    }
666849
@Override
  public <T> Completes<Optional<T>> maybeActorOf(Class<T> protocol, Address address) {
    final T typed = internalActorOf(protocol, address);
    final Optional<T> maybe = typed == null ? Optional.empty() : Optional.of(typed);
    return completes().with(maybe);
  }
144347
public ClassInfoList getClassesImplementing(final String interfaceName) {
        if (closed.get()) {
            throw new IllegalArgumentException("Cannot use a ScanResult after it has been closed");
        }
        if (!scanSpec.enableClassInfo) {
            throw new IllegalArgumentException("Please call ClassGraph#enableClassInfo() before #scan()");
        }
        final ClassInfo classInfo = classNameToClassInfo.get(interfaceName);
        return classInfo == null ? ClassInfoList.EMPTY_LIST : classInfo.getClassesImplementing();
    }
41509
public function setComplete($iRefundId, $aData = [])
    {
        $aData['status'] = self::STATUS_COMPLETE;
        return $this->update($iRefundId, $aData);
    }
340442
public function get_details($completion) {
        global $CFG, $DB;

        // Get completion info
        $course = new stdClass();
        $course->id = $completion->course;
        $info = new completion_info($course);

        $prereq = $DB->get_record('course', array('id' => $this->courseinstance));
        $coursecontext = context_course::instance($prereq->id, MUST_EXIST);
        $fullname = format_string($prereq->fullname, true, array('context' => $coursecontext));

        $prereq_info = new completion_info($prereq);

        $details = array();
        $details['type'] = $this->get_title();
        $details['criteria'] = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$this->courseinstance.'">'.s($fullname).'</a>';
        $details['requirement'] = get_string('coursecompleted', 'completion');
        $details['status'] = '<a href="'.$CFG->wwwroot.'/blocks/completionstatus/details.php?course='.$this->courseinstance.'">'.get_string('seedetails', 'completion').'</a>';

        return $details;
    }
624672
public function setCompletedOn($completed_on) {
        
        $this -> completed_on = $completed_on !== null ? new \DateTime($completed_on) : null;
        return $this;
    }
1303868
private function getContentEncryptionAlgorithm(JWEInterface $jwe)
    {
        $algorithm = null;

        foreach ($jwe->getRecipients() as $recipient) {
            $complete_headers = array_merge($jwe->getSharedProtectedHeaders(), $jwe->getSharedHeaders(), $recipient->getHeaders());
            Assertion::keyExists($complete_headers, 'enc', 'Parameter "enc" is missing.');
            if (null === $algorithm) {
                $algorithm = $complete_headers['enc'];
            } else {
                Assertion::eq($algorithm, $complete_headers['enc'], 'Foreign content encryption algorithms are not allowed.');
            }
        }

        $content_encryption_algorithm = $this->getJWAManager()->getAlgorithm($algorithm);
        Assertion::isInstanceOf($content_encryption_algorithm, Algorithm\ContentEncryptionAlgorithmInterface::class, sprintf('The content encryption algorithm "%s" is not supported or not a content encryption algorithm instance.', $algorithm));

        return $content_encryption_algorithm;
    }
1168584
public function haltQueue($early = false)
    {
        if ($early) {
            $this->haltedQueueEarly = true;
        }

        $this->haltedQueue = true;
        return $this;
    }
449971
public function peek($ahead = 1)
    {
        return $this->tokens[$this->cursor + $ahead] ?? new Token(Token::TYPE_EOF);
    }