> */ public static function rules(): array { $rules = array(); foreach ( array( 'DENY' => self::DENIED, 'REQUIRE_APPROVAL' => self::HELD, ) as $decision => $entity_types ) { foreach ( $entity_types as $entity_type ) { foreach ( self::WRITES as $category ) { $rules[] = array( 'match' => array( 'entity_type' => $entity_type, 'action_cat' => $category, ), 'decision' => $decision, ); } } } foreach ( self::MEASURED as list( $entity_type, $category ) ) { $rules[] = array( 'match' => array( 'entity_type' => $entity_type, 'action_cat' => $category, ), 'when' => array( array( 'fact' => 'money.unconvertible', 'op' => 'eq', 'value' => true, ), ), 'decision' => 'REQUIRE_APPROVAL', ); } return $rules; } }