src/Rbac/DbManager.php
public function getRules()
    {
        if ($this->rules !== null) {
            return resolve($this->rules);
        }

        return (new Query())->from($this->ruleTable)
            ->all($this->db)
            ->then(
                function($rows) {
                    $rules = [];
                    foreach ($rows as $row) {
                        $data = $row['data'];
                        if (is_resource($data)) {
                            $data = stream_get_contents($data);
                        }
                        $rules[$row['name']] = unserialize($data);
                    }

                    return $rules;
                }
            );
    }
public function getRules()
    {
        if ($this->rules !== null) {
            return resolve($this->rules);
        }

        return (new Query())->from($this->ruleTable)
            ->all($this->db)
            ->then(
                function($rows) {
                    $rules = [];
                    foreach ($rows as $row) {
                        $data = $row['data'];
                        if (is_resource($data)) {
                            $data = stream_get_contents($data);
                        }
                        $rules[$row['name']] = unserialize($data);
                    }

                    return $rules;
                }
            );
    }
{@inheritdoc}