Returns the response when all of it is received

@param string $sentTag The custom tag to look for

@return string
540198
protected function receive($sentTag)
    {
        $this->buffer = array();

        $start = time();

        while (time() < ($start + self::TIMEOUT)) {
            list($receivedTag, $line) = explode(' ', $this->getLine(), 2);
            $this->buffer[] = trim($receivedTag . ' ' . $line);
            if ($receivedTag == 'TAG'.$sentTag) {
                return $this->buffer;
            }
        }

        return null;
    }
1140712
private function collectTags($incomingTags)
    {
        $allTags = WinkTag::all();

        return collect($incomingTags)->map(function ($incomingTag) use ($allTags) {
            $tag = $allTags->where('slug', Str::slug($incomingTag['name']))->first();

            if (! $tag) {
                $tag = WinkTag::create([
                    'id' => $id = Str::uuid(),
                    'name' => $incomingTag['name'],
                    'slug' => Str::slug($incomingTag['name']),
                ]);
            }

            return (string) $tag->id;
        })->toArray();
    }
720330
protected function _nextTaggedLine(&$tag)
    {
        $line = $this->_nextLine();

        // seperate tag from line
        list($tag, $line) = explode(' ', $line, 2);

        return $line;
    }
122632
protected function getDocBlockResponses(array $tags)
    {
        $responseTags = array_values(
            array_filter($tags, function ($tag) {
                return $tag instanceof Tag && strtolower($tag->getName()) === 'response';
            })
        );

        if (empty($responseTags)) {
            return;
        }

        return array_map(function (Tag $responseTag) {
            preg_match('/^(\d{3})?\s?([\s\S]*)$/', $responseTag->getContent(), $result);

            $status = $result[1] ?: 200;
            $content = $result[2] ?: '{}';

            return new JsonResponse(json_decode($content, true), (int) $status);
        }, $responseTags);
    }
1272185
public static function tagGetVer(string $tag) :?int
        {
            if (!self::$useTagsBuffer || !($ver = (self::$tagsBuffer[$tag] ?? null))) {
                $ver = self::$tagsBuffer[$tag] = self::GetInstance()
                                                     ->get("\$vxnTag:{$tag}") ?: self::tagIncrementVer($tag);
            }

            return $ver ?: null;
        }
28780
public function tag($tag)
    {
        $blogs = $this->repository->tags($tag);
        $tags = $this->repository->allTags();

        if (empty($blogs)) {
            abort(404);
        }

        return view('cms-frontend::blog.all')
            ->with('tags', $tags)
            ->with('blogs', $blogs);
    }
54482
public function getTag($tag) {
        if (isset($this->_tags[$tag])) {
            return $this->_tags[$tag];
        }

        throw new MissingFilterException(sprintf('No filter can be found with %s tag', $tag));
    }
642110
public function getTags()
    {
        $value = $this->getData('tags');
        /** @noinspection IsEmptyFunctionUsageInspection */
        if (!empty($decoded = json_decode($value, true))) {
            return $decoded;
        }
        return [];
    }
382042
protected function checkTags($tags)
    {
        foreach ($tags as $key => $value) {
            if (strlen($key) > self::MAX_TAG_KEY_LENGTH) {
                throw new CException(sprintf(
                    'SentryClient does not allow tag keys that contain more than %d characters.',
                    self::MAX_TAG_KEY_LENGTH
                ));
            }
            if (strlen($value) > self::MAX_TAG_VALUE_LENGTH) {
                throw new CException(sprintf(
                    'SentryClient does not allow tag values that contain more than %d characters.',
                    self::MAX_TAG_VALUE_LENGTH
                ));
            }
        }
    }
1137766
private function tag_has_text(string $tag){
    return in_array('text', array_values(
      \is_array($this->tags[$tag]) ?
        $this->tags[$tag] :
        $this->tags[$this->tags[$tag]]
    ));
  }
45810
public function getPostsByTag($tag)
    {
        if (false === array_key_exists($tag, $this->tagsIndex)) {
            return [];
        }

        $postNames = $this->tagsIndex[$tag];

        return $this->getPostsByName($postNames);
    }
351174
protected function getFileResponses(array $tags)
    {
        // avoid "holes" in the keys of the filtered array, by using array_values on the filtered array
        $responseFileTags = array_values(
            array_filter($tags, function ($tag) {
                return $tag instanceof Tag && strtolower($tag->getName()) === 'responsefile';
            })
        );

        if (empty($responseFileTags)) {
            return;
        }

        return array_map(function (Tag $responseFileTag) {
            preg_match('/^(\d{3})?\s?([\S]*[\s]*?)(\{.*\})?$/', $responseFileTag->getContent(), $result);
            $status = $result[1] ?: 200;
            $content = $result[2] ? file_get_contents(storage_path(trim($result[2])), true) : '{}';
            $json = ! empty($result[3]) ? str_replace("'", '"', $result[3]) : '{}';
            $merged = array_merge(json_decode($content, true), json_decode($json, true));

            return new JsonResponse($merged, (int) $status);
        }, $responseFileTags);
    }
1181024
public function tagged($tag)
    {
        $results = [];

        if (isset($this->tags[$tag])) {
            foreach ($this->tags[$tag] as $abstract) {
                $results[] = $this->make($abstract);
            }
        }

        return $results;
    }
1294474
public function hasTag($tag)
    {
        // check if all tags exist
        if (is_array($tag)) {
            foreach ($tag as $t) {
                if (!$this->hasTag($t)) {
                    return false;
                }
            }

            return true;
        }

        // check if tag exist
        $a = explode('#', $tag);
        $tag = array_shift($a);
        //$ref = array_shift($a); // unused

        return isset($this->tags[$tag]) || $this->isTopTag($tag);
    }
522229
public function getTagValue($tag)
	{
		if(!$this->hasTag($tag))
		{
			throw new \OutOfBoundsException('Tag ' . $tag . ' is not set');
		}
		
		if(empty($this->tags[$tag]))
		{
			throw new \OutOfBoundsException('Tag ' . $tag . ' does not have a value');
		}
		
		return $this->tags[$tag][0];
	}
876231
public function verifyAllForTag(string $tag)
    {
        $arguments = $this->getBrokerHttpClient()->getAllConsumerUrlsForTag($this->config->getProviderName(), $tag);

        $arguments = \array_merge($arguments, $this->getArguments());

        $this->verifyAction($arguments);
    }
1190079
public function deleteTag($tag)
    {
        $endPointUrl = $this->apiurl."/account/tag/".$tag;

        $response = $this->curlDelete($endPointUrl);

        return $response;
    }