<commit_before><?php
namespace KayStrobach\Logger\Domain\Model;

/*                                                                        *
 * This script belongs to the TYPO3 Flow package "KayStrobach.Logger".    *
 *                                                                        *
 *                                                                        */

use Doctrine\Tests\ORM\Functional\UUIDGeneratorTest;
use TYPO3\Flow\Annotations as Flow;
use Doctrine\ORM\Mapping as ORM;

/**
 * @Flow\Entity
 */
class LogEntry {
	/**
	 * @var string $id
	 *
	 * @ORM\Id
	 * @ORM\GeneratedValue(strategy="UUID")
	 */
	protected $id;

	/**
	 * @var string $action
	 *
	 * @ORM\Column(type="string", length=8)
	 */
	protected $action;

	/**
	 * @var string $loggedAt
	 *
	 * @ORM\Column(name="logged_at", type="datetime")
	 */
	protected $loggedAt;

	/**
	 * @var string $objectId
	 *
	 * @ORM\Column(name="object_id", length=64, nullable=true)
	 */
	protected $objectId;

	/**
	 * @var string $objectClass
	 *
	 * @ORM\Column(name="object_class", type="string", length=255)
	 */
	protected $objectClass;

	/**
	 * @var integer $version
	 *
	 * @ORM\Column(type="integer")
	 */
	protected $version;

	/**
	 * @var string $data
	 *
	 * @ORM\Column(type="array", nullable=true)
	 */
	protected $data;

	/**
	 * @var string $data
	 *
	 * @ORM\Column(length=255, nullable=true)
	 */
	protected $username;

	/**
	 * @return string
	 */
	public function getId() {
		return $this->id;
	}

	/**
	 * @param string $id
	 */
	public function setId($id) {
		$this->id = $id;
	}

	/**
	 * @return string
	 */
	public function getAction() {
		return $this->action;
	}

	/**
	 * @param string $action
	 */
	public function setAction($action) {
		$this->action = $action;
	}

	/**
	 * @return string
	 */
	public function getLoggedAt() {
		return $this->loggedAt;
	}

	/**
	 * @param string $loggedAt
	 */
	public function setLoggedAt($loggedAt = NULL) {
		if($loggedAt === NULL) {
			$loggedAt = new \DateTime('now');
		}
		$this->loggedAt = $loggedAt;
	}

	/**
	 * @return string
	 */
	public function getObjectId() {
		return $this->objectId;
	}

	/**
	 * @param string $objectId
	 */
	public function setObjectId($objectId) {
		$this->objectId = $objectId;
	}

	/**
	 * @return string
	 */
	public function getObjectClass() {
		return $this->objectClass;
	}

	/**
	 * @param string $objectClass
	 */
	public function setObjectClass($objectClass) {
		$this->objectClass = $objectClass;
	}

	/**
	 * @return int
	 */
	public function getVersion() {
		return $this->version;
	}

	/**
	 * @param int $version
	 */
	public function setVersion($version) {
		$this->version = $version;
	}

	/**
	 * @return string
	 */
	public function getData() {
		return $this->data;
	}

	/**
	 * @param string $data
	 */
	public function setData($data) {
		$this->data = $data;
	}

	/**
	 * @return string
	 */
	public function getUsername() {
		return $this->username;
	}

	/**
	 * @param string $username
	 */
	public function setUsername($username) {
		$this->username = $username;
	}
}<commit_msg>[TASK] add username to version log<commit_after><?php
namespace KayStrobach\Logger\Domain\Model;

/*                                                                        *
 * This script belongs to the TYPO3 Flow package "KayStrobach.Logger".    *
 *                                                                        *
 *                                                                        */

use Doctrine\Tests\ORM\Functional\UUIDGeneratorTest;
use TYPO3\Flow\Annotations as Flow;
use Doctrine\ORM\Mapping as ORM;

/**
 * @Flow\Entity
 */
class LogEntry {
	/**
	 * @Flow\Inject
	 * @var \TYPO3\Flow\Security\Authentication\AuthenticationManagerInterface
	 */
	protected $authenticationManager;

	/**
	 * @var string $id
	 *
	 * @ORM\Id
	 * @ORM\GeneratedValue(strategy="UUID")
	 */
	protected $id;

	/**
	 * @var string $action
	 *
	 * @ORM\Column(type="string", length=8)
	 */
	protected $action;

	/**
	 * @var string $loggedAt
	 *
	 * @ORM\Column(name="logged_at", type="datetime")
	 */
	protected $loggedAt;

	/**
	 * @var string $objectId
	 *
	 * @ORM\Column(name="object_id", length=64, nullable=true)
	 */
	protected $objectId;

	/**
	 * @var string $objectClass
	 *
	 * @ORM\Column(name="object_class", type="string", length=255)
	 */
	protected $objectClass;

	/**
	 * @var integer $version
	 *
	 * @ORM\Column(type="integer")
	 */
	protected $version;

	/**
	 * @var string $data
	 *
	 * @ORM\Column(type="array", nullable=true)
	 */
	protected $data;

	/**
	 * @var string $data
	 *
	 * @ORM\Column(length=255, nullable=true)
	 */
	protected $username = NULL;

	/**
	 * @return string
	 */
	public function getId() {
		return $this->id;
	}

	/**
	 * @param string $id
	 */
	public function setId($id) {
		$this->id = $id;
	}

	/**
	 * @return string
	 */
	public function getAction() {
		return $this->action;
	}

	/**
	 * @param string $action
	 */
	public function setAction($action) {
		$this->action = $action;
	}

	/**
	 * @return string
	 */
	public function getLoggedAt() {
		return $this->loggedAt;
	}

	/**
	 * @param string $loggedAt
	 */
	public function setLoggedAt($loggedAt = NULL) {
		if($loggedAt === NULL) {
			$loggedAt = new \DateTime('now');
		}
		$this->loggedAt = $loggedAt;
	}

	/**
	 * @return string
	 */
	public function getObjectId() {
		return $this->objectId;
	}

	/**
	 * @param string $objectId
	 */
	public function setObjectId($objectId) {
		$this->objectId = $objectId;
	}

	/**
	 * @return string
	 */
	public function getObjectClass() {
		return $this->objectClass;
	}

	/**
	 * @param string $objectClass
	 */
	public function setObjectClass($objectClass) {
		$this->objectClass = $objectClass;
	}

	/**
	 * @return int
	 */
	public function getVersion() {
		return $this->version;
	}

	/**
	 * @param int $version
	 */
	public function setVersion($version) {
		$this->version = $version;
	}

	/**
	 * @return string
	 */
	public function getData() {
		return $this->data;
	}

	/**
	 * @param string $data
	 */
	public function setData($data) {
		$this->data = $data;
	}

	/**
	 * @return string
	 */
	public function getUsername() {
		return $this->username;
	}

	/**
	 * @param string $username
	 */
	public function setUsername($username = NULL) {
		$this->username = $username;
		if($this->authenticationManager->getSecurityContext()->getAccount()) {
			$this->username = $this->authenticationManager->getSecurityContext()->getAccount()->getAccountIdentifier();
		}
	}
}
{'fraction_non_alphanumeric': 0.16415616354134646, 'fraction_numerical': 0.003535198278512143, 'mean_word_length': 2.4085908852802516, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3949862', 'n_tokens_mistral': 2314, 'n_tokens_neox': 2082, 'n_words': 431}