示例#1
0
 /**
  * handle
  *
  * @param \Docit\Core\Project $project
  */
 public function handle(Project $project)
 {
     $that = $this;
     Project::macro('getPhpdocDocument', function () use($that) {
         /** @var Project $this */
         return $that->container->make(PhpdocDocument::class, ['project' => $this, 'factory' => $this->getFactory()]);
     });
 }
示例#2
0
 /**
  * handle
  *
  * @param \Docit\Core\Project $project
  */
 public function handle(Project $project)
 {
     $that = $this;
     // Add a method on the project class that creates a new GitSync for that specific project
     Project::macro('githubSync', function () {
         /** @var Project $this */
         return app('docit.hooks.github.factory')->githubSync($this);
     });
     // Add a method on the project class that creates a new GitSync for that specific project
     Project::macro('githubShow', function () use($that) {
         /** @var Project $this */
         return app('docit.hooks.github.factory')->githubShow($this);
     });
 }