<commit_before><?php
namespace Application\Model;

use Zend\Db\TableGateway\TableGateway;

// Contains the methods that allows to work with an user entity.
class UserTable
{
	protected $tableGateway;

	public function __construct(TableGateway $tableGateway)
	{
		$this->tableGateway = $tableGateway;
	}

	// Check an user's creditentials, to ensure it logged in correctly.
	// Return 'true' if creditentials are right, and 'false' if wrong.
	public function checkCreditentials($username, $hashedPassword)
	{
		// Try to get the row that matchs with the given username and hashed
		// password.
		$rowset = $this->tableGateway->select(array(
			'username' => $username,
			'hashedPassword' => $<PASSWORD>
		));
		$row = $rowset->current();

		// Return true or false, depending on the given creditentials'
		// correctness.
		if ($row)
		{
			return true;
		}
		else
		{
			return false;
		}
	}
}<commit_msg>simpliest return<commit_after><?php
namespace Application\Model;

use Zend\Db\TableGateway\TableGateway;

// Contains the methods that allows to work with an user entity.
class UserTable
{
	protected $tableGateway;

	public function __construct(TableGateway $tableGateway)
	{
		$this->tableGateway = $tableGateway;
	}

	// Check an user's creditentials, to ensure it logged in correctly.
	// Return 'true' if creditentials are right, and 'false' if wrong.
	public function checkCreditentials($username, $hashedPassword)
	{
		// Try to get the row that matchs with the given username and hashed
		// password.
		$rowset = $this->tableGateway->select(array(
			'username' => $username,
			'hashedPassword' => $<PASSWORD>
		));
		$row = $rowset->current();

		// Return true or false, depending on the given creditentials'
		// correctness.
		return $row ? true : false;
	}
}
{'fraction_non_alphanumeric': 0.11298482293423272, 'fraction_numerical': 0.0, 'mean_word_length': 3.8767123287671232, 'pattern_counts': {'":': 0, '<': 7, '<?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': '3867440', 'n_tokens_mistral': 580, 'n_tokens_neox': 544, 'n_words': 176}