Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Invalid value definition #69

@edi9999

Description

@edi9999

Hi I get an error Invalid value definition when I use the following code:

<?php
class Hello {
    const EXPECTED_INPUT_NAME = Array();
}

It works fine with normal constant definition.

The real code I'm using is :

/**
 * @var string[]
 */
const EXPECTED_INPUT_NAME = Array(
    "currency"=>self::MANDATORY,
    "date"=>self::MANDATORY,
    "information"=>self::OPTIONAL,
    "mac"=>self::MANDATORY,
    "offerAmount"=>self::MANDATORY,
    "pos"=>self::MANDATORY,
    "reference"=>self::MANDATORY,
    "status"=>self::MANDATORY,
    "transactionAmount"=>self::MANDATORY,
    "version"=>self::MANDATORY,
);

but I found out that it still fails even with void arrays.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions