Completed
Pull Request — master (#5)
by Michal
04:41
created
src/Webrouse/AssetMacro/ManifestService.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
 		return Strings::replace($format,
88 88
 			'/%([^%]+)%/',
89
-			function ($matches) use ($asset, $format, $base) {
89
+			function($matches) use ($asset, $format, $base) {
90 90
 				switch ($matches[1]) {
91 91
 					case 'content':
92 92
 						$content = file_get_contents($asset->getAbsolutePath());
@@ -127,8 +127,7 @@  discard block
 block discarded – undo
127 127
 	{
128 128
 		// Finding a manifest begins in the asset directory
129 129
 		$dir = $assetPath ?
130
-			$this->config->getAssetsPath() . DIRECTORY_SEPARATOR . Utils::normalizePath(dirname($assetPath)) :
131
-			$this->config->getAssetsPath();
130
+			$this->config->getAssetsPath() . DIRECTORY_SEPARATOR . Utils::normalizePath(dirname($assetPath)) : $this->config->getAssetsPath();
132 131
 
133 132
 		// Autodetect manifest
134 133
 		while (Strings::startsWith($dir, $this->config->getAssetsPath())) {
Please login to merge, or discard this patch.
src/Webrouse/AssetMacro/DI/Extension.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -100,6 +100,9 @@
 block discarded – undo
100 100
 	}
101 101
 
102 102
 
103
+	/**
104
+	 * @param string $key
105
+	 */
103 106
 	private function validatePolicy(array &$config, $key, array $choices): void
104 107
 	{
105 108
 		if (!in_array($config[$key], $choices, true)) {
Please login to merge, or discard this patch.
src/Webrouse/AssetMacro/Manifest.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -22,6 +22,9 @@
 block discarded – undo
22 22
 	private $data = [];
23 23
 
24 24
 
25
+	/**
26
+	 * @param null|string $path
27
+	 */
25 28
 	public function __construct(Config $config, ?string $path, array $data = null)
26 29
 	{
27 30
 		$this->config = $config;
Please login to merge, or discard this patch.