code: public function filter($tag = null, $target = TimePoint::TARGET_ALL, $type = TimePoint::TYPE_ALL)
      {
          // the tag criteria can be omitted
          $tags = null;
          if (isset($tag)) {
              $tags = is_array($tag) ? $tag : [$tag];
          }
          
          // create a another instance of the same class
          $subset = new static();
          
          // fill the new instance with filtered TimePoint
          foreach ($this->points as $idx => $point) {
              if ($point->match($tags, $target, $type)) {
                  $subset->add($point);
              }
          }
  
          return $subset;
      }
docs: Gets a filtered TimeLine, containing the TimePoint corresponding to the provided criteria
  @param string|array $tag A tag or a list of tags to filter
  @param int $target The type of target TimePoint to filter
  @param int $type The type of TimePoint to filter
  @return TimeLine Returns a subset corresponding to the found TimePoints