<commit_before><?php

use \Heyday\VersionedDataObjects\VersionedDataObject;

/**
 * @package elemental
 *
 * implement canX operations based on page:
 * - Check if CanX is defined on the owner page, firstly checking if this item has a page relation.
 *   (Allows us to reuse this extension on non-elements)
 * - Then fallback to CMS Access
 *
 * Has to extend VersionedDataObject rather than suppliment so that we can overwrite the canXs
 * Otherwise the Versioned canXs fail when these check suceed, the fail overides
 */
class ElementalVersionedExtension extends VersionedDataObject
{

    /**
     * @param array $fields
     */
    public function updateSummaryFields(&$fields)
    {
        if(isset($fields['CMSPublishedState']) {
            unset($fields['CMSPublishedState']);
        }
    }

    /**
     * Basic permissions, defaults to page perms where possible
     */
    public function canView($member = null)
    {<commit_msg>Fix typo<commit_after><?php

use \Heyday\VersionedDataObjects\VersionedDataObject;

/**
 * @package elemental
 *
 * implement canX operations based on page:
 * - Check if CanX is defined on the owner page, firstly checking if this item has a page relation.
 *   (Allows us to reuse this extension on non-elements)
 * - Then fallback to CMS Access
 *
 * Has to extend VersionedDataObject rather than suppliment so that we can overwrite the canXs
 * Otherwise the Versioned canXs fail when these check suceed, the fail overides
 */
class ElementalVersionedExtension extends VersionedDataObject
{

    /**
     * @param array $fields
     */
    public function updateSummaryFields(&$fields)
    {
        if(isset($fields['CMSPublishedState'])) {
            unset($fields['CMSPublishedState']);
        }
    }

    /**
     * Basic permissions, defaults to page perms where possible
     */
    public function canView($member = null)
    {
{'fraction_non_alphanumeric': 0.08333333333333333, 'fraction_numerical': 0.0, 'mean_word_length': 3.226457399103139, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '1207931', 'n_tokens_mistral': 517, 'n_tokens_neox': 496, 'n_words': 185}