THRIFT-5082 Add a Class reference for PHP enum $_TSPEC
Client: php
Patch: Stanislav Markevic

This closes #2000
diff --git a/compiler/cpp/src/thrift/generate/t_php_generator.cc b/compiler/cpp/src/thrift/generate/t_php_generator.cc
index 79bd5a2..e29ad77 100644
--- a/compiler/cpp/src/thrift/generate/t_php_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_php_generator.cc
@@ -746,9 +746,9 @@
   t = get_true_type(t);
   indent(out) << "'type' => " << type_to_enum(t) << "," << endl;
 
-  if (t->is_base_type() || t->is_enum()) {
+  if (t->is_base_type()) {
     // Noop, type is all we need
-  } else if (t->is_struct() || t->is_xception()) {
+  } else if (t->is_struct() || t->is_xception() || t->is_enum()) {
     indent(out) << "'class' => '" << php_namespace(t->get_program()) << t->get_name() << "',"
                 << endl;
   } else if (t->is_map()) {