original_string: private function getElements($annotations, $formClass)
      {
          $labels = $this->getLabels($annotations);
          $reflection = new \ReflectionClass($formClass);
          $defaultValues = $reflection->getDefaultProperties();
  
          $elements = [];
          $it = $this->getAnnotations()->filter($annotations)
              ->is(InputInterface::class)
              ->onProperties();
          foreach ($it as $annotation) {
              $property = $annotation->getPropertyName();
              if (!isset($annotation->name)) {
                  $annotation->name = $property;
              }
              $elem = $annotation->getElement($this);
              if ($annotation->label) {
                  $label = $annotation->label;
              } elseif (isset($labels[$property])) {
                  $label = $labels[$property];
              } else {
                  $label = str_replace('_', ' ', ucfirst($property));
              }
              $elem->setLabel($label);
              if (isset($defaultValues[$property])) {
                  $elem->setDefault($defaultValues[$property]);
              }
              $elements[$property] = $elem;
          }
          return $elements;
      }
code: private function getElements($annotations, $formClass)
      {
          $labels = $this->getLabels($annotations);
          $reflection = new \ReflectionClass($formClass);
          $defaultValues = $reflection->getDefaultProperties();
  
          $elements = [];
          $it = $this->getAnnotations()->filter($annotations)
              ->is(InputInterface::class)
              ->onProperties();
          foreach ($it as $annotation) {
              $property = $annotation->getPropertyName();
              if (!isset($annotation->name)) {
                  $annotation->name = $property;
              }
              $elem = $annotation->getElement($this);
              if ($annotation->label) {
                  $label = $annotation->label;
              } elseif (isset($labels[$property])) {
                  $label = $labels[$property];
              } else {
                  $label = str_replace('_', ' ', ucfirst($property));
              }
              $elem->setLabel($label);
              if (isset($defaultValues[$property])) {
                  $elem->setDefault($defaultValues[$property]);
              }
              $elements[$property] = $elem;
          }
          return $elements;
      }
code_tokens: private function getElements ( $ annotations , $ formClass ) { $ labels = $ this -> getLabels ( $ annotations ) ; $ reflection = new \ ReflectionClass ( $ formClass ) ; $ defaultValues = $ reflection -> getDefaultProperties ( ) ; $ elements = [ ] ; $ it = $ this -> getAnnotations ( ) -> filter ( $ annotations ) -> is ( InputInterface :: class ) -> onProperties ( ) ; foreach ( $ it as $ annotation ) { $ property = $ annotation -> getPropertyName ( ) ; if ( ! isset ( $ annotation -> name ) ) { $ annotation -> name = $ property ; } $ elem = $ annotation -> getElement ( $ this ) ; if ( $ annotation -> label ) { $ label = $ annotation -> label ; } elseif ( isset ( $ labels [ $ property ] ) ) { $ label = $ labels [ $ property ] ; } else { $ label = str_replace ( '_' , ' ' , ucfirst ( $ property ) ) ; } $ elem -> setLabel ( $ label ) ; if ( isset ( $ defaultValues [ $ property ] ) ) { $ elem -> setDefault ( $ defaultValues [ $ property ] ) ; } $ elements [ $ property ] = $ elem ; } return $ elements ; }
docstring: Gets all form elements
  
  @return array key is property, value is Phalcon\Form\Element object
docstring_tokens: Gets all form elements