Completed
Push — master ( 886536...023239 )
by Thomas
07:27
created
src/KeekoTools.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 		$this->setDispatcher($dispatcher);
29 29
 		$this->keekoDispatcher = $dispatcher;
30 30
 
31
-		$dispatcher->addListener(ConsoleEvents::TERMINATE, function (ConsoleTerminateEvent $event) {
31
+		$dispatcher->addListener(ConsoleEvents::TERMINATE, function(ConsoleTerminateEvent $event) {
32 32
 			$command = $event->getCommand();
33 33
 			$this->finishedCommands[] = $command->getName();
34 34
 		});
Please login to merge, or discard this patch.
src/command/InitCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 			$types = ['module', 'app'];
175 175
 			$question = new Question('Package type (module|app)', $type);
176 176
 			$question->setAutocompleterValues($types);
177
-			$question->setValidator(function ($answer) use ($types) {
177
+			$question->setValidator(function($answer) use ($types) {
178 178
 				if (!in_array($answer, $types)) {
179 179
 					throw new \RuntimeException('The name of the type should be one of: ' . 
180 180
 							implode(',', $types));
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
 	private function validateName($name) {
554 554
 		if (!preg_match('{^[a-z0-9_.-]+/[a-z0-9_.-]+$}', $name)) {
555 555
 			throw new \InvalidArgumentException(
556
-				'The package name '.$name.' is invalid, it should be lowercase and have a vendor name, a forward slash, and a package name, matching: [a-z0-9_.-]+/[a-z0-9_.-]+'
556
+				'The package name ' . $name . ' is invalid, it should be lowercase and have a vendor name, a forward slash, and a package name, matching: [a-z0-9_.-]+/[a-z0-9_.-]+'
557 557
 			);
558 558
 		}
559 559
 	}
Please login to merge, or discard this patch.
src/helpers/QuestionHelperTrait.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@
 block discarded – undo
24 24
 	 */
25 25
 	protected function getQuestion($question, $default = null, $sep = ':') {
26 26
 		return !empty($default) ?
27
-			sprintf('<info>%s</info> [<comment>%s</comment>]%s ', $question, $default, $sep) :
28
-			sprintf('<info>%s</info>%s ', $question, $sep);
27
+			sprintf('<info>%s</info> [<comment>%s</comment>]%s ', $question, $default, $sep) : sprintf('<info>%s</info>%s ', $question, $sep);
29 28
 	}
30 29
 	
31 30
 	/**
Please login to merge, or discard this patch.
src/services/ModelService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -167,14 +167,14 @@
 block discarded – undo
167 167
 		if ($package->getVendor() == 'keeko' && $this->isCoreSchema()) {
168 168
 			$model = $package->getName();
169 169
 			if ($this->hasModel($model)) {
170
-				$models []= $model;
170
+				$models [] = $model;
171 171
 			}
172 172
 		}
173 173
 		
174 174
 		// anyway, generate all
175 175
 		else {
176 176
 			foreach ($this->getModels() as $model) {
177
-				$models []= $model->getOriginCommonName();
177
+				$models [] = $model->getOriginCommonName();
178 178
 			}
179 179
 		}
180 180
 		
Please login to merge, or discard this patch.
src/command/AbstractGenerateCommand.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -91,6 +91,9 @@
 block discarded – undo
91 91
 		;
92 92
 	}
93 93
 	
94
+	/**
95
+	 * @param string $name
96
+	 */
94 97
 	protected function runCommand($name, InputInterface $input, OutputInterface $output) {
95 98
 		// return whether command has already executed
96 99
 		$app = $this->getApplication();
Please login to merge, or discard this patch.
src/command/GenerateActionCommand.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -283,7 +283,6 @@
 block discarded – undo
283 283
 	/**
284 284
 	 * Generates an action.
285 285
 	 *  
286
-	 * @param string $actionName
287 286
 	 * @param ActionSchema $action the action node from composer.json
288 287
 	 */
289 288
 	private function generateAction($actionName) {
Please login to merge, or discard this patch.
src/generator/response/ToOneRelationshipJsonResponseGenerator.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -14,6 +14,9 @@
 block discarded – undo
14 14
 	/** @var Table */
15 15
 	private $foreign;
16 16
 	
17
+	/**
18
+	 * @param \keeko\tools\services\CommandService $service
19
+	 */
17 20
 	public function __construct($service, Table $model, Table $foreign) {
18 21
 		parent::__construct($service);
19 22
 		$this->model = $model;
Please login to merge, or discard this patch.
src/services/CodeGeneratorService.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 	 * Adds authors to the docblock of the given struct
63 63
 	 *
64 64
 	 * @param AbstractPhpStruct $struct
65
-	 * @param array $package
65
+	 * @param PackageSchema $package
66 66
 	 */
67 67
 	public function addAuthors(AbstractPhpStruct $struct, PackageSchema $package) {
68 68
 		$docblock = $struct->getDocblock();
Please login to merge, or discard this patch.
src/command/GenerateResponseCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@
 block discarded – undo
230 230
 		$module = $this->packageService->getModule();
231 231
 		$action = $module->getAction($actionName);
232 232
 		$prefix = substr($actionName, 0, strpos($actionName, 'relationship') + 12);
233
-		$readAction = $module->getAction($prefix.'-read');
233
+		$readAction = $module->getAction($prefix . '-read');
234 234
 		
235 235
 		// get modules names
236 236
 		$matches = [];
Please login to merge, or discard this patch.