Completed
Branch master (456d8b)
by Philip
08:53
created
src/CRUDlex/CRUDMySQLData.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      * @param boolean $deleteCascade
35 35
      * whether to delete children and subchildren
36 36
      *
37
-     * @return boolean
37
+     * @return integer
38 38
      * true on successful deletion
39 39
      */
40 40
     protected function doDelete(CRUDEntity $entity, $deleteCascade) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -281,7 +281,7 @@
 block discarded – undo
281 281
 
282 282
         if (count($params) > 0) {
283 283
             $i = 0;
284
-            foreach($params as $name => $value) {
284
+            foreach ($params as $name => $value) {
285 285
                 $queryBuilder
286 286
                     ->andWhere('`'.$name.'`'.$paramsOperators[$name].'?')
287 287
                     ->setParameter($i, $value);
Please login to merge, or discard this patch.
src/CRUDlex/CRUDSimpleFilesystemFileProcessor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,9 +82,9 @@
 block discarded – undo
82 82
         finfo_close($finfo);
83 83
         $size = filesize($file);
84 84
         if ($fileName && file_exists($file)) {
85
-            $response = new StreamedResponse(function () use ($file) {
85
+            $response = new StreamedResponse(function() use ($file) {
86 86
                 set_time_limit(0);
87
-                $handle = fopen($file,"rb");
87
+                $handle = fopen($file, "rb");
88 88
                 if ($handle !== false) {
89 89
                     $chunkSize = 1024 * 1024;
90 90
                     while (!feof($handle)) {
Please login to merge, or discard this patch.
src/CRUDlex/CRUDEntityDefinition.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -301,11 +301,11 @@
 block discarded – undo
301 301
     }
302 302
 
303 303
     /**
304
-    * Sets the amount of items to display per page on the listview.
305
-    *
306
-    * @param integer $pageSize
307
-    * the amount of items to display per page on the listview
308
-    */
304
+     * Sets the amount of items to display per page on the listview.
305
+     *
306
+     * @param integer $pageSize
307
+     * the amount of items to display per page on the listview
308
+     */
309 309
     public function setPageSize($pageSize) {
310 310
         $this->pageSize = $pageSize;
311 311
     }
Please login to merge, or discard this patch.
src/CRUDlex/CRUDServiceProvider.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -410,9 +410,9 @@
 block discarded – undo
410 410
         $zeroFraction = $float - floor($float) == 0 ? '0' : '';
411 411
 
412 412
         // We don't want values like 0.004 converted to  0.00400000000000000008
413
-    	if ($float > 0.0001) {
414
-    		return $float . ($zeroFraction === '0' ? '.'.$zeroFraction : '');
415
-    	}
413
+        if ($float > 0.0001) {
414
+            return $float . ($zeroFraction === '0' ? '.'.$zeroFraction : '');
415
+        }
416 416
 
417 417
         // We don't want values like 0.00004 converted to its scientific notation 4.0E-5
418 418
         return rtrim(sprintf('%.20F', $float), '0').$zeroFraction;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
         if (!$app->offsetExists('twig')) {
125 125
             $app->register(new \Silex\Provider\TwigServiceProvider());
126
-            $app['twig.loader.filesystem']->addPath(__DIR__ . '/../views/', 'crud');
126
+            $app['twig.loader.filesystem']->addPath(__DIR__.'/../views/', 'crud');
127 127
         }
128 128
 
129 129
         $app['translator']->addLoader('yaml', new YamlFileLoader());
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 
146 146
             $localeLabels = array();
147 147
             foreach ($locales as $locale) {
148
-                if (array_key_exists('label_' . $locale, $crud)) {
148
+                if (array_key_exists('label_'.$locale, $crud)) {
149 149
                     $localeLabels[$locale] = $crud['label_'.$locale];
150 150
                 }
151 151
             }
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
 
412 412
         // We don't want values like 0.004 converted to  0.00400000000000000008
413 413
     	if ($float > 0.0001) {
414
-    		return $float . ($zeroFraction === '0' ? '.'.$zeroFraction : '');
414
+    		return $float.($zeroFraction === '0' ? '.'.$zeroFraction : '');
415 415
     	}
416 416
 
417 417
         // We don't want values like 0.00004 converted to its scientific notation 4.0E-5
Please login to merge, or discard this patch.
src/CRUDlex/CRUDControllerProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function connect(Application $app) {
73 73
         if ($app->offsetExists('twig.loader.filesystem')) {
74
-            $app['twig.loader.filesystem']->addPath(__DIR__ . '/../views/', 'crud');
74
+            $app['twig.loader.filesystem']->addPath(__DIR__.'/../views/', 'crud');
75 75
         }
76 76
 
77 77
         if (!$app->offsetExists('crud.layout')) {
@@ -520,9 +520,9 @@  discard block
 block discarded – undo
520 520
 
521 521
         $size = filesize($file);
522 522
 
523
-        $response = new StreamedResponse(function () use ($file) {
523
+        $response = new StreamedResponse(function() use ($file) {
524 524
             set_time_limit(0);
525
-            $handle = fopen($file,"rb");
525
+            $handle = fopen($file, "rb");
526 526
             if ($handle !== false) {
527 527
                 $chunkSize = 1024 * 1024;
528 528
                 while (!feof($handle)) {
Please login to merge, or discard this patch.