<commit_before><?php
/**
 * Created by PhpStorm.
 * User: xandros15
 * Date: 2016-06-19
 * Time: 17:22
 */

namespace Xandros15\SlimPagination;

use Slim\Http\Request;
use Slim\Router;

/**
 * @property Request request
 * @property Router router
 * @property int page
 * @property string name
 */

abstract class Page
{
    /** @var array */
    private $params;

    public function __construct(array $params)
    {
        $this->params = $params;
    }

    public function __get(string $name)
    {
        if (isset($params[$name])) {
            return $params[$name];
        }
        throw new \InvalidArgumentException('Property `' . __CLASS__ . '::' . $name . '` doesn\'t exist');
    }<commit_msg>Fix bug when magic method doesn't found any of properties<commit_after><?php
/**
 * Created by PhpStorm.
 * User: xandros15
 * Date: 2016-06-19
 * Time: 17:22
 */

namespace Xandros15\SlimPagination;

use Slim\Http\Request;
use Slim\Router;

/**
 * @property Request request
 * @property Router router
 * @property int page
 * @property string name
 */

abstract class Page
{
    /** @var array */
    private $params;

    public function __construct(array $params)
    {
        $this->params = $params;
    }

    public function __get(string $name)
    {
        if (isset($this->params[$name])) {
            return $this->params[$name];
        }
        throw new \InvalidArgumentException('Property `' . __CLASS__ . '::' . $name . '` doesn\'t exist');
    }
{'fraction_non_alphanumeric': 0.1417910447761194, 'fraction_numerical': 0.021709633649932156, 'mean_word_length': 2.650990099009901, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3893287', 'n_tokens_mistral': 488, 'n_tokens_neox': 461, 'n_words': 121}