Procházet zdrojové kódy

CS

   1) Tests/Admin/BaseFieldDescriptionTest.php (array_element_white_space_after_comma)
   2) Tests/Controller/CRUDControllerTest.php (unneeded_control_parentheses, extra_empty_lines)
   3) Controller/CRUDController.php (unneeded_control_parentheses)
   4) Form/Type/AdminType.php (unneeded_control_parentheses)
Sullivan SENECHAL před 9 roky
rodič
revize
c5b0944189

+ 3 - 3
Controller/CRUDController.php

@@ -666,7 +666,7 @@ class CRUDController extends Controller
      */
      */
     protected function isPreviewRequested()
     protected function isPreviewRequested()
     {
     {
-        return ($this->get('request')->get('btn_preview') !== null);
+        return $this->get('request')->get('btn_preview') !== null;
     }
     }
 
 
     /**
     /**
@@ -676,7 +676,7 @@ class CRUDController extends Controller
      */
      */
     protected function isPreviewApproved()
     protected function isPreviewApproved()
     {
     {
-        return ($this->get('request')->get('btn_preview_approve') !== null);
+        return $this->get('request')->get('btn_preview_approve') !== null;
     }
     }
 
 
     /**
     /**
@@ -702,7 +702,7 @@ class CRUDController extends Controller
      */
      */
     protected function isPreviewDeclined()
     protected function isPreviewDeclined()
     {
     {
-        return ($this->get('request')->get('btn_preview_decline') !== null);
+        return $this->get('request')->get('btn_preview_decline') !== null;
     }
     }
 
 
     /**
     /**

+ 1 - 1
Form/Type/AdminType.php

@@ -65,7 +65,7 @@ class AdminType extends AbstractType
     {
     {
         $resolver->setDefaults(array(
         $resolver->setDefaults(array(
             'delete'          => function (Options $options) {
             'delete'          => function (Options $options) {
-                return ($options['btn_delete'] !== false);
+                return $options['btn_delete'] !== false;
             },
             },
             'delete_options'  => array(
             'delete_options'  => array(
                 'type'         => 'checkbox',
                 'type'         => 'checkbox',

+ 1 - 1
Tests/Admin/BaseFieldDescriptionTest.php

@@ -122,7 +122,7 @@ class BaseFieldDescriptionTest extends \PHPUnit_Framework_TestCase
          * Test with Two parameters int
          * Test with Two parameters int
          */
          */
         $arg2 = 4;
         $arg2 = 4;
-        $twoParameters = array($arg1,$arg2);
+        $twoParameters = array($arg1, $arg2);
         $description2 = new FieldDescription();
         $description2 = new FieldDescription();
         $description2->setOption('code', 'getWithTwoParameters');
         $description2->setOption('code', 'getWithTwoParameters');
         $description2->setOption('parameters', $twoParameters);
         $description2->setOption('parameters', $twoParameters);

+ 2 - 3
Tests/Controller/CRUDControllerTest.php

@@ -215,7 +215,6 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
         $this->logger = $this->getMock('Psr\Log\LoggerInterface');
         $this->logger = $this->getMock('Psr\Log\LoggerInterface');
         $logger       = $this->logger; // php 5.3 BC
         $logger       = $this->logger; // php 5.3 BC
 
 
-
         $requestStack = null;
         $requestStack = null;
         if (Kernel::MINOR_VERSION > 3) {
         if (Kernel::MINOR_VERSION > 3) {
             $requestStack = new \Symfony\Component\HttpFoundation\RequestStack();
             $requestStack = new \Symfony\Component\HttpFoundation\RequestStack();
@@ -1541,7 +1540,7 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
                     return true;
                     return true;
                 }
                 }
 
 
-                return ($objectIn === $object);
+                return $objectIn === $object;
             }));
             }));
 
 
         $this->admin->expects($this->once())
         $this->admin->expects($this->once())
@@ -1692,7 +1691,7 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
                     return true;
                     return true;
                 }
                 }
 
 
-                return ($objectIn === $object);
+                return $objectIn === $object;
             }));
             }));
 
 
         $this->admin->expects($this->once())
         $this->admin->expects($this->once())