Library/Variable.php
public function setIsInitialized($initialized, CompilationContext $compilationContext)
    {
        $this->initialized = $initialized;

        if (!$initialized || !$compilationContext->branchManager instanceof BranchManager) {
            return;
        }

        $currentBranch = $compilationContext->branchManager->getCurrentBranch();

        if ($currentBranch instanceof Branch) {
            $this->initBranches[] = $currentBranch;
        }
    }
public function setIsInitialized($initialized, CompilationContext $compilationContext)
    {
        $this->initialized = $initialized;

        if (!$initialized || !$compilationContext->branchManager instanceof BranchManager) {
            return;
        }

        $currentBranch = $compilationContext->branchManager->getCurrentBranch();

        if ($currentBranch instanceof Branch) {
            $this->initBranches[] = $currentBranch;
        }
    }
public function setIsInitialized ( $ initialized , CompilationContext $ compilationContext ) { $ this -> initialized = $ initialized ; if ( ! $ initialized || ! $ compilationContext -> branchManager instanceof BranchManager ) { return ; } $ currentBranch = $ compilationContext -> branchManager -> getCurrentBranch ( ) ; if ( $ currentBranch instanceof Branch ) { $ this -> initBranches [ ] = $ currentBranch ; } }
Sets if the variable is initialized
This allow to throw an exception if the variable is being read without prior initialization.

@param bool               $initialized
@param CompilationContext $compilationContext
Sets if the variable is initialized This allow to throw an exception if the variable is being read without prior initialization .