@param mixed $magicNumber

@return array
436536
public function getHintsByValue($magicNumber): array
    {
        $hints = [];
        foreach ($this->constants as $constant) {
            if ($constant['value'] === $magicNumber) {
                $hints[] = $constant['hint'];
            }
        }

        return $hints;
    }
1214913
final public function getPrimaryKeyValues() : array
    {
        $keys = static::getPrimaryKeys();
        $values = array_intersect_key($this->data, array_flip($keys));

        return $values;
    }
1081220
protected function getNumbers() {
        if (!$this->_numbers) {
            $this->_numbers = new NumberList($this->version);
        }

        return $this->_numbers;
    }
27190
public function getProductByMetadata(string $productNumber, array $context) : array
    {
        Assert::that($productNumber)->minLength(1, 'The length of $productNumber has to be > 0');
        Assert::that($context)->notEmpty();

        return (array)$this->master->doRequest(
            'POST',
            sprintf('/admin/WEBAPI/Endpoints/v1_0/ProductService/{KEY}/%s', rawurlencode($productNumber)),
            $context
        );
    }
635559
public function normalizePageNumber($pageNumber)
    {
        $pageNumber = (int) $pageNumber;

        if ($pageNumber < 1) {
            $pageNumber = 1;
        }

        $pageCount = $this->count();

        if ($pageCount > 0 && $pageNumber > $pageCount) {
            $pageNumber = $pageCount;
        }

        return $pageNumber;
    }
19660
public function get_byteorder($magic)
    {
        // The magic is 0x950412de
        $magic_little = (int) - 1794895138;
        $magic_little_64 = (int) 2500072158;
        // 0xde120495
        $magic_big = ((int) - 569244523) & 0xFFFFFFFF;
        if ($magic_little == $magic || $magic_little_64 == $magic) {
            return 'little';
        } elseif ($magic_big == $magic) {
            return 'big';
        } else {
            return false;
        }
    }
361710
public function getEntityArrayValues($entity)
    {
        $values = [];
        $properties = $this->getEntityProperties($entity);
        $metadata = $this->em->getClassMetadata(get_class($entity));
        foreach ($properties as $property) {
            $values[$property] = $metadata->getFieldValue($entity, $property);
        }
        return $values;
    }
1345440
final protected function cards() {
		$result = []; /** @var array(string => string) $result */
		$m = $this->m(); /** @var Method $m */
		/**
		 * 2017-07-28
		 * The `$m instanceof Method` check is for the «Square» module:
		 * its server part does not use the Df_StripeClone module, but the client part does use it.
		 * So we need this the `$m instanceof Method` check to evade the error:
		 * «Cannot instantiate abstract class Df\StripeClone\Facade\Customer
		 * in mage2pro/core/Payment/Facade.php:88»: https://github.com/mage2pro/square/issues/2
		 */
		if ($m instanceof Method && ($customerId = df_ci_get($this->m())) /** @var string|null $customerId */) {
			$this->s()->init();
			$fc = FCustomer::s($m); /** @var FCustomer $fc */
			if ($customer = $fc->get($customerId) /** @var object|null $customer */) {
				$result = array_map(function(ICard $c) use($m) {
					/**
					 * 2017-07-24
					 * Unfortunately, the one-liner fails on PHP 5.6.30:
					 * return ['id' => $c->id(), 'label' => (CF::s($m, $c))->label()];
					 * «syntax error, unexpected '->' (T_OBJECT_OPERATOR), expecting ']'»
					 * https://github.com/mage2pro/core/issues/16
					 * See also: https://github.com/mage2pro/core/issues/15
					 *
					 * 2017-07-31
					 * Interestingly, the following code works on all PHP versions >= 5.4.0:
					 * class A {function f() {return __METHOD__;}
					 * echo (new A)->f();
					 * https://3v4l.org/nANqg
					 *
					 * The following code works on all PHP versions >= 5.0.0:
					 *	class A {
					 *		function f() {return __METHOD__;}
					 *		static function s() {return new self;}
					 *	}
					 *	echo A::s()->f();
					 * https://3v4l.org/1qr48
					 *
					 * The same is true for the following code:
					 *	class A {
					 *		function f() {return $this->_v;}
					 *		final protected function __construct($v) {$this->_v = $v;}
					 *		private $_v;
					 *		final static function s($v) {return new self($v);}
					 *	}
					 *	echo A::s('test')->f();
					 * https://3v4l.org/2E8H6
					 *
					 * So, I was unable to reproduce the issue...
					 * Maybe the problem customer uses a non-standard (patched) PHP version?
					 *
					 * 2017-11-08
					 * Note 1.
					 * One-liners like (!($e = $a->e())->b()) are really not supported by PHP < 7:
					 * https://3v4l.org/lJjvS
					 * Note 2.
					 * At the same time, some `))->` one-liners are supported by PHP >= 5.4, e.g:
					 * static function p() {return (new self())->b();}
					 * https://3v4l.org/LJlDE  
					 * Note 3.   
					 * If we add extra brackets to the code from the Note 2,
					 * then the code will be incompatible with PHP < 7:
					 * static function p() {return ((new self()))->b();}
					 */
					$cf = CF::s($m, $c); /** @var CF $cf */
					return ['id' => $c->id(), 'label' => $cf->label()];
				}, $fc->cards($customer));
			}
			else {
				// 2017-02-24
				// We can get here, for example, if the store's administrator has switched
				// his Stripe account in the extension's settings: https://mage2.pro/t/3337
				df_ci_save($this->m(), null);
			}
		}
		return $result;
	}
1116228
protected function magicInit()
    {
        if (!$this->magicInited) {
            $this->magicFields = array_replace($this->magicFields, $this->magicGetDefaults());
            $this->magicInited = true;
        }
    }
631205
final public function map(Callable $callback)
	{
		$arr = array_map(
			$callback,
			array_values($this->{self::MAGIC_PROPERTY}),
			array_keys($this->{self::MAGIC_PROPERTY})
		);
		return static::createFromArray($arr);
	}
1361612
public function getSchema($asPlainArray = true)
    {
        return !$asPlainArray ? $this->tables : array_map(function ($table) {
            return [
                'name' => $table->getName(),
                'pkey' => $table->getPrimaryKey(),
                'comment' => $table->getComment(),
                'columns' => array_map(function ($column) {
                    return [
                        'name' => $column->getName(),
                        'type' => $column->getType(),
                        'length' => $column->getLength(),
                        'comment' => $column->getComment(),
                        'values' => $column->getValues(),
                        'default' => $column->getDefault(),
                        'nullable' => $column->isNullable()
                    ];
                }, $table->getFullColumns()),
                'relations' => array_map(function ($rel) {
                    $relation = clone $rel;
                    $relation->table = $relation->table->getName();
                    if ($relation->pivot) {
                        $relation->pivot = $relation->pivot->getName();
                    }
                    return (array)$relation;
                }, $table->getRelations())
            ];
        }, $this->tables);
    }
361859
public function do_magic_tag($content){

		// check for magics
		preg_match_all("/\{(.+?)\}/", (string) $content, $magics);
		
		// on found tags
		if(!empty($magics[1])){
			foreach($magics[1] as $magic_key=>$magic_tag){
				$params = explode(':', $magic_tag, 2 );
				if( empty( $params[1] ) ){ continue; }
				// filter a general tag using the second argument as the original tag
				$filter_value = apply_filters( 'caldera_magic_tag', apply_filters( "caldera_magic_tag-{$params[0]}", $params[1] ) , $magics[0][$magic_key]);
				// chech the tag changed
				if( $filter_value !== $params[1] ){
					// on a difference in the tag, replace it.
					$content = str_replace( $magics[0][$magic_key], $filter_value, $content );
				}
			}
		}

		// return content converted or not.
		return $content;

	}
1211170
public function getCurrentRealmsAffections(): array
    {
        $realmsAffections = [];
        foreach ($this->getRealmsAffectionsSum() as $periodName => $periodSum) {
            $realmsAffections[$periodName] = new RealmsAffection([$periodSum, $periodName]);
        }

        return $realmsAffections;
    }
431247
public function getRawValue(): array
	{
		$primaryValues = [];
		foreach ($this->getIterator() as $entity) {
			if ($entity->isPersisted()) {
				$primaryValues[] = $entity->getValue('id');
			}
		}
		return $primaryValues;
	}
1220798
public function getPhoneNumbersFormatted()
    {
        $formattedArray = [];
        foreach ($this->phoneNumbers as $key => $phoneNumber)
        {
            $formattedArray[$key] = [
                'number' => $phoneNumber->getNumber(),
                'extension' => null
            ];
        }

        return $formattedArray;
    }
71221
protected function getValidAliases()
    {
        $aliases = new Collection();

        // Get all aliases
        foreach ($this->getAliases() as $name => $facade) {
            // Skip the Redis facade, if not available (otherwise Fatal PHP Error)
            if ($facade == 'Illuminate\Support\Facades\Redis' && $name == 'Redis' && !class_exists('Predis\Client')) {
                continue;
            }

            $magicMethods = array_key_exists($name, $this->magic) ? $this->magic[$name] : array();
            $alias = new Alias($this->config, $name, $facade, $magicMethods, $this->interfaces);
            if ($alias->isValid()) {
                //Add extra methods, from other classes (magic static calls)
                if (array_key_exists($name, $this->extra)) {
                    $alias->addClass($this->extra[$name]);
                }

                $aliases[] = $alias;
            }
        }

        return $aliases;
    }
1306711
final public function replace()
	{
		$args = func_get_args();
		array_unshift($this->{self::MAGIC_PROPERTY}, $args);
		$arr = call_user_func_array('array_replace', $args);
		return static::createFromArray($arr);
	}