/**
  * Get files content.
  *
  * @param  \Conrock\Application $app
  *
  * @return array
  */
 private function get_files_content(Application $app)
 {
     $config_path = $app->get_config_path();
     $environment = $app->get_environment();
     $files = [];
     foreach (Finder::create()->files()->name('*.php')->in($config_path) as $file) {
         $directory = dirname($file->getRealPath());
         if ($config_path !== $directory && !preg_match('/' . $environment . '$/', $directory)) {
             continue;
         }
         if ($tree = trim(str_replace($config_path, '', $directory), '/')) {
             $tree = str_replace('/', '.', $tree) . '.';
         }
         $files[$tree . basename($file->getRealPath(), '.php')] = $file->getRealPath();
     }
     $merge = [];
     foreach ($files as $key => $path) {
         $key = explode('.', $key);
         $key = array_pop($key);
         if (!isset($merge[$key])) {
             $merge[$key] = [];
         }
         $value = (require $path);
         if (!is_array($value)) {
             continue;
         }
         $merge[$key] = array_merge($merge[$key], $value);
     }
     return $merge;
 }