<commit_before><?php

namespace Joindin\Api\Model;

use Joindin\Api\Request;

/**
 * Container for multiple EventCommentReportModel objects
 */
class PendingTalkClaimModelCollection extends BaseModelCollection
{
    /** @var array|PendingTalkClaimModel[] */
    protected $list;

    protected $total;

    /**
     * Take arrays of data and create a collection of models; store metadata
     *
     * @param array $data
     * @param       $total
     */
    public function __construct(array $data, $total)
    {
        $this->list  = [];
        $this->total = $total;

        // hydrate the model objects if necessary and store to list
        foreach ($data as $item) {
            if (!$item instanceof PendingTalkClaimModel) {
                $item = new PendingTalkClaimModel($item);
            }
            $this->list[] = $item;
        }
    }

    /**
     * Present this collection ready for the output handlers
     *
     * This creates the expected output structure, converting each resource
     * to it's presentable representation and adding the meta fields for totals
     * and pagination
     *
     * @param Request $request
     * @param bool    $verbose
     *
     * @return array
     */
    public function getOutputView(Request $request, $verbose = false)
    {
        $retval = [];
        // handle the collection first
        $retval = ['claims' => []];
        foreach ($this->list as $item) {
            $retval['claims'][] = $item->getOutputView($request, $verbose);
        }

        // add other fields
        $retval['meta'] = $this->addPaginationLinks($request);

        return $retval;
    }
}
<commit_msg>Fix: Add type to param annotation<commit_after><?php

namespace Joindin\Api\Model;

use Joindin\Api\Request;

/**
 * Container for multiple EventCommentReportModel objects
 */
class PendingTalkClaimModelCollection extends BaseModelCollection
{
    /** @var array|PendingTalkClaimModel[] */
    protected $list;

    protected $total;

    /**
     * Take arrays of data and create a collection of models; store metadata
     *
     * @param array $data
     * @param int   $total
     */
    public function __construct(array $data, $total)
    {
        $this->list  = [];
        $this->total = $total;

        // hydrate the model objects if necessary and store to list
        foreach ($data as $item) {
            if (!$item instanceof PendingTalkClaimModel) {
                $item = new PendingTalkClaimModel($item);
            }
            $this->list[] = $item;
        }
    }

    /**
     * Present this collection ready for the output handlers
     *
     * This creates the expected output structure, converting each resource
     * to it's presentable representation and adding the meta fields for totals
     * and pagination
     *
     * @param Request $request
     * @param bool    $verbose
     *
     * @return array
     */
    public function getOutputView(Request $request, $verbose = false)
    {
        $retval = [];
        // handle the collection first
        $retval = ['claims' => []];
        foreach ($this->list as $item) {
            $retval['claims'][] = $item->getOutputView($request, $verbose);
        }

        // add other fields
        $retval['meta'] = $this->addPaginationLinks($request);

        return $retval;
    }
}

{'fraction_non_alphanumeric': 0.11074429771908763, 'fraction_numerical': 0.0, 'mean_word_length': 2.1894736842105265, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4883221', 'n_tokens_mistral': 911, 'n_tokens_neox': 883, 'n_words': 272}