1--TEST--
2Using cases method from traits in enums has no effect
3--FILE--
4<?php
5
6trait Rectangle {
7    public static function cases(): array {
8        return [];
9    }
10}
11
12enum Suit {
13    use Rectangle;
14
15    case Hearts;
16    case Diamonds;
17    case Clubs;
18    case Spades;
19}
20
21var_dump(Suit::cases());
22
23?>
24--EXPECT--
25array(4) {
26  [0]=>
27  enum(Suit::Hearts)
28  [1]=>
29  enum(Suit::Diamonds)
30  [2]=>
31  enum(Suit::Clubs)
32  [3]=>
33  enum(Suit::Spades)
34}
35