build/ClassAnnotationUpdater.php
public function update()
    {
        // copy the code into memory
        $backup = file($this->reflection->getFileName());

        list($preamble, $class) = $this->splitClassFile($backup);
        $preamble = $this->stripOutExistingDocBlock($preamble);
        $preamble .= $this->buildUpdatedDocBlock();

        if ($this->writeClassFile(implode(PHP_EOL, [$preamble, $class]))
            && $this->commandLineLint($this->reflection->getFileName())
        ) {
            return true;
        }

        $this->writeClassFile(implode('', $backup));
        return false;
    }
public function update()
    {
        // copy the code into memory
        $backup = file($this->reflection->getFileName());

        list($preamble, $class) = $this->splitClassFile($backup);
        $preamble = $this->stripOutExistingDocBlock($preamble);
        $preamble .= $this->buildUpdatedDocBlock();

        if ($this->writeClassFile(implode(PHP_EOL, [$preamble, $class]))
            && $this->commandLineLint($this->reflection->getFileName())
        ) {
            return true;
        }

        $this->writeClassFile(implode('', $backup));
        return false;
    }
public function update ( ) { // copy the code into memory $ backup = file ( $ this -> reflection -> getFileName ( ) ) ; list ( $ preamble , $ class ) = $ this -> splitClassFile ( $ backup ) ; $ preamble = $ this -> stripOutExistingDocBlock ( $ preamble ) ; $ preamble .= $ this -> buildUpdatedDocBlock ( ) ; if ( $ this -> writeClassFile ( implode ( PHP_EOL , [ $ preamble , $ class ] ) ) && $ this -> commandLineLint ( $ this -> reflection -> getFileName ( ) ) ) { return true ; } $ this -> writeClassFile ( implode ( '' , $ backup ) ) ; return false ; }
Performs update on class file and lints the output. If the output fails
linting, the change is reverted.

@return bool TRUE on success, FALSE on failure
Performs update on class file and lints the output . If the output fails linting the change is reverted .