Get the comments for all methods.

@param integer|null $filter
@return array
515778
public function methods($filter = null)
    {
        if (is_null($filter))
        {
            $methods = $this->object->getMethods();
        }
        else
        {
            $methods = $this->object->getMethods($filter);
        }

        return array_map([$this, 'extractComment'], $methods);
    }
997156
public function countLines($filter = null)
    {
        if ($filter !== null) {
            return count($this->getLines(null, 0, $filter));
        }

        return $this->lines->count();
    }
525859
public function getFields(bool $filter = true): array
    {
        $result = [];
        foreach ($this->fields as $name => $field) {
            $result[$name] = $this->getField($name, null, $filter);
        }

        return $result;
    }
896280
public static function getOrders($filter = array())
    {
        $filter = Filter::create($filter);
        return self::getCollection('/orders' . $filter->toQuery(), 'Order');
    }
184922
public function getProperties($filter = -1)
    {
        $properties = parent::getProperties($filter);
        foreach ($properties as $key => $val) {
            $properties[$key] = new ReflectionProperty($this->getName(), $val->getName());
        }

        return $properties;
    }
286548
protected static function parseParameterFilter($filter)
	{
		list($name, $parameters) = explode(':', $filter, 2);

		return array($name, explode(',', $parameters));
	}
143189
protected function getFilterResolver(string $filter): array
    {
        $class = $filter;
        $method = 'filter';

        $position = \strpos($filter, '@');

        if ($position === 0) {
            $method = 'filter'.\ucwords(\substr($filter, 1));

            return [$this, $method];
        }

        if ($position !== false) {
            list($class, $method) = \explode('@', $filter, 2);
        }

        return $this->makeFilterResolver($class, $method);
    }
8014
public function getModules(FilterInterface $filter = null)
    {
        if ($filter !== null) {
            return $filter->filter($this->modules);
        }

        return $this->modules;
    }
137566
public function getStreams($filter = null)
	{
		if ($filter !== null)
		{
			if ( ! is_callable($filter))
			{
				$filter = function (StreamInterface $stream) use ($filter) {
					return (bool) ($filter & $stream->getType());
				};
			}
			
			$streams = clone $this->streams;
			
			foreach ($streams as $index => $stream)
			{
				if ($filter($stream) === false)
				{
					$streams->offsetUnset($index);
				}
			}
			
			return $streams;
		}
		
		return $this->streams;
	}
459996
public function getIssuesCount (ContextSpecificationInterface $filter = null)
	{
		$count = count($this->issues);

		foreach ($this->getChildren($filter) as $child)
		{
			$count += $child->getIssuesCount($filter);
		}

		return $count;
	}
1091896
public function getOwnMethods($filter = -1)
    {
        $return = $this->getMethods($filter);

        $traitMethods = $traitAliases = array();
        foreach ($this->getTraits() as $trait) {
            $traitAliases = array_merge($traitAliases, $this->getTraitAliases());
            foreach ($trait->getMethods($filter) as $method) {
                $traitMethods[] = $method->getName();
            }
        }

        $traitMethods = array_merge($traitMethods, array_keys($traitAliases));

        foreach ($return as $key => $val) {
            if ($val->class === $this->getName() && in_array($val->getName(), $traitMethods) === false) {
                $return[$key] = new ReflectionMethod($this->getName(), $val->getName());
            } else {
                unset($return[$key]);
            }
        }

        return array_values($return);
    }
737165
protected function getPredicatesFromFilterCondition($filter)
    {
        $predicates = [];
        $regex = "/(^|\b)(\w+\:\w+)\.(l|u)(\b|$)/";
        foreach($filter as $key=>$condition)
        {
            if(is_string($key))
            {
                $numMatches = preg_match_all($regex, $key, $matches);
                for($i = 0; $i < $numMatches; $i++)
                {
                    if(isset($matches[2][$i]))
                    {
                        $predicates[] = $matches[2][$i];
                    }
                }
            }
            if(is_string($condition))
            {
                $numMatches = preg_match_all($regex, $condition, $matches);
                for($i = 0; $i < $numMatches; $i++)
                {
                    if(isset($matches[2][$i]))
                    {
                        $predicates[] = $matches[2][$i];
                    }
                }
            }
            elseif(is_array($condition))
            {
                array_merge($predicates, $this->getPredicatesFromFilterCondition($condition));
            }
        }
        return $predicates;
    }
1144781
public function listAssociationsAction(string $filter = null)
    {
        $this->checkStaticTemplateIsIncluded();
        $this->checkSettings();

        $this->slotExtendedAssignMultiple([
            self::VIEW_VARIABLE_ASSOCIATION_ID => $this->settings[self::SETTINGS_ASSOCIATION_ID],
            self::VIEW_VARIABLE_FILTER => $this->getAssociationsFilter($filter),
            self::VIEW_VARIABLE_USER_FILTER => $this->getUserAssociationsFilter($filter)
        ], __CLASS__, __FUNCTION__);

        return $this->view->render();
    }
1269789
public function getNodes(?callable $filter = null, string $namespace = self::DEFAULT_NAMESPACE): array
    {
        $nodes = [];
        $nodeRefs = $this->nodeRefs[$namespace] ?? [];

        foreach ($nodeRefs as $key => $nodeRef) {
            try {
                $node = $this->ncrCache->getNode($nodeRef);
                if (null === $filter || $filter($node, $nodeRef)) {
                    $nodes[$key] = $node;
                }
            } catch (\Throwable $e) {
                // if you don't node me by now, you will never never never node me.
            }
        }

        return $nodes;
    }
683635
public function listIssues(string $filter = AbstractApi::FILTER_ASSIGNED, string $state = AbstractApi::STATE_OPEN,
                               string $labels = '', string $sort = AbstractApi::SORT_CREATED,
                               string $direction = AbstractApi::DIRECTION_DESC, string $since = '1970-01-01'): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/issues?:args', http_build_query([
                'filter'    => $filter,
                'state'     => $state,
                'labels'    => $labels,
                'sort'      => $sort,
                'direction' => $direction,
                'since'     => (new DateTime($since))->format(DateTime::ATOM)
            ])));
    }
33073
protected function getFilterParams(array &$filters, $filter)
    {
        $fragments = preg_split('%;%', $filter, -1, PREG_SPLIT_NO_EMPTY);

        $name = array_shift($fragments);
        $params = [];

        foreach ($fragments as $param) {
            list($key, $value)  = explode('=', $param);
            $params[$key] = $value;
        }

        $filters[$name] = $params;
    }
1142189
public function generateFilterConditions($filter = null) {
		$retval = [];
		if ($filter) {
			foreach ($this->searchFields as $field) {
				$retval['OR']["$field LIKE"] = '%' . $filter . '%';
			}
		}
		return $retval;
	}