<commit_before><?php

namespace Okulbilisim\OjsImportBundle\Importer\PKP;

use DateTime;
use Ojs\JournalBundle\Entity\Issue;
use Ojs\JournalBundle\Entity\IssueTranslation;
use Ojs\JournalBundle\Entity\Journal;
use Symfony\Component\Validator\Constraints\Date;

class IssueImporter extends Importer
{
    /**
     * @var array
     */
    private $settings;

    /**
     * @param Journal $journal Issue's Journal
     */
    public function importJournalsIssues($journal, $oldId)
    {
        $issuesSql = "SELECT * FROM issues WHERE journal_id = :id";
        $issuesStatement = $this->connection->prepare($issuesSql);
        $issuesStatement->bindValue('id', $oldId);
        $issuesStatement->execute();

        $issues = $issuesStatement->fetchAll();
        foreach ($issues as $issue) {
            $this->importIssue($issue['issue_id'], $journal);
        }
    }

    /**
     * @param int $id Issue's ID
     * @param Journal $journal Issue's Journal
     * @return Issue
     */<commit_msg>Add argument's missing PHPDoc, remove unused import<commit_after><?php

namespace Okulbilisim\OjsImportBundle\Importer\PKP;

use DateTime;
use Ojs\JournalBundle\Entity\Issue;
use Ojs\JournalBundle\Entity\IssueTranslation;
use Ojs\JournalBundle\Entity\Journal;

class IssueImporter extends Importer
{
    /**
     * @var array
     */
    private $settings;

    /**
     * @param Journal $journal Issue's Journal
     * @param int $oldId Issue's ID in the old database
     */
    public function importJournalsIssues($journal, $oldId)
    {
        $issuesSql = "SELECT * FROM issues WHERE journal_id = :id";
        $issuesStatement = $this->connection->prepare($issuesSql);
        $issuesStatement->bindValue('id', $oldId);
        $issuesStatement->execute();

        $issues = $issuesStatement->fetchAll();
        foreach ($issues as $issue) {
            $this->importIssue($issue['issue_id'], $journal);
        }
    }

    /**
     * @param int $id Issue's ID
     * @param Journal $journal Issue's Journal
     * @return Issue
     */
{'fraction_non_alphanumeric': 0.1273170731707317, 'fraction_numerical': 0.0, 'mean_word_length': 2.9442307692307694, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '2403093', 'n_tokens_mistral': 608, 'n_tokens_neox': 589, 'n_words': 137}