@@ -38,7 +38,7 @@ |
||
38 | 38 | */ |
39 | 39 | public function attach() |
40 | 40 | { |
41 | - $connection = new ModernConnection(); |
|
41 | + $connection = new ModernConnection(); |
|
42 | 42 | $connection->connect($this->resolveApplication()); |
43 | 43 | |
44 | 44 | return $connection; |
@@ -80,9 +80,10 @@ |
||
80 | 80 | $site = new Site(); |
81 | 81 | } |
82 | 82 | |
83 | - if ($site->getVersion()) |
|
84 | - |
|
83 | + if ($site->getVersion()) { |
|
84 | + |
|
85 | 85 | return $site; |
86 | + } |
|
86 | 87 | }); |
87 | 88 | |
88 | 89 | // Share the container |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $container = $this->getContainer(); |
53 | 53 | |
54 | 54 | // Share the CLImate object |
55 | - $container->share(CLImate::class, function () use ($container) { |
|
55 | + $container->share(CLImate::class, function() use ($container) { |
|
56 | 56 | return new CLImate(); |
57 | 57 | }); |
58 | 58 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | // Add the command bus |
63 | 63 | $container->add( |
64 | 64 | CommandBus::class, |
65 | - function (ClassNameExtractor $extractor, HandlerLocator $locator, HandleClassNameInflector $inflector) { |
|
65 | + function(ClassNameExtractor $extractor, HandlerLocator $locator, HandleClassNameInflector $inflector) { |
|
66 | 66 | $handlerMiddleware = new CommandHandlerMiddleware($extractor, $locator, $inflector); |
67 | 67 | |
68 | 68 | return new CommandBus([$handlerMiddleware]); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | ErrorHandler::class |
79 | 79 | ]); |
80 | 80 | |
81 | - $container->share(Site::class, function () use ($container) { |
|
81 | + $container->share(Site::class, function() use ($container) { |
|
82 | 82 | $site = $container->get(Locator::class)->getLocation(); |
83 | 83 | if (!$site) { |
84 | 84 | $site = new Site(); |
@@ -26,6 +26,9 @@ discard block |
||
26 | 26 | set_exception_handler([$this, 'handleException']); |
27 | 27 | } |
28 | 28 | |
29 | + /** |
|
30 | + * @param boolean $verbose |
|
31 | + */ |
|
29 | 32 | public function setVerbose($verbose) |
30 | 33 | { |
31 | 34 | $this->verbose = $verbose; |
@@ -56,7 +59,7 @@ discard block |
||
56 | 59 | * @param string $file |
57 | 60 | * @param int $line |
58 | 61 | * @param array $context |
59 | - * @return bool |
|
62 | + * @return false|null |
|
60 | 63 | */ |
61 | 64 | public function handleError($code, $message, $file, $line, $context) |
62 | 65 | { |
@@ -136,7 +136,7 @@ |
||
136 | 136 | |
137 | 137 | /** |
138 | 138 | * Get a list of package item objects |
139 | - * @return PackageItem[] |
|
139 | + * @return \Generator |
|
140 | 140 | * @throws \Buttress\Concrete\Exception\RuntimeException |
141 | 141 | */ |
142 | 142 | public function all() |
@@ -66,6 +66,9 @@ |
||
66 | 66 | ->setInstalledVersion($installedVersion); |
67 | 67 | } |
68 | 68 | |
69 | + /** |
|
70 | + * @return string |
|
71 | + */ |
|
69 | 72 | private function getPackageVersionInstalled(\ADOConnection $db, LegacyPackage $package) |
70 | 73 | { |
71 | 74 | return $db->GetOne('SELECT pkgVersion from Packages where pkgID=?', [$package->getPackageID()]); |