<commit_before><?php

include_once("lib/libPDFInterface.php");
include_once("lib/libPDFListener.php");

abstract class pdfBase implements libPDFListener {
	private $name;
	private $message;
	private $pdf;

	public function __construct(libPDFInterface $pdf) {
		$this->pdf = $pdf;

		$pdf->addListener($this);

		$this->name = FALSE;
		$this->message = "No reason specified.";
	}

	abstract public function display($args);

	protected function setName($name) {
		$this->name = $name;
	}

	public function getName() {
		return $this->name;
	}

	protected function setMessage($message) {
		$this->message = $message;
	}

	public function getMessage() {
		return $this->message;
	}

	public function getDocClass() {
		return $this->pdf;
	}

	public function getETag($args) {
		return null;
	}

	public function onHeader() {
	}

	public function onFooter() {
	}

	// Pass through method calls to $this->pdf
	public function __call($method, $arguments) {
		if( method_exists($this->pdf, $method) )
			return call_user_method_array($method, $this->pdf, $arguments);

		throw new Exception("Method not found");
	}

	// Pass through property access to $this->pdf
	public function __isset($property) {
		return isset($this->pdf->$property);
	}

	public function __set($name, $value) {
		if( property_exists($this->pdf, $name) ) {
			$this->pdf->$name = $value;

			return;
		}

		throw new Exception("Property not found");
	}

	public function __get($name) {
		if( property_exists($this->pdf, $name) )
			return $this->pdf->$name;

		throw new Exception("Property not found");
	}
}<commit_msg>lib/pdfBase: Fix errors when assigning values to non-existent properties in the PDF class<commit_after><?php

include_once("lib/libPDFInterface.php");
include_once("lib/libPDFListener.php");

abstract class pdfBase implements libPDFListener {
	private $name;
	private $message;
	private $pdf;

	public function __construct(libPDFInterface $pdf) {
		$this->pdf = $pdf;

		$pdf->addListener($this);

		$this->name = FALSE;
		$this->message = "No reason specified.";
	}

	abstract public function display($args);

	protected function setName($name) {
		$this->name = $name;
	}

	public function getName() {
		return $this->name;
	}

	protected function setMessage($message) {
		$this->message = $message;
	}

	public function getMessage() {
		return $this->message;
	}

	public function getDocClass() {
		return $this->pdf;
	}

	public function getETag($args) {
		return null;
	}

	public function onHeader() {
	}

	public function onFooter() {
	}

	// Pass through method calls to $this->pdf
	public function __call($method, $arguments) {
		if( method_exists($this->pdf, $method) )
			return call_user_method_array($method, $this->pdf, $arguments);

		throw new Exception("Method not found");
	}

	// Pass through property access to $this->pdf
	public function __isset($property) {
		return isset($this->pdf->$property);
	}

	public function __set($name, $value) {
		if( property_exists($this->pdf, $name) ) {
			$this->pdf->$name = $value;

			return;
		} else
			$this->$name = $value;
	}

	public function __get($name) {
		if( property_exists($this->pdf, $name) )
			return $this->pdf->$name;

		throw new Exception("Property not found");
	}
}
{'fraction_non_alphanumeric': 0.14781530833591572, 'fraction_numerical': 0.0, 'mean_word_length': 4.248780487804878, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 46, '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': '5679885', 'n_tokens_mistral': 1125, 'n_tokens_neox': 1033, 'n_words': 266}