Permalink
Browse files

cs standar fixed

  • Loading branch information...
1 parent 179ec95 commit 03a196e7c91a70e87ae99e7e629bbd89626287d6 @neoshadybeat neoshadybeat committed Aug 13, 2012
@@ -171,7 +171,6 @@ public static function checkSymlink($symlinkTarget, $symlinkName, $forceSymlink
return false;
} else {
-
return true;
}
}
@@ -10,7 +10,6 @@
use Mopa\Bridge\Composer\Adapter\ComposerAdapter;
use Mopa\Bridge\Composer\Util\ComposerPathFinder;
-
/**
* Command to check and create bootstrap symlink into MopaBootstrapBundle
*/
@@ -172,7 +171,6 @@ public static function checkSymlink($symlinkTarget, $symlinkName, $forceSymlink
return false;
} else {
-
return true;
}
}
@@ -5,7 +5,6 @@
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
-use Symfony\Component\Form\FormBuilderInterface;
class ErrorTypeFormTypeExtension extends AbstractTypeExtension
{
@@ -22,7 +21,7 @@ public function buildView(FormView $view, FormInterface $form, array $options)
}
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
- $resolver->setDefaults(array(
+ $resolver->setDefaults(array(
'error_type' => $this->error_type,
'error_delay'=> false
));
@@ -5,7 +5,6 @@
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
-use Symfony\Component\Form\FormBuilderInterface;
class HelpFormTypeExtension extends AbstractTypeExtension
{
@@ -15,10 +14,10 @@ public function buildView(FormView $view, FormInterface $form, array $options)
$view->vars['help_block'] = $options['help_block'];
$view->vars['help_label'] = $options['help_label'];
}
-
- public function setDefaultOptions(OptionsResolverInterface $resolver)
- {
- $resolver->setDefaults(array(
+
+ public function setDefaultOptions(OptionsResolverInterface $resolver)
+ {
+ $resolver->setDefaults(array(
'help_inline' => null,
'help_block' => null,
'help_label' => null,
@@ -5,7 +5,6 @@
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
-use Symfony\Component\Form\FormBuilderInterface;
class LegendFormTypeExtension extends AbstractTypeExtension
{
@@ -35,7 +34,7 @@ public function buildView(FormView $view, FormInterface $form, array $options)
}
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
- $resolver->setDefaults(array(
+ $resolver->setDefaults(array(
'render_fieldset' => $this->render_fieldset,
'show_legend' => $this->show_legend,
'show_child_legend' => $this->show_child_legend,
@@ -5,7 +5,6 @@
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
-use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\Exception\FormException;
class WidgetCollectionFormTypeExtension extends AbstractTypeExtension
@@ -55,10 +54,10 @@ public function buildView(FormView $view, FormInterface $form, array $options)
$view->vars['widget_add_btn'] = $options['widget_add_btn'];
$view->vars['widget_remove_btn'] = $options['widget_remove_btn'];
}
-
- public function setDefaultOptions(OptionsResolverInterface $resolver)
- {
- $resolver->setDefaults(array(
+
+ public function setDefaultOptions(OptionsResolverInterface $resolver)
+ {
+ $resolver->setDefaults(array(
'ommit_collection_item' => false,
'widget_add_btn' => null,
'widget_remove_btn' => null,
@@ -5,7 +5,6 @@
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
-use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\Exception\CreationException;
class WidgetFormTypeExtension extends AbstractTypeExtension
@@ -26,8 +25,8 @@ public function buildView(FormView $view, FormInterface $form, array $options)
$options['widget_addon']['type'] = 'prepend';
}
}
- if (((isset($options['widget_addon']['text']) && $options['widget_addon']['text'] !== null)
- || (isset($options['widget_addon']['icon']) && $options['widget_addon']['icon'] !== null)) && $options['widget_addon']['type'] === null) {
+ if (((isset($options['widget_addon']['text']) && $options['widget_addon']['text'] !== null)
+ || (isset($options['widget_addon']['icon']) && $options['widget_addon']['icon'] !== null)) && $options['widget_addon']['type'] === null) {
throw new \Exception('You must provide a "type" for widget_addon');
}
@@ -43,29 +42,29 @@ public function buildView(FormView $view, FormInterface $form, array $options)
}
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
- $resolver->setDefaults(
- array(
- 'widget_control_group' => true,
- 'widget_controls' => true,
- 'widget_addon' => array(
- 'type' => null, //false: dont add anything, null: using presets, anything; prepend; append
- 'icon' => null,
- 'text' => null,
- ),
- 'widget_prefix' => null,
- 'widget_suffix' => null,
- 'widget_type' => '',
- 'widget_control_group_attr' => array(),
- 'widget_controls_attr' => array(),
- )
+ $resolver->setDefaults(
+ array(
+ 'widget_control_group' => true,
+ 'widget_controls' => true,
+ 'widget_addon' => array(
+ 'type' => null, //false: dont add anything, null: using presets, anything; prepend; append
+ 'icon' => null,
+ 'text' => null,
+ ),
+ 'widget_prefix' => null,
+ 'widget_suffix' => null,
+ 'widget_type' => '',
+ 'widget_control_group_attr' => array(),
+ 'widget_controls_attr' => array(),
+ )
+ );
+ $resolver->setAllowedValues(array(
+ 'widget_type' => array(
+ 'inline',
+ '',
+ )
+ )
);
- $resolver->setAllowedValues(array(
- 'widget_type' => array(
- 'inline',
- '',
- )
- )
- );
}
public function getExtendedType()
{
View
@@ -12,7 +12,7 @@ class MopaBootstrapBundle extends Bundle
public function build(ContainerBuilder $container)
{
parent::build($container);
-
+
$container->addCompilerPass(new FormPass());
$container->addCompilerPass(new NavbarPass());
}
@@ -22,24 +22,24 @@ public function __construct(FactoryInterface $factory)
$this->factory = $factory;
}
-
- /**
- * get a preconfigured menu item for navbar where to easily add childs
- *
- * @param string $title Title of the item
- * @param boolean $push_right Make if float right default: true
- */
- protected function createNavbarMenuItem($name = 'root', $push_right = true)
- {
- $rootItem = $this->factory->createItem($name);
- $rootItem
- ->setChildrenAttribute('class', 'nav')
- ;
- if ($push_right) {
- $this->pushRight($rootItem);
- }
-
- return $rootItem;
+
+ /**
+ * get a preconfigured menu item for navbar where to easily add childs
+ *
+ * @param string $title Title of the item
+ * @param boolean $push_right Make if float right default: true
+ */
+ protected function createNavbarMenuItem($name = 'root', $push_right = true)
+ {
+ $rootItem = $this->factory->createItem($name);
+ $rootItem
+ ->setChildrenAttribute('class', 'nav')
+ ;
+ if ($push_right) {
+ $this->pushRight($rootItem);
+ }
+
+ return $rootItem;
}
/**
* get a preconfigured menu item for subnavbar where to easily add childs
@@ -2,6 +2,6 @@
namespace Mopa\Bundle\BootstrapBundle\Navbar;
-class OptionNotFoundException extends \RuntimeException{
-
+class OptionNotFoundException extends \RuntimeException
+{
}
@@ -29,4 +29,3 @@ services:
- { widget_add_btn: %mopa_bootstrap.form.collection.widget_add_btn%, widget_remove_btn: %mopa_bootstrap.form.collection.widget_remove_btn% }
tags:
- { name: form.type_extension, alias: form }
-
@@ -9,5 +9,3 @@ services:
arguments: [ @service_container ]
tags:
- { name: twig.extension }
-
-
@@ -8,4 +8,3 @@
'allow_safe_labels': true}) : '' }}
</div>
{% endblock navbar %}
-
@@ -34,4 +34,4 @@ uncomment and adapt this to your path
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock foot_script %}
-#}
+#}
@@ -185,4 +185,3 @@
{% endjavascripts %}
{% endblock foot_script %}
{% endblock body %}
-
View
@@ -25,4 +25,3 @@
system(sprintf('cd %s && git fetch origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev)));
}
-

0 comments on commit 03a196e

Please sign in to comment.