code: public function init($sourceDir, array $options, $username = null)
      {
          $this->resolveOptions($options);
          $this->options = $options;
  
          $path = $this->getBaseDir($sourceDir);
          if (null === $path) {
              return $this;
          }
  
          $this->workMode = "contributor";
          $this->productionDir = $this->initProductionDir($path);
          if (null === $username) {
              $this->workMode = "production";
  
              return $this;
          }
  
          $this->contributorDir = $this->workDir = $this->initContributorDir($path, $username);
  
          return $this;
      }
docs: {@inheritdoc}