original_string: public function arrayToClassElement($definition)
      {
          $class = new Classes();
          if (isset($definition['docblock'])) {
              $docblock = $this->arrayToDocblockElement($definition['docblock']);
              $class->setDocbloc($docblock);
          }
          if (isset($definition['namespace'])) {
              $class->setNamespace($definition['namespace']);
          }
          if (isset($definition['name'])) {
              $class->setName($definition['name']);
          }
          if (isset($definition['extends'])) {
             $class->setExtends($definition['extends']);
          }
          if (isset($definition['implements'])) {
              foreach ($definition['implements'] as $interface) {
                  $class->addImplements($interface);
              }
          }
          if (isset($definition['uses'])) {
              foreach ($definition['uses'] as $alias => $use) {
                  $alias = is_string($alias) ? $alias : null;
                  $class->addUse($use, $alias);
              }
          }
          if (isset($definition['functions'])) {
              foreach ($definition['functions'] as $definition) {
                  $function = $this->arrayToFunctionElement($definition);
                  $class->addFunction($function);
              }
          }
          return $class;
      }
code: public function arrayToClassElement($definition)
      {
          $class = new Classes();
          if (isset($definition['docblock'])) {
              $docblock = $this->arrayToDocblockElement($definition['docblock']);
              $class->setDocbloc($docblock);
          }
          if (isset($definition['namespace'])) {
              $class->setNamespace($definition['namespace']);
          }
          if (isset($definition['name'])) {
              $class->setName($definition['name']);
          }
          if (isset($definition['extends'])) {
             $class->setExtends($definition['extends']);
          }
          if (isset($definition['implements'])) {
              foreach ($definition['implements'] as $interface) {
                  $class->addImplements($interface);
              }
          }
          if (isset($definition['uses'])) {
              foreach ($definition['uses'] as $alias => $use) {
                  $alias = is_string($alias) ? $alias : null;
                  $class->addUse($use, $alias);
              }
          }
          if (isset($definition['functions'])) {
              foreach ($definition['functions'] as $definition) {
                  $function = $this->arrayToFunctionElement($definition);
                  $class->addFunction($function);
              }
          }
          return $class;
      }
code_tokens: public function arrayToClassElement ( $ definition ) { $ class = new Classes ( ) ; if ( isset ( $ definition [ 'docblock' ] ) ) { $ docblock = $ this -> arrayToDocblockElement ( $ definition [ 'docblock' ] ) ; $ class -> setDocbloc ( $ docblock ) ; } if ( isset ( $ definition [ 'namespace' ] ) ) { $ class -> setNamespace ( $ definition [ 'namespace' ] ) ; } if ( isset ( $ definition [ 'name' ] ) ) { $ class -> setName ( $ definition [ 'name' ] ) ; } if ( isset ( $ definition [ 'extends' ] ) ) { $ class -> setExtends ( $ definition [ 'extends' ] ) ; } if ( isset ( $ definition [ 'implements' ] ) ) { foreach ( $ definition [ 'implements' ] as $ interface ) { $ class -> addImplements ( $ interface ) ; } } if ( isset ( $ definition [ 'uses' ] ) ) { foreach ( $ definition [ 'uses' ] as $ alias => $ use ) { $ alias = is_string ( $ alias ) ? $ alias : null ; $ class -> addUse ( $ use , $ alias ) ; } } if ( isset ( $ definition [ 'functions' ] ) ) { foreach ( $ definition [ 'functions' ] as $ definition ) { $ function = $ this -> arrayToFunctionElement ( $ definition ) ; $ class -> addFunction ( $ function ) ; } } return $ class ; }
docstring: Transform an array to a class element object
  
  @param array $definition Class definitoion
  
  @return Deflection\Element\Classes
docstring_tokens: Transform an array to a class element object