예제 #1
0
 /**
  * @inheritDoc
  */
 public function serialize(array $parameters, $fileHeader = null)
 {
     $output = '';
     if ($fileHeader) {
         $output .= \NordCode\RoboParameters\wrap_lines($fileHeader, '# ') . "\n";
     }
     return $output . $this->serializeKeyValuePairs($parameters);
 }
예제 #2
0
 /**
  * @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);
 }
예제 #3
0
 /**
  * @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) . ';';
 }
예제 #4
0
 /**
  * @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));
 }