public function graph()
 {
     return Entity::graph(['GraphObjectBase'])->properties(['aString' => Type::String(), 'anInteger' => Type::Integer()->expected(array('integer_val')), 'aBoolean' => Type::Boolean(), 'flatArray' => Type::FlatArray(), 'aDouble' => Type::Double()->defaultVal(20.0)])->finalize(function (GraphObjectBase $instance, $scenario) {
         if ($scenario === 'test-finalize-inject') {
             $instance->aString = 'thisisthefinalizedstring';
             $instance->aDouble = $instance->aDouble + 1.5;
         }
     });
 }
 public function graph()
 {
     return parent::graph()->extend(['User'])->properties(['age' => Type::Integer(), 'email' => Type::String(), 'loggedIn' => Type::Boolean(), 'location' => Type::Object(Location::create()), 'friends' => Type::Collection(Person::create())])->finalize(function (User $instance, $scenario, $data) {
         $instance->email .= '__appended_finalized_value';
     });
 }
 public function graph()
 {
     return Entity::graph(['GraphObjectStep'])->properties(['nested' => Type::Object(GraphObjectNest::create()), 'child' => Type::Object(GraphObjectChild::create()), 'list' => Type::Object(GraphObjectList::create()), 'property' => Type::String()->expected(array('someProperty')), 'anotherProperty' => Type::Integer()->expected(array('someOtherProperty'))]);
 }
 public function graph()
 {
     return parent::graph()->extend(['GraphObjectExpected'])->properties(['string' => Type::String()->bindTo(['str', 'alphanumeric'])->expected(['__string', 'string__', 'str_val']), 'integer' => Type::Integer()->bindTo(['int'])->expected(['__integer', '__int', 'int_val']), 'simpleCollection' => Type::Collection(GraphSimple::create())->bindTo(['simple_collection', 'simples'])->expected(['simpleData', 'simple_data', 'simple-data']), 'simple' => Type::Object(GraphSimple::create())->bindTo(['GraphSimple', 'simple-val', 'simple.nested'])->expected(['__simple', 'simple__', 'nested.simple'])]);
 }
 public function graph()
 {
     return Entity::graph(['GraphSimple'])->properties(['simpleInteger' => Type::Integer()->bindTo(['simple-integer', 'simple_integer'])->expected(['simpleInt', 'simple-int']), 'simpleString' => Type::String()->bindTo(['simple-string', 'simple_string'])->expected(['simpleString', 'simple-str']), 'simpleMixed' => Type::Mixed()->bindTo(['simple-mixed'])->expected(['mixed-simple'])]);
 }
 /**
  * @return Entity
  */
 public function graph()
 {
     return Entity::graph(['Person'])->properties(['id' => Type::Integer(), 'name' => Type::String(), 'gender' => Type::String()]);
 }
 public function graph()
 {
     return Entity::graph(['GraphObjectNestedData'])->properties(['_id' => Type::Integer()->bindTo(['id']), 'integer' => Type::Integer()->bindTo(['flatNest.integer']), 'array' => Type::FlatArray()->bindTo(['flatNest.array']), 'anotherInteger' => Type::Integer()->expected(['flatNest.nest.integer']), 'base' => Type::Object(GraphObjectBase::create())->expected(['objectNest.base']), 'child' => Type::Object(GraphObjectChild::create())->bindTo(['objectNest.nest.child']), 'aProperty' => Type::Integer()->bindTo(['preferedproperty'])]);
 }