@@ -34,7 +34,7 @@ |
||
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) { |
@@ -281,7 +281,7 @@ |
||
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); |
@@ -82,9 +82,9 @@ |
||
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)) { |
@@ -301,11 +301,11 @@ |
||
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 | } |
@@ -410,9 +410,9 @@ |
||
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; |
@@ -123,7 +123,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -71,7 +71,7 @@ discard block |
||
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 |
||
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)) { |