original_string: public function checkNodeOrSave($path, $alias, $parentId = null) {
          $node = $this->Aco->node($path);
          if ($node === false) {
              $data = [
                  'parent_id' => $parentId,
                  'model' => null,
                  'alias' => $alias,
              ];
              $entity = $this->Aco->newEntity($data);
              $node = $this->Aco->save($entity);
              return $node;
          }
          return $node->first();
      }
code: public function checkNodeOrSave($path, $alias, $parentId = null) {
          $node = $this->Aco->node($path);
          if ($node === false) {
              $data = [
                  'parent_id' => $parentId,
                  'model' => null,
                  'alias' => $alias,
              ];
              $entity = $this->Aco->newEntity($data);
              $node = $this->Aco->save($entity);
              return $node;
          }
          return $node->first();
      }
code_tokens: public function checkNodeOrSave ( $ path , $ alias , $ parentId = null ) { $ node = $ this -> Aco -> node ( $ path ) ; if ( $ node === false ) { $ data = [ 'parent_id' => $ parentId , 'model' => null , 'alias' => $ alias , ] ; $ entity = $ this -> Aco -> newEntity ( $ data ) ; $ node = $ this -> Aco -> save ( $ entity ) ; return $ node ; } return $ node -> first ( ) ; }
docstring: Check if the aco exist and store it if empty
  
  @param string $path     the path like App/Admin/Admin/home
  @param string $alias    the name of the alias like home
  @param null   $parentId the parent id
  
  @return object
docstring_tokens: Check if the aco exist and store it if empty