@@ -96,7 +96,7 @@ |
||
| 96 | 96 | 'tags' => array(array('name' => 'dtc_grid.source')), |
| 97 | 97 | 'calls' => array( |
| 98 | 98 | array('autoDiscoverColumns'), |
| 99 | - ), ); |
|
| 99 | + ),); |
|
| 100 | 100 | |
| 101 | 101 | if ($columns && isset($gridColumnsNamespace) && isset($gridColumnClass)) { |
| 102 | 102 | $config[$serviceName]['calls'] = array( |
@@ -386,7 +386,7 @@ |
||
| 386 | 386 | return; |
| 387 | 387 | } |
| 388 | 388 | |
| 389 | - uasort($ordered, function ($columnDef1, $columnDef2) { |
|
| 389 | + uasort($ordered, function($columnDef1, $columnDef2) { |
|
| 390 | 390 | $columnParts1 = $columnDef1['arguments']; |
| 391 | 391 | $columnParts2 = $columnDef2['arguments']; |
| 392 | 392 | $order1 = $columnParts1[5]; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | { |
| 90 | 90 | $cacheDir = $container->getParameter('kernel.cache_dir'); |
| 91 | 91 | if ($container->hasParameter('kernel.project_dir')) { |
| 92 | - $directory = $container->getParameter('kernel.project_dir') . \DIRECTORY_SEPARATOR . 'config' . \DIRECTORY_SEPARATOR . 'dtc_grid'; |
|
| 92 | + $directory = $container->getParameter('kernel.project_dir').\DIRECTORY_SEPARATOR.'config'.\DIRECTORY_SEPARATOR.'dtc_grid'; |
|
| 93 | 93 | if (is_dir($directory)) { |
| 94 | 94 | $finder = new Finder(); |
| 95 | 95 | $finder->files()->in(str_replace(\DIRECTORY_SEPARATOR, '/', $directory)); |
@@ -104,8 +104,8 @@ discard block |
||
| 104 | 104 | $finder->files()->in($directory)->name('dtc_grid.yaml')->name('dtc_grid.yml')->path('Resources/config'); |
| 105 | 105 | self::cacheAllFiles($cacheDir, $finder); |
| 106 | 106 | if (class_exists('Symfony\Component\Config\Resource\GlobResource')) { |
| 107 | - $container->addResource(new \Symfony\Component\Config\Resource\GlobResource(str_replace('/', \DIRECTORY_SEPARATOR, $directory),str_replace('/', \DIRECTORY_SEPARATOR, '/**/Resources/config/dtc_grid.yaml'), false)); |
|
| 108 | - $container->addResource(new \Symfony\Component\Config\Resource\GlobResource(str_replace('/', \DIRECTORY_SEPARATOR, $directory),str_replace('/', \DIRECTORY_SEPARATOR, '/**/Resources/config/dtc_grid.yml'), false)); |
|
| 107 | + $container->addResource(new \Symfony\Component\Config\Resource\GlobResource(str_replace('/', \DIRECTORY_SEPARATOR, $directory), str_replace('/', \DIRECTORY_SEPARATOR, '/**/Resources/config/dtc_grid.yaml'), false)); |
|
| 108 | + $container->addResource(new \Symfony\Component\Config\Resource\GlobResource(str_replace('/', \DIRECTORY_SEPARATOR, $directory), str_replace('/', \DIRECTORY_SEPARATOR, '/**/Resources/config/dtc_grid.yml'), false)); |
|
| 109 | 109 | } |
| 110 | 110 | // TODO: To cover symfony versions that don't support GlobResource, such as 2.x, it would probably be necessary to add a recursive set of FileExistenceResources here. |
| 111 | 111 | } |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | private static function addLocalCssJs(ContainerBuilder $container, $type) { |
| 115 | 115 | $parameter = 'dtc_grid.datatables.local.files.'.$type; |
| 116 | 116 | if ($container->hasParameter($parameter)) { |
| 117 | - foreach($container->getParameter($parameter) as $filepath) { |
|
| 117 | + foreach ($container->getParameter($parameter) as $filepath) { |
|
| 118 | 118 | $container->addResource(new FileResource($filepath)); |
| 119 | 119 | } |
| 120 | 120 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | public static function fromCamelCase($str) |
| 13 | 13 | { |
| 14 | - $value = preg_replace_callback('/([A-Z])/', function ($str) { |
|
| 14 | + $value = preg_replace_callback('/([A-Z])/', function($str) { |
|
| 15 | 15 | return ' '.$str[0]; |
| 16 | 16 | }, $str); |
| 17 | 17 | $value = ucfirst($value); |
@@ -386,7 +386,7 @@ |
||
| 386 | 386 | return; |
| 387 | 387 | } |
| 388 | 388 | |
| 389 | - uasort($ordered, function ($columnDef1, $columnDef2) { |
|
| 389 | + uasort($ordered, function($columnDef1, $columnDef2) { |
|
| 390 | 390 | $columnParts1 = $columnDef1['arguments']; |
| 391 | 391 | $columnParts2 = $columnDef2['arguments']; |
| 392 | 392 | $order1 = $columnParts1[5]; |
@@ -53,18 +53,18 @@ |
||
| 53 | 53 | $uri = $this->router->generate($route, ['identifier' => $id, 'id' => $this->gridSourceId]); |
| 54 | 54 | $uri = htmlspecialchars($uri); |
| 55 | 55 | $content .= "<button class=\"btn btn-primary grid-delete\" data-route=\"$uri\" data-id=\"$idHtml\""; |
| 56 | - $content .= "onclick=\"dtc_grid_delete(this)\">" . static::$spinnerHtml . "$label</button>"; |
|
| 56 | + $content .= "onclick=\"dtc_grid_delete(this)\">".static::$spinnerHtml."$label</button>"; |
|
| 57 | 57 | break; |
| 58 | 58 | default: |
| 59 | 59 | $uri = $this->router->generate($route, ['identifier' => $id, 'id' => $this->gridSourceId]); |
| 60 | 60 | $uri = htmlspecialchars($uri); |
| 61 | 61 | $content .= "<button class \""; |
| 62 | 62 | if (isset($options['button_class'])) { |
| 63 | - $content .= " " . $options['button_class']; |
|
| 63 | + $content .= " ".$options['button_class']; |
|
| 64 | 64 | } |
| 65 | 65 | $content .= " data-route=\"$uri\" data-id=\"$idHtml\""; |
| 66 | 66 | if (isset($options['onclick'])) { |
| 67 | - $content .= " onclick=\"" . htmlspecialchars($options['onclick']) . "\""; |
|
| 67 | + $content .= " onclick=\"".htmlspecialchars($options['onclick'])."\""; |
|
| 68 | 68 | } |
| 69 | 69 | $content .= ">$label</button>"; |
| 70 | 70 | } |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | return $value->format(\DateTime::ISO8601); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - return 'object: ' . get_class($value); |
|
| 47 | + return 'object: '.get_class($value); |
|
| 48 | 48 | } elseif (is_scalar($value)) { |
| 49 | 49 | return $value; |
| 50 | 50 | } elseif (is_array($value)) { |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | return $value->format(\DateTime::ISO8601); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - return 'object: ' . get_class($value); |
|
| 47 | + return 'object: '.get_class($value); |
|
| 48 | 48 | } elseif (is_scalar($value)) { |
| 49 | 49 | return $value; |
| 50 | 50 | } elseif (is_array($value)) { |