diff --git a/docs/html/classes/FF_Utils_ArrayUtils.xhtml b/docs/html/classes/FF_Utils_ArrayUtils.xhtml index 53c649f..9d66a61 100644 --- a/docs/html/classes/FF_Utils_ArrayUtils.xhtml +++ b/docs/html/classes/FF_Utils_ArrayUtils.xhtml @@ -52,9 +52,6 @@
  • Coverage
  • -
  • - Constants -
  • Methods
  • @@ -73,7 +70,7 @@ diff --git a/docs/html/index.xhtml b/docs/html/index.xhtml index ca2c3a0..4684110 100644 --- a/docs/html/index.xhtml +++ b/docs/html/index.xhtml @@ -34,10 +34,10 @@

    Build

    -

    Mon, 20 Jul 2020 10:09:30 +0200

    +

    Mon, 20 Jul 2020 10:26:37 +0200

    VCS Info

    - tag: 1.1.0-dirty
    + tag: 1.1.1-1-gf7a39ec
    branch: develop

    Used Enrichers

    build, git, phpcs, phpunit, pmd

    diff --git a/docs/html/source/ArrayUtils.php.xhtml b/docs/html/source/ArrayUtils.php.xhtml index cfbb725..8f5a54d 100644 --- a/docs/html/source/ArrayUtils.php.xhtml +++ b/docs/html/source/ArrayUtils.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of ArrayUtils.php

    Source of file ArrayUtils.php

    - Size: 1,321 Bytes - Last Modified: 2020-07-20T09:59:44+02:00

    C:/dev/ffe/fastforward/Utils/src/ArrayUtils.php

    123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
    <?php
    /**
     * Definition of ArrayUtils
     *
     * @author Marco Stoll <marco@fast-forward-encoding.de>
     * @copyright 2019-forever Marco Stoll
     * @filesource
     */
    declare(strict_types=1);

    namespace FF\Utils;

    /**
     * Class ArrayUtils
     *
     * @package FF\Utils
     */
    class ArrayUtils
    {
        /**
         * Merge strategies (bit mask)
         */
        const MERGE_STRATEGY_ASSOC_REPLACE = 1;
        const MERGE_STRATEGY_ASSOC_PRESERVE = 2;
        const MERGE_STRATEGY_NUMERIC_APPEND = 4;
        const MERGE_STRATEGY_NUMERIC_PREPEND = 8;
        const MERGE_STRATEGY_DEFAULT = 5;

        /**
         * Checks whether the given array is a numeric array
         *
         * Numeric indexed must have a starting index 0 and use consecutively numbered
         * indexes for further elements.
         *
         * @param array $array
         * @return bool
         */
        public static function isNumeric(array $array): bool
        {
            return array_keys($array) === array_keys(array_keys($array));
        }

        /**
         * Checks whether the given array is an associative array
         *
         * Numeric indexed arrays whose start index isn't 0 or whose index isn't consecutively numbered
         * are treated as associative.
         *
         * @param array $array
         * @return bool
         */
        public static function isAssoc(array $array): bool
        {
            return !self::isNumeric($array);
        }
    }

    + Size: 1,051 Bytes - Last Modified: 2020-07-20T10:23:29+02:00

    C:/dev/ffe/fastforward/Utils/src/ArrayUtils.php

    123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
    <?php
    /**
     * Definition of ArrayUtils
     *
     * @author Marco Stoll <marco@fast-forward-encoding.de>
     * @copyright 2019-forever Marco Stoll
     * @filesource
     */
    declare(strict_types=1);

    namespace FF\Utils;

    /**
     * Class ArrayUtils
     *
     * @package FF\Utils
     */
    class ArrayUtils
    {
        /**
         * Checks whether the given array is a numeric array
         *
         * Numeric indexed must have a starting index 0 and use consecutively numbered
         * indexes for further elements.
         *
         * @param array $array
         * @return bool
         */
        public static function isNumeric(array $array): bool
        {
            return array_keys($array) === array_keys(array_keys($array));
        }

        /**
         * Checks whether the given array is an associative array
         *
         * Numeric indexed arrays whose start index isn't 0 or whose index isn't consecutively numbered
         * are treated as associative.
         *
         * @param array $array
         * @return bool
         */
        public static function isAssoc(array $array): bool
        {
            return !self::isNumeric($array);
        }
    }

    diff --git a/docs/html/source/index.xhtml b/docs/html/source/index.xhtml index 84138a6..24702c6 100644 --- a/docs/html/source/index.xhtml +++ b/docs/html/source/index.xhtml @@ -58,9 +58,9 @@ ArrayUtils.php - 1.3 KB + 1.0 KB - 2020-07-20T09:59:44+02:00 + 2020-07-20T10:23:29+02:00