Skip to content

Commit

Permalink
Fix some PHPDoc for better IDE autocompletion
Browse files Browse the repository at this point in the history
  • Loading branch information
Koc authored and rande committed Mar 16, 2015
1 parent ad3e92b commit f9802c6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 37 deletions.
24 changes: 8 additions & 16 deletions Form/FormMapper.php
Expand Up @@ -27,9 +27,9 @@ class FormMapper extends BaseGroupedMapper
protected $formBuilder;

/**
* @param \Sonata\AdminBundle\Builder\FormContractorInterface $formContractor
* @param \Symfony\Component\Form\FormBuilderInterface $formBuilder
* @param \Sonata\AdminBundle\Admin\AdminInterface $admin
* @param FormContractorInterface $formContractor
* @param FormBuilderInterface $formBuilder
* @param AdminInterface $admin
*/
public function __construct(FormContractorInterface $formContractor, FormBuilderInterface $formBuilder, AdminInterface $admin)
{
Expand All @@ -38,9 +38,7 @@ public function __construct(FormContractorInterface $formContractor, FormBuilder
}

/**
* @param array $keys field names
*
* @return \Sonata\AdminBundle\Form\FormMapper
* {@inheritdoc}
*/
public function reorder(array $keys)
{
Expand All @@ -55,7 +53,7 @@ public function reorder(array $keys)
* @param array $options
* @param array $fieldDescriptionOptions
*
* @return \Sonata\AdminBundle\Form\FormMapper
* @return $this
*/
public function add($name, $type = null, array $options = array(), array $fieldDescriptionOptions = array())
{
Expand Down Expand Up @@ -143,29 +141,23 @@ public function add($name, $type = null, array $options = array(), array $fieldD
}

/**
* @param string $name
*
* @return FormBuilderInterface
* {@inheritdoc}
*/
public function get($name)
{
return $this->formBuilder->get($name);
}

/**
* @param string $key
*
* @return boolean
* {@inheritdoc}
*/
public function has($key)
{
return $this->formBuilder->has($key);
}

/**
* @param string $key
*
* @return \Sonata\AdminBundle\Form\FormMapper
* {@inheritdoc}
*/
public function remove($key)
{
Expand Down
2 changes: 1 addition & 1 deletion Mapper/BaseGroupedMapper.php
Expand Up @@ -232,7 +232,7 @@ public function hasOpenTab()
}

/**
* Add the fieldname to the current group
* Add the field name to the current group
*
* @param string $fieldName
*/
Expand Down
7 changes: 3 additions & 4 deletions Mapper/BaseMapper.php
Expand Up @@ -19,14 +19,13 @@
*/
abstract class BaseMapper
{

protected $admin;

protected $builder;

/**
* @param \Sonata\AdminBundle\Builder\BuilderInterface $builder
* @param \Sonata\AdminBundle\Admin\AdminInterface $admin
* @param BuilderInterface $builder
* @param AdminInterface $admin
*/
public function __construct(BuilderInterface $builder, AdminInterface $admin)
{
Expand All @@ -35,7 +34,7 @@ public function __construct(BuilderInterface $builder, AdminInterface $admin)
}

/**
* @return \Sonata\AdminBundle\Admin\AdminInterface
* @return AdminInterface
*/
public function getAdmin()
{
Expand Down
24 changes: 8 additions & 16 deletions Show/ShowMapper.php
Expand Up @@ -25,9 +25,9 @@ class ShowMapper extends BaseGroupedMapper
protected $list;

/**
* @param \Sonata\AdminBundle\Builder\ShowBuilderInterface $showBuilder
* @param \Sonata\AdminBundle\Admin\FieldDescriptionCollection $list
* @param \Sonata\AdminBundle\Admin\AdminInterface $admin
* @param ShowBuilderInterface $showBuilder
* @param FieldDescriptionCollection $list
* @param AdminInterface $admin
*/
public function __construct(ShowBuilderInterface $showBuilder, FieldDescriptionCollection $list, AdminInterface $admin)
{
Expand All @@ -42,7 +42,7 @@ public function __construct(ShowBuilderInterface $showBuilder, FieldDescriptionC
* @param mixed $type
* @param array $fieldDescriptionOptions
*
* @return \Sonata\AdminBundle\Show\ShowMapper
* @return $this
*/
public function add($name, $type = null, array $fieldDescriptionOptions = array())
{
Expand Down Expand Up @@ -80,29 +80,23 @@ public function add($name, $type = null, array $fieldDescriptionOptions = array(
}

/**
* @param string $name
*
* @return array
* {@inheritdoc}
*/
public function get($name)
{
return $this->list->get($name);
}

/**
* @param string $key
*
* @return bool
* {@inheritdoc}
*/
public function has($key)
{
return $this->list->has($key);
}

/**
* @param string $key
*
* @return \Sonata\AdminBundle\Show\ShowMapper
* {@inheritdoc}
*/
public function remove($key)
{
Expand All @@ -113,9 +107,7 @@ public function remove($key)
}

/**
* @param array $keys field names
*
* @return \Sonata\AdminBundle\Show\ShowMapper
* {@inheritdoc}
*/
public function reorder(array $keys)
{
Expand Down

0 comments on commit f9802c6

Please sign in to comment.