original_string: public function jsonSerialize($intDynamicPosition = null)
      {
          if (get_class($this->__subject) == "ValidFormBuilder\\GroupField"
              || get_class($this->__subject) == "ValidFormBuilder\\Area"
          ) {
              $identifier = $this->__subject->getId();
          } elseif (get_class($this->__subject) == "ValidFormBuilder\\StaticText") {
              $identifier = $this->__subject->getMeta("id");
          } else {
              $identifier = $this->__subject->getName();
              if ($intDynamicPosition > 0) {
                  $identifier = $identifier . "_" . $intDynamicPosition;
              }
          }
  
          $arrReturn = array(
              "subject" => $identifier,
              "property" => $this->__property,
              "value" => $this->__value,
              "comparisonType" => $this->__comparisontype,
              "comparisons" => array()
          );
  
          /* @var $objComparison \ValidFormBuilder\Comparison */
          foreach ($this->__comparisons as $objComparison) {
              array_push($arrReturn["comparisons"], $objComparison->jsonSerialize());
          }
  
          return $arrReturn;
      }
code: public function jsonSerialize($intDynamicPosition = null)
      {
          if (get_class($this->__subject) == "ValidFormBuilder\\GroupField"
              || get_class($this->__subject) == "ValidFormBuilder\\Area"
          ) {
              $identifier = $this->__subject->getId();
          } elseif (get_class($this->__subject) == "ValidFormBuilder\\StaticText") {
              $identifier = $this->__subject->getMeta("id");
          } else {
              $identifier = $this->__subject->getName();
              if ($intDynamicPosition > 0) {
                  $identifier = $identifier . "_" . $intDynamicPosition;
              }
          }
  
          $arrReturn = array(
              "subject" => $identifier,
              "property" => $this->__property,
              "value" => $this->__value,
              "comparisonType" => $this->__comparisontype,
              "comparisons" => array()
          );
  
          /* @var $objComparison \ValidFormBuilder\Comparison */
          foreach ($this->__comparisons as $objComparison) {
              array_push($arrReturn["comparisons"], $objComparison->jsonSerialize());
          }
  
          return $arrReturn;
      }
code_tokens: public function jsonSerialize ( $ intDynamicPosition = null ) { if ( get_class ( $ this -> __subject ) == "ValidFormBuilder\\GroupField" || get_class ( $ this -> __subject ) == "ValidFormBuilder\\Area" ) { $ identifier = $ this -> __subject -> getId ( ) ; } elseif ( get_class ( $ this -> __subject ) == "ValidFormBuilder\\StaticText" ) { $ identifier = $ this -> __subject -> getMeta ( "id" ) ; } else { $ identifier = $ this -> __subject -> getName ( ) ; if ( $ intDynamicPosition > 0 ) { $ identifier = $ identifier . "_" . $ intDynamicPosition ; } } $ arrReturn = array ( "subject" => $ identifier , "property" => $ this -> __property , "value" => $ this -> __value , "comparisonType" => $ this -> __comparisontype , "comparisons" => array ( ) ) ; /* @var $objComparison \ValidFormBuilder\Comparison */ foreach ( $ this -> __comparisons as $ objComparison ) { array_push ( $ arrReturn [ "comparisons" ] , $ objComparison -> jsonSerialize ( ) ) ; } return $ arrReturn ; }
docstring: toJson method creates an array representation of the current condition object and all
  of it's comparions.
  
  In the future this class should extend the JsonSerializable interface
  (http://php.net/manual/en/class.jsonserializable.php). Since this is only
  supported in PHP >= 5.4, we now use our own implementation.
  
  @param integer|null $intDynamicPosition
  @return array An array representation of this object and it's comparisons.
docstring_tokens: toJson method creates an array representation of the current condition object and all of it s comparions .