<commit_before><?php
namespace Bedd\Common;

use Bedd\Common\Traits\StaticClassTrait;

/**
 * ArrayUtils
 */
class ArrayUtils
{
    use StaticClassTrait;

    /**
     * Test whether an array contains one or more keys by defined $type
     *
     * @param string $input the Type: string|int
     * @param array $input
     * @param bool $only
     * @param bool $allow_empty Should an empty $input return true
     * @param string $type
     * @return bool
     */
    private static function hasKeysByType($type, array $input, $only = false, $allow_empty = false)
    {
        if (!is_array($input)) {
            return false;
        }
        if (!$input) {
            return $allow_empty;
        }
        $count = count(array_filter(array_keys($input), 'is_'.strtolower($type)));
        return  $only ? $count === count($input) : $count > 0;
    }
    /**
     * Test whether an array contains one or more string keys
     *
     * @param array $input
     * @param bool $only
     * @param bool $allow_empty Should an empty $input return true
     * @return bool
     */
    public static function hasStringKeys(array $input, $only = false, $allow_empty = false)<commit_msg>Simple fixes<commit_after><?php
namespace Bedd\Common;

use Bedd\Common\Traits\StaticClassTrait;

/**
 * ArrayUtils
 */
class ArrayUtils
{
    use StaticClassTrait;

    /**
     * Test whether an array contains one or more keys by defined $type
     *
     * @param string $type the Type: string|int
     * @param array $input
     * @param bool $only
     * @param bool $allow_empty Should an empty $input return true
     * @return bool
     */
    private static function hasKeysByType($type, array $input, $only = false, $allow_empty = false)
    {
        if (!is_array($input)) {
            return false;
        }
        if (empty($input)) {
            return $allow_empty;
        }
        $count = count(array_filter(array_keys($input), 'is_'.strtolower($type)));
        return  $only ? $count === count($input) : $count > 0;
    }
    /**
     * Test whether an array contains one or more string keys
     *
     * @param array $input
     * @param bool $only
     * @param bool $allow_empty Should an empty $input return true
     * @return bool
     */
    public static function hasStringKeys(array $input, $only = false, $allow_empty = false)
{'fraction_non_alphanumeric': 0.11418832552194291, 'fraction_numerical': 0.0008521516829995739, 'mean_word_length': 2.447870778267254, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1830728', 'n_tokens_mistral': 693, 'n_tokens_neox': 687, 'n_words': 219}