/** * @inheritDoc */ public function serialize(array $parameters, $fileHeader = null) { $output = ''; if ($fileHeader) { $output .= \NordCode\RoboParameters\wrap_lines($fileHeader, '# ') . "\n"; } return $output . $this->serializeKeyValuePairs($parameters); }
/** * @inheritDoc */ public function serialize(array $parameters, $fileHeader = null) { $output = ''; if ($fileHeader) { $output .= \NordCode\RoboParameters\wrap_lines($fileHeader, '# ') . "\n"; } return $output . $this->yamlDumper->dump($parameters, 4); }
/** * @inheritDoc */ public function serialize(array $parameters, $fileHeader = null) { $output = ''; if ($fileHeader) { $commentContent = \NordCode\RoboParameters\wrap_lines($fileHeader, ' * '); $output .= "/**\n{$commentContent}\n */\n"; } return $output . 'return ' . var_export($parameters, true) . ';'; }
/** * @test * @dataProvider wrap_lines_data * @param array $array * @param int $expected_depth */ public function test_wrap_lines($string, $prefix, $suffix, $expectedOutput) { $this->assertEquals($expectedOutput, \NordCode\RoboParameters\wrap_lines($string, $prefix, $suffix)); }