public function validateScalarArray($array)
    {
        if (!is_array($array)) {
            throw new \InvalidArgumentException(sprintf(
                'Expected array value, got: %s',
                var_export($array, true)
            ));
        }

        foreach ($array as $key => $value) {
            if (false == is_scalar($value)) {
                throw new \InvalidArgumentException(sprintf(
                    'Cannot use an array as a value in a multivalue property. Value was: %s',
                    var_export($array, true)
                ));
            }
        }
    }
public function validateScalarArray($array)
    {
        if (!is_array($array)) {
            throw new \InvalidArgumentException(sprintf(
                'Expected array value, got: %s',
                var_export($array, true)
            ));
        }

        foreach ($array as $key => $value) {
            if (false == is_scalar($value)) {
                throw new \InvalidArgumentException(sprintf(
                    'Cannot use an array as a value in a multivalue property. Value was: %s',
                    var_export($array, true)
                ));
            }
        }
    }
public function validateScalarArray ( $ array ) { if ( ! is_array ( $ array ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Expected array value, got: %s' , var_export ( $ array , true ) ) ) ; } foreach ( $ array as $ key => $ value ) { if ( false == is_scalar ( $ value ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Cannot use an array as a value in a multivalue property. Value was: %s' , var_export ( $ array , true ) ) ) ; } } }
Used as callback for closure functions.

@param array Array of values which must be scalars

@throws InvalidArgumentException
Used as callback for closure functions .