@@ -264,6 +264,9 @@ |
||
264 | 264 | } |
265 | 265 | } |
266 | 266 | |
267 | + /** |
|
268 | + * @param string|null $className |
|
269 | + */ |
|
267 | 270 | protected function buildArgumentsArray($serviceId, $scope, $className, array $tagAttributes = array()) |
268 | 271 | { |
269 | 272 | $arguments = array($serviceId); |
@@ -215,12 +215,12 @@ discard block |
||
215 | 215 | } |
216 | 216 | } |
217 | 217 | $format = '%-'.$maxName.'s '; |
218 | - $format .= implode("", array_map(function ($length) { return "%-{$length}s "; }, $maxTags)); |
|
218 | + $format .= implode("", array_map(function($length) { return "%-{$length}s "; }, $maxTags)); |
|
219 | 219 | $format .= '%-'.$maxScope.'s %s'; |
220 | 220 | |
221 | 221 | // the title field needs extra space to make up for comment tags |
222 | 222 | $format1 = '%-'.($maxName + 19).'s '; |
223 | - $format1 .= implode("", array_map(function ($length) { return '%-'.($length + 19).'s '; }, $maxTags)); |
|
223 | + $format1 .= implode("", array_map(function($length) { return '%-'.($length + 19).'s '; }, $maxTags)); |
|
224 | 224 | $format1 .= '%-'.($maxScope + 19).'s %s'; |
225 | 225 | |
226 | 226 | $tags = array(); |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | $output->writeln('<comment>Tags</comment>'); |
297 | 297 | foreach ($tags as $tagName => $tagData) { |
298 | 298 | foreach ($tagData as $singleTagData) { |
299 | - $output->writeln(sprintf(' - %-30s (%s)', $tagName, implode(', ', array_map(function ($key, $value) { |
|
299 | + $output->writeln(sprintf(' - %-30s (%s)', $tagName, implode(', ', array_map(function($key, $value) { |
|
300 | 300 | return sprintf('<info>%s</info>: %s', $key, $value); |
301 | 301 | }, array_keys($singleTagData), array_values($singleTagData))))); |
302 | 302 | } |
@@ -28,6 +28,8 @@ |
||
28 | 28 | |
29 | 29 | /** |
30 | 30 | * {@inheritdoc} |
31 | + * @param boolean $debug |
|
32 | + * @param string $projectDir |
|
31 | 33 | */ |
32 | 34 | public function __construct($environment, $debug, $projectDir = null) |
33 | 35 | { |
@@ -138,6 +138,9 @@ |
||
138 | 138 | return array_reverse($paths); |
139 | 139 | } |
140 | 140 | |
141 | + /** |
|
142 | + * @param string $resource |
|
143 | + */ |
|
141 | 144 | private function findThemeResource($theme, $resource) |
142 | 145 | { |
143 | 146 | if (file_exists($theme['path'].'/'.$resource)) { |
@@ -37,7 +37,7 @@ |
||
37 | 37 | * Get an instance of the Configuration() class from the given file. |
38 | 38 | * |
39 | 39 | * @param string $configFile |
40 | - * @return YamlFileConfigurationBuilder |
|
40 | + * @return \Dflydev\DotAccessConfiguration\ConfigurationInterface |
|
41 | 41 | */ |
42 | 42 | private function getConfigFile($configFile) |
43 | 43 | { |
@@ -68,6 +68,9 @@ |
||
68 | 68 | ); |
69 | 69 | } |
70 | 70 | |
71 | + /** |
|
72 | + * @param string $relativePathname |
|
73 | + */ |
|
71 | 74 | private static function makeTestSource($relativePathname, array $configuration = array()) |
72 | 75 | { |
73 | 76 | $configuration = new Configuration($configuration); |
@@ -16,6 +16,11 @@ |
||
16 | 16 | |
17 | 17 | class CompositeDataSourceTest extends \PHPUnit_Framework_TestCase |
18 | 18 | { |
19 | + /** |
|
20 | + * @param string $dataSourceId |
|
21 | + * |
|
22 | + * @return \Sculpin\Core\Source\DataSourceInterface |
|
23 | + */ |
|
19 | 24 | public function makeDataSource($dataSourceId) |
20 | 25 | { |
21 | 26 | $dataSource = $this->getMock('Sculpin\Core\Source\DataSourceInterface'); |
@@ -21,6 +21,9 @@ discard block |
||
21 | 21 | return $source; |
22 | 22 | } |
23 | 23 | |
24 | + /** |
|
25 | + * @return Analyzer |
|
26 | + */ |
|
24 | 27 | public function makeTestAnalyzer() |
25 | 28 | { |
26 | 29 | $analyzer = $this->getMock('Dflydev\Canal\Analyzer\Analyzer'); |
@@ -62,6 +65,9 @@ discard block |
||
62 | 65 | return $factory; |
63 | 66 | } |
64 | 67 | |
68 | + /** |
|
69 | + * @return \Sculpin\Core\Source\DataSourceInterface |
|
70 | + */ |
|
65 | 71 | public function makeTestDatasource() |
66 | 72 | { |
67 | 73 | $datasource = $this->getMock('Sculpin\Core\Source\DataSourceInterface'); |
@@ -4,7 +4,6 @@ |
||
4 | 4 | use Dflydev\Canal\Analyzer\Analyzer; |
5 | 5 | use Sculpin\Core\Source\FileSource; |
6 | 6 | use Sculpin\Core\Source\FilesystemDataSource; |
7 | -use Sculpin\Core\Source\MemorySource; |
|
8 | 7 | use Symfony\Component\Finder\SplFileInfo; |
9 | 8 | |
10 | 9 | class FileSourceTest extends \PHPUnit_Framework_TestCase |
@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | public function provideTestParseYaml() |
93 | 93 | { |
94 | 94 | return array( |
95 | - array(__DIR__ . '/../Fixtures/valid/no-end-frontmatter.yml', ''), |
|
96 | - array(__DIR__ . '/../Fixtures/valid/frontmatter-nocontent.yml', ''), |
|
97 | - array(__DIR__ . '/../Fixtures/valid/frontmatter-content.yml', ''), |
|
98 | - array(__DIR__ . '/../Fixtures/invalid/one-line-edge-case.yml', 'Yaml could not be parsed, parser detected a string.'), |
|
99 | - array(__DIR__ . '/../Fixtures/invalid/malformed-yaml.yml', 'Yaml could not be parsed, parser detected a string.'), |
|
100 | - array(__DIR__ . '/../Fixtures/invalid/malformed-yaml2.yml', 'Unable to parse at line 2 (near "first:fsdqf").'), |
|
95 | + array(__DIR__.'/../Fixtures/valid/no-end-frontmatter.yml', ''), |
|
96 | + array(__DIR__.'/../Fixtures/valid/frontmatter-nocontent.yml', ''), |
|
97 | + array(__DIR__.'/../Fixtures/valid/frontmatter-content.yml', ''), |
|
98 | + array(__DIR__.'/../Fixtures/invalid/one-line-edge-case.yml', 'Yaml could not be parsed, parser detected a string.'), |
|
99 | + array(__DIR__.'/../Fixtures/invalid/malformed-yaml.yml', 'Yaml could not be parsed, parser detected a string.'), |
|
100 | + array(__DIR__.'/../Fixtures/invalid/malformed-yaml2.yml', 'Unable to parse at line 2 (near "first:fsdqf").'), |
|
101 | 101 | ); |
102 | 102 | } |
103 | 103 | |
@@ -106,6 +106,6 @@ discard block |
||
106 | 106 | if ($msg == '') { |
107 | 107 | return ''; |
108 | 108 | } |
109 | - return ' ! FileSource:FilesystemDataSource:test:' . $filename . ' ' . $msg . ' !' . PHP_EOL; |
|
109 | + return ' ! FileSource:FilesystemDataSource:test:'.$filename.' '.$msg.' !'.PHP_EOL; |
|
110 | 110 | } |
111 | 111 | } |
@@ -62,6 +62,9 @@ discard block |
||
62 | 62 | $this->assertEquals(strtotime("2013-12-12"), $source->data()->get('calculated_date')); |
63 | 63 | } |
64 | 64 | |
65 | + /** |
|
66 | + * @param integer $timestamp |
|
67 | + */ |
|
65 | 68 | protected function getSourceWithCalculatedDate($timestamp) |
66 | 69 | { |
67 | 70 | return new MemorySource( |
@@ -78,6 +81,9 @@ discard block |
||
78 | 81 | ); |
79 | 82 | } |
80 | 83 | |
84 | + /** |
|
85 | + * @param string $path |
|
86 | + */ |
|
81 | 87 | protected function getSourceWithoutCalculatedDateAndPathname($path) |
82 | 88 | { |
83 | 89 | return new MemorySource( |
@@ -15,6 +15,11 @@ |
||
15 | 15 | |
16 | 16 | class SourceSetTest extends \PHPUnit_Framework_TestCase |
17 | 17 | { |
18 | + /** |
|
19 | + * @param string $sourceId |
|
20 | + * |
|
21 | + * @return \Sculpin\Core\Source\SourceInterface |
|
22 | + */ |
|
18 | 23 | public function makeTestSource($sourceId, $hasChanged = true) |
19 | 24 | { |
20 | 25 | $source = $this->getMock('Sculpin\Core\Source\SourceInterface'); |