Skip to content

Commit

Permalink
fixed typos, added docblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
joonsp committed Sep 4, 2012
1 parent a27a5ad commit b95bbe0
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Event/Subscriber/ElasticaQuerySubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
*/
class ElasticaQuerySubscriber extends BaseSubscriber
{
/**
* @param ItemsEvent $event
*/
public function items(ItemsEvent $event)
{
if (is_array($event->target) && 2 === count($event->target) && isset($event->target[0], $event->target[1]) &&
Expand Down
7 changes: 7 additions & 0 deletions Form/ChoosableSearchType.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@ class ChoosableSearchType extends SearchType

private $choices = array();

/**
* @param array $choices
*/
public function __construct($choices)
{
$this->choices = $choices;
}

/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
Expand Down
18 changes: 14 additions & 4 deletions Form/SearchType.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@

class SearchType extends AbstractType
{


/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
{
$builder
->add('options', 'hidden')
->add('index', 'hidden')
Expand All @@ -19,16 +23,22 @@ public function buildForm(FormBuilderInterface $builder, array $options)
->add('term', 'text', array('label' => 'search.form.term.label'));
}

/**
* @return string
*/
public function getName()
{
return 'xi_searchbundle_searchtype';
}


/**
* @param OptionsResolverInterface $resolver
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'Xi\Bundle\SearchBundle\Form\Model\SearchModel',
));
}

}
4 changes: 2 additions & 2 deletions Service/Search/FOQElasticaSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function search($index, $term, $limit = null)
* Gets a paginator wrapping the result of a search
*
* @param string $index
* @param strgin $term
* @param string $term
* @param int $page
* @param int $limit
* @return PaginationInterface
Expand Down Expand Up @@ -110,7 +110,7 @@ public function find($index, $term, $limit = null)
* Gets a paginator wrapping the result of a search
*
* @param string $index
* @param strgin $term
* @param string $term
* @param int $page
* @param int $limit
* @return PaginationInterface
Expand Down

0 comments on commit b95bbe0

Please sign in to comment.