<commit_before><?php namespace Cartalyst\Notifications;
/**
 * Part of the Notifications package.
 *
 * NOTICE OF LICENSE
 *
 * Licensed under the Cartalyst PSL License.
 *
 * This source file is subject to the Cartalyst PSL License that is
 * bundled with this package in the license.txt file.
 *
 * @package    Notifications
 * @version    1.0.0
 * @author     Cartalyst LLC
 * @license    Cartalyst PSL
 * @copyright  (c) 2011-2014, Cartalyst LLC
 * @link       http://cartalyst.com
 */

use Illuminate\Session\Store;

class FlashNotifier extends Notifier {

	/**
	 * Session instance.
	 *
	 * @var \Illuminate\Session\Store
	 */
	protected $session;

	/**
	 * Constructor.
	 *
	 * @param  \Illuminate\Session\Store  $session
	 * @return void
	 */
	public function __construct(Store $session)
	{
		$this->session = $session;
	}

	/**
	 * {@inheritDoc}
	 */
	public function notify($messages, $type, $area = 'default', $isFlash = false, $extra = null)
	{
		parent::notify($messages, $type, $area, $isFlash, $extra);

		$this->commit();
	}

	/**
	 * {@inheritDoc}
	 */
	public function get()
	{
		return $this->session->get('cartalyst.notifications') ?: [];
	}

	/**
	 * {@inheritDoc}
	 */<commit_msg>use sessions default argument<commit_after><?php namespace Cartalyst\Notifications;
/**
 * Part of the Notifications package.
 *
 * NOTICE OF LICENSE
 *
 * Licensed under the Cartalyst PSL License.
 *
 * This source file is subject to the Cartalyst PSL License that is
 * bundled with this package in the license.txt file.
 *
 * @package    Notifications
 * @version    1.0.0
 * @author     Cartalyst LLC
 * @license    Cartalyst PSL
 * @copyright  (c) 2011-2014, Cartalyst LLC
 * @link       http://cartalyst.com
 */

use Illuminate\Session\Store;

class FlashNotifier extends Notifier {

	/**
	 * Session instance.
	 *
	 * @var \Illuminate\Session\Store
	 */
	protected $session;

	/**
	 * Constructor.
	 *
	 * @param  \Illuminate\Session\Store  $session
	 * @return void
	 */
	public function __construct(Store $session)
	{
		$this->session = $session;
	}

	/**
	 * {@inheritDoc}
	 */
	public function notify($messages, $type, $area = 'default', $isFlash = false, $extra = null)
	{
		parent::notify($messages, $type, $area, $isFlash, $extra);

		$this->commit();
	}

	/**
	 * {@inheritDoc}
	 */
	public function get()
	{
		return $this->session->get('cartalyst.notifications', []);
	}

	/**
	 * {@inheritDoc}
	 */
{'fraction_non_alphanumeric': 0.14598842018196856, 'fraction_numerical': 0.009098428453267164, 'mean_word_length': 3.1778929188255614, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '7182298', 'n_tokens_mistral': 835, 'n_tokens_neox': 778, 'n_words': 207}