@@ -85,6 +85,7 @@ |
||
85 | 85 | |
86 | 86 | /** |
87 | 87 | * {@inheritdoc} |
88 | + * @param string $suffix |
|
88 | 89 | */ |
89 | 90 | protected function getServiceName($suffix) |
90 | 91 | { |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | throw new ServiceNotFoundException($this->getServiceName($serviceName)); |
79 | 79 | } |
80 | 80 | |
81 | - $service = $this->container->get($this->prefix . $serviceName); |
|
81 | + $service = $this->container->get($this->prefix.$serviceName); |
|
82 | 82 | |
83 | 83 | return $service; |
84 | 84 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | protected function getServiceName($suffix) |
90 | 90 | { |
91 | - return $this->prefix . $suffix; |
|
91 | + return $this->prefix.$suffix; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
@@ -96,7 +96,7 @@ |
||
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
99 | - * @param array $rows |
|
99 | + * @param ReportColumn[] $rows |
|
100 | 100 | */ |
101 | 101 | private function printBody(array $rows) |
102 | 102 | { |
@@ -50,7 +50,7 @@ |
||
50 | 50 | private function getHeader(ReportComposerInterface $report) |
51 | 51 | { |
52 | 52 | // Todo: write a pretty and more informational header |
53 | - return 'PGCA report, generated on ' . $report->getReportHeader()->getCreated()->format('Y-m-d H:i:s'); |
|
53 | + return 'PGCA report, generated on '.$report->getReportHeader()->getCreated()->format('Y-m-d H:i:s'); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
@@ -48,7 +48,7 @@ |
||
48 | 48 | |
49 | 49 | try { |
50 | 50 | /** @var RuleInterface $rule */ |
51 | - $rule = $this->getContainer()->get('rule.' . $input->getArgument('name')); |
|
51 | + $rule = $this->getContainer()->get('rule.'.$input->getArgument('name')); |
|
52 | 52 | } catch (InvalidArgumentException $e) { |
53 | 53 | $output->writeln(sprintf('<error>The rule "%s" does not exist.</error>', $input->getArgument('name'))); |
54 | 54 |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | private function providerFactory(array $providerConfig) |
96 | 96 | { |
97 | - $providerServiceName = 'commit.provider.' . $providerConfig['name']; |
|
97 | + $providerServiceName = 'commit.provider.'.$providerConfig['name']; |
|
98 | 98 | |
99 | 99 | /** @var CommitProviderInterface $provider */ |
100 | 100 | $provider = $this->getContainer()->get($providerServiceName); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | private function reportComposerFactory($name) |
111 | 111 | { |
112 | - return $this->getContainer()->get('report.composer.' . $name . 'Report'); |
|
112 | + return $this->getContainer()->get('report.composer.'.$name.'Report'); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | /** |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | private function serializerFactory($serializer) |
120 | 120 | { |
121 | - return $this->getContainer()->get('report.serializer.' . $serializer . 'Serializer'); |
|
121 | + return $this->getContainer()->get('report.serializer.'.$serializer.'Serializer'); |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | */ |
128 | 128 | private function printerFactory($name) |
129 | 129 | { |
130 | - $printer = $this->getContainer()->get('report.printer.' . $name . 'Printer'); |
|
130 | + $printer = $this->getContainer()->get('report.printer.'.$name.'Printer'); |
|
131 | 131 | |
132 | 132 | // Todo: refactor with the correct design pattern. Lose the if-s |
133 | 133 | if ($printer instanceof ConsolePrinter) { |
@@ -55,8 +55,8 @@ |
||
55 | 55 | { |
56 | 56 | $container = new ContainerBuilder; |
57 | 57 | $fileLocator = new FileLocator([ |
58 | - __DIR__ . '/../../../../config', |
|
59 | - __DIR__ . '/../../../../../../../config' |
|
58 | + __DIR__.'/../../../../config', |
|
59 | + __DIR__.'/../../../../../../../config' |
|
60 | 60 | ]); |
61 | 61 | $loader = new XmlFileLoader($container, $fileLocator); |
62 | 62 | $loader->load('services.xml'); |
@@ -33,7 +33,7 @@ |
||
33 | 33 | $rows = $this->getRows($report->getReportHeader()->getRows()); |
34 | 34 | |
35 | 35 | $html = $this->engine->loadTemplate( |
36 | - file_get_contents(__DIR__ . '/../../../../../assets/templates/report.mustache') |
|
36 | + file_get_contents(__DIR__.'/../../../../../assets/templates/report.mustache') |
|
37 | 37 | ) |
38 | 38 | ->render(['rows' => $rows]); |
39 | 39 |
@@ -42,6 +42,6 @@ |
||
42 | 42 | return $text; |
43 | 43 | } |
44 | 44 | |
45 | - return trim(substr($text, 0, $limit)) . '...'; |
|
45 | + return trim(substr($text, 0, $limit)).'...'; |
|
46 | 46 | } |
47 | 47 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | $profane = false; |
55 | 55 | $message = null; |
56 | 56 | |
57 | - $this->profanityChecker->scan($commit->getMessage(), function ($word, $types) use (&$profane, &$message) { |
|
57 | + $this->profanityChecker->scan($commit->getMessage(), function($word, $types) use (&$profane, &$message) { |
|
58 | 58 | $profane = true; |
59 | 59 | |
60 | 60 | $message = sprintf( |
@@ -39,7 +39,7 @@ |
||
39 | 39 | */ |
40 | 40 | public function getMessage() |
41 | 41 | { |
42 | - return 'No line should be longer than ' . $this->maxLength . ' characters'; |
|
42 | + return 'No line should be longer than '.$this->maxLength.' characters'; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |