diff --git a/modules/devshop/devshop_github/devshop_github.module b/modules/devshop/devshop_github/devshop_github.module index de36c0f6a..c9cd27e84 100644 --- a/modules/devshop/devshop_github/devshop_github.module +++ b/modules/devshop/devshop_github/devshop_github.module @@ -6,8 +6,6 @@ require_once('includes/queue.inc'); -use Symfony\Component\Yaml\Yaml; - /** * Retrieve the token from either environment variable or drupal variable. * @return mixed @@ -395,18 +393,6 @@ function devshop_github_form_site_node_form_validate_pr($element, &$form_state, } } -/** - * Helper to normalize arrays to objects. - * - * @param $array - * @return mixed - */ -function convert_to_object($thing) { - $yml = Yaml::dump($thing, 2, 2, Yaml::DUMP_OBJECT_AS_MAP); - $object = Yaml::parse($yml, Yaml::PARSE_OBJECT_FOR_MAP); - return $object; -} - /** * Implements hook_form_alter(). */ diff --git a/modules/devshop/devshop_projects/devshop_projects.module b/modules/devshop/devshop_projects/devshop_projects.module index cdcc36654..b3996bf13 100644 --- a/modules/devshop/devshop_projects/devshop_projects.module +++ b/modules/devshop/devshop_projects/devshop_projects.module @@ -20,6 +20,7 @@ include_once('tasks/create.inc'); include_once('tasks/pull.inc'); include_once('tasks/deploy.inc'); +use Symfony\Component\Yaml\Yaml; /** * Implements hook_init(). @@ -901,3 +902,15 @@ function devshop_projects_load_by_name($name) { return node_load($nid); } + +/** + * Helper to normalize arrays to objects. + * + * @param $array + * @return mixed + */ +function convert_to_object($thing) { + $yml = Yaml::dump($thing, 2, 2, Yaml::DUMP_OBJECT_AS_MAP); + $object = Yaml::parse($yml, Yaml::PARSE_OBJECT_FOR_MAP); + return $object; +}