@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | { |
20 | 20 | $defaultView = self::module()::view(); |
21 | 21 | |
22 | - $viewClass = is_a(static::class, ModuleView::class, true)? static::class: $defaultView; |
|
22 | + $viewClass = is_a(static::class, ModuleView::class, true) ? static::class : $defaultView; |
|
23 | 23 | |
24 | 24 | if ($viewClass == $defaultView) $viewClass = null; |
25 | 25 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | final public static function moduleLink($module, $method = 'body', $args = []) |
40 | 40 | { |
41 | - $alias = class_exists($module)? $module::alias(): $module; |
|
41 | + $alias = class_exists($module) ? $module::alias() : $module; |
|
42 | 42 | |
43 | 43 | return url(implode('/', ['view', $alias, $method, self::encodeArgs($args)])); |
44 | 44 | } |
@@ -52,13 +52,13 @@ discard block |
||
52 | 52 | * @throws \Illuminate\Http\Exceptions\HttpResponseException |
53 | 53 | */ |
54 | 54 | final public static function decodeArgs($hash) { |
55 | - if (! $hash) return []; |
|
55 | + if (!$hash) return []; |
|
56 | 56 | |
57 | 57 | $args = session($hash); |
58 | 58 | |
59 | 59 | if (is_null($args)) abort(419); |
60 | 60 | |
61 | - return is_array($args)? $args: [$args]; |
|
61 | + return is_array($args) ? $args : [$args]; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | * @return array |
69 | 69 | */ |
70 | 70 | final public static function encodeArgs($args) { |
71 | - $args = is_array($args)? $args: [$args]; |
|
71 | + $args = is_array($args) ? $args : [$args]; |
|
72 | 72 | |
73 | - if (! $args) return; |
|
73 | + if (!$args) return; |
|
74 | 74 | |
75 | 75 | $hash = md5(serialize($args)); |
76 | 76 |
@@ -21,7 +21,9 @@ discard block |
||
21 | 21 | |
22 | 22 | $viewClass = is_a(static::class, ModuleView::class, true)? static::class: $defaultView; |
23 | 23 | |
24 | - if ($viewClass == $defaultView) $viewClass = null; |
|
24 | + if ($viewClass == $defaultView) { |
|
25 | + $viewClass = null; |
|
26 | + } |
|
25 | 27 | |
26 | 28 | return url(implode('/', ['view', implode('_', array_filter([self::alias(), $viewClass])), $method, self::encodeArgs($args)])); |
27 | 29 | } |
@@ -52,11 +54,15 @@ discard block |
||
52 | 54 | * @throws \Illuminate\Http\Exceptions\HttpResponseException |
53 | 55 | */ |
54 | 56 | final public static function decodeArgs($hash) { |
55 | - if (! $hash) return []; |
|
57 | + if (! $hash) { |
|
58 | + return []; |
|
59 | + } |
|
56 | 60 | |
57 | 61 | $args = session($hash); |
58 | 62 | |
59 | - if (is_null($args)) abort(419); |
|
63 | + if (is_null($args)) { |
|
64 | + abort(419); |
|
65 | + } |
|
60 | 66 | |
61 | 67 | return is_array($args)? $args: [$args]; |
62 | 68 | } |
@@ -70,7 +76,9 @@ discard block |
||
70 | 76 | final public static function encodeArgs($args) { |
71 | 77 | $args = is_array($args)? $args: [$args]; |
72 | 78 | |
73 | - if (! $args) return; |
|
79 | + if (! $args) { |
|
80 | + return; |
|
81 | + } |
|
74 | 82 | |
75 | 83 | $hash = md5(serialize($args)); |
76 | 84 |
@@ -12,11 +12,11 @@ |
||
12 | 12 | } |
13 | 13 | |
14 | 14 | final public static function requireJS($file = 'default.js', $isAsync = false, $isDefer = false) { |
15 | - return epesi()->requireJS(self::assetUrl('js/'. $file), $isAsync, $isDefer); |
|
15 | + return epesi()->requireJS(self::assetUrl('js/' . $file), $isAsync, $isDefer); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | final public static function requireCSS($file = 'default.css') { |
19 | - return epesi()->requireCSS(self::assetUrl('css/'. $file)); |
|
19 | + return epesi()->requireCSS(self::assetUrl('css/' . $file)); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -33,7 +33,7 @@ |
||
33 | 33 | { |
34 | 34 | $link = $this->link(); |
35 | 35 | |
36 | - $link = is_array($link)? ModuleView::moduleLink(...$link): $link; |
|
36 | + $link = is_array($link) ? ModuleView::moduleLink(...$link) : $link; |
|
37 | 37 | |
38 | 38 | return (new LaunchButton([ |
39 | 39 | 'label' => $this->label(), |
@@ -36,13 +36,13 @@ |
||
36 | 36 | return $this; |
37 | 37 | } |
38 | 38 | |
39 | - $this->label = is_array($this->label)? $this->label: [$this->label]; |
|
39 | + $this->label = is_array($this->label) ? $this->label : [$this->label]; |
|
40 | 40 | |
41 | 41 | $this->label = array_map('trans', $this->label); |
42 | 42 | |
43 | - $this->location = is_array($this->location)? $this->location: [$this->location]; |
|
43 | + $this->location = is_array($this->location) ? $this->location : [$this->location]; |
|
44 | 44 | |
45 | - return array_merge($this->label, $this->location?: []); |
|
45 | + return array_merge($this->label, $this->location ?: []); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | public function label($label) |
@@ -7,166 +7,166 @@ |
||
7 | 7 | |
8 | 8 | class PackageManifest |
9 | 9 | { |
10 | - /** |
|
11 | - * The filesystem instance. |
|
12 | - * |
|
13 | - * @var \Illuminate\Filesystem\Filesystem |
|
14 | - */ |
|
15 | - public $files; |
|
16 | - |
|
17 | - /** |
|
18 | - * The base path. |
|
19 | - * |
|
20 | - * @var string |
|
21 | - */ |
|
22 | - public $basePath; |
|
23 | - |
|
24 | - /** |
|
25 | - * The vendor path. |
|
26 | - * |
|
27 | - * @var string |
|
28 | - */ |
|
29 | - public $vendorPath; |
|
30 | - |
|
31 | - /** |
|
32 | - * The manifest path. |
|
33 | - * |
|
34 | - * @var string|null |
|
35 | - */ |
|
36 | - public $manifestPath; |
|
37 | - |
|
38 | - /** |
|
39 | - * The loaded manifest array. |
|
40 | - * |
|
41 | - * @var array |
|
42 | - */ |
|
43 | - public $manifest; |
|
44 | - |
|
45 | - /** |
|
46 | - * Create a new package manifest instance. |
|
47 | - * |
|
48 | - * @param \Illuminate\Filesystem\Filesystem $files |
|
49 | - * @param string $basePath |
|
50 | - * @param string $manifestPath |
|
51 | - * @return void |
|
52 | - */ |
|
53 | - public function __construct(Filesystem $files, $basePath, $manifestPath) |
|
54 | - { |
|
55 | - $this->files = $files; |
|
56 | - $this->basePath = $basePath; |
|
57 | - $this->manifestPath = $manifestPath; |
|
58 | - $this->vendorPath = $basePath.'/vendor'; |
|
59 | - } |
|
60 | - |
|
61 | - /** |
|
62 | - * Get all of the integrator class names for all packages. |
|
63 | - * |
|
64 | - * @return array |
|
65 | - */ |
|
66 | - public function joints() |
|
67 | - { |
|
68 | - return collect($this->getManifest())->flatMap(function ($configuration) { |
|
69 | - return (array) ($configuration['joints'] ?? []); |
|
70 | - })->filter()->all(); |
|
71 | - } |
|
10 | + /** |
|
11 | + * The filesystem instance. |
|
12 | + * |
|
13 | + * @var \Illuminate\Filesystem\Filesystem |
|
14 | + */ |
|
15 | + public $files; |
|
16 | + |
|
17 | + /** |
|
18 | + * The base path. |
|
19 | + * |
|
20 | + * @var string |
|
21 | + */ |
|
22 | + public $basePath; |
|
23 | + |
|
24 | + /** |
|
25 | + * The vendor path. |
|
26 | + * |
|
27 | + * @var string |
|
28 | + */ |
|
29 | + public $vendorPath; |
|
30 | + |
|
31 | + /** |
|
32 | + * The manifest path. |
|
33 | + * |
|
34 | + * @var string|null |
|
35 | + */ |
|
36 | + public $manifestPath; |
|
37 | + |
|
38 | + /** |
|
39 | + * The loaded manifest array. |
|
40 | + * |
|
41 | + * @var array |
|
42 | + */ |
|
43 | + public $manifest; |
|
44 | + |
|
45 | + /** |
|
46 | + * Create a new package manifest instance. |
|
47 | + * |
|
48 | + * @param \Illuminate\Filesystem\Filesystem $files |
|
49 | + * @param string $basePath |
|
50 | + * @param string $manifestPath |
|
51 | + * @return void |
|
52 | + */ |
|
53 | + public function __construct(Filesystem $files, $basePath, $manifestPath) |
|
54 | + { |
|
55 | + $this->files = $files; |
|
56 | + $this->basePath = $basePath; |
|
57 | + $this->manifestPath = $manifestPath; |
|
58 | + $this->vendorPath = $basePath.'/vendor'; |
|
59 | + } |
|
60 | + |
|
61 | + /** |
|
62 | + * Get all of the integrator class names for all packages. |
|
63 | + * |
|
64 | + * @return array |
|
65 | + */ |
|
66 | + public function joints() |
|
67 | + { |
|
68 | + return collect($this->getManifest())->flatMap(function ($configuration) { |
|
69 | + return (array) ($configuration['joints'] ?? []); |
|
70 | + })->filter()->all(); |
|
71 | + } |
|
72 | 72 | |
73 | - /** |
|
74 | - * Get all of the module root folders for all packages. |
|
75 | - * |
|
76 | - * @return array |
|
77 | - */ |
|
78 | - public function modules() |
|
79 | - { |
|
80 | - return collect($this->getManifest())->flatMap(function ($configuration) { |
|
81 | - return (array) ($configuration['modules'] ?? []); |
|
82 | - })->filter()->all(); |
|
83 | - } |
|
84 | - |
|
85 | - /** |
|
86 | - * Get the current package manifest. |
|
87 | - * |
|
88 | - * @return array |
|
89 | - */ |
|
90 | - protected function getManifest() |
|
91 | - { |
|
92 | - if (! is_null($this->manifest)) { |
|
93 | - return $this->manifest; |
|
94 | - } |
|
95 | - |
|
96 | - if (! file_exists($this->manifestPath)) { |
|
97 | - $this->build(); |
|
98 | - } |
|
73 | + /** |
|
74 | + * Get all of the module root folders for all packages. |
|
75 | + * |
|
76 | + * @return array |
|
77 | + */ |
|
78 | + public function modules() |
|
79 | + { |
|
80 | + return collect($this->getManifest())->flatMap(function ($configuration) { |
|
81 | + return (array) ($configuration['modules'] ?? []); |
|
82 | + })->filter()->all(); |
|
83 | + } |
|
84 | + |
|
85 | + /** |
|
86 | + * Get the current package manifest. |
|
87 | + * |
|
88 | + * @return array |
|
89 | + */ |
|
90 | + protected function getManifest() |
|
91 | + { |
|
92 | + if (! is_null($this->manifest)) { |
|
93 | + return $this->manifest; |
|
94 | + } |
|
95 | + |
|
96 | + if (! file_exists($this->manifestPath)) { |
|
97 | + $this->build(); |
|
98 | + } |
|
99 | 99 | |
100 | - return $this->manifest = file_exists($this->manifestPath) ? |
|
101 | - $this->files->getRequire($this->manifestPath) : []; |
|
102 | - } |
|
103 | - |
|
104 | - /** |
|
105 | - * Build the manifest and write it to disk. |
|
106 | - * |
|
107 | - * @return void |
|
108 | - */ |
|
109 | - public function build() |
|
110 | - { |
|
111 | - $packages = []; |
|
112 | - |
|
113 | - if ($this->files->exists($path = $this->vendorPath.'/composer/installed.json')) { |
|
114 | - $packages = json_decode($this->files->get($path), true); |
|
115 | - } |
|
116 | - |
|
117 | - $ignoreAll = in_array('*', $ignore = $this->packagesToIgnore()); |
|
118 | - |
|
119 | - $this->write(collect($packages)->mapWithKeys(function ($package) { |
|
120 | - return [$this->format($package['name']) => $package['extra']['epesi'] ?? []]; |
|
121 | - })->each(function ($configuration) use (&$ignore) { |
|
122 | - $ignore = array_merge($ignore, $configuration['dont-discover'] ?? []); |
|
123 | - })->reject(function ($configuration, $package) use ($ignore, $ignoreAll) { |
|
124 | - return $ignoreAll || in_array($package, $ignore); |
|
125 | - })->filter()->all()); |
|
126 | - } |
|
127 | - |
|
128 | - /** |
|
129 | - * Format the given package name. |
|
130 | - * |
|
131 | - * @param string $package |
|
132 | - * @return string |
|
133 | - */ |
|
134 | - protected function format($package) |
|
135 | - { |
|
136 | - return str_replace($this->vendorPath.'/', '', $package); |
|
137 | - } |
|
138 | - |
|
139 | - /** |
|
140 | - * Get all of the package names that should be ignored. |
|
141 | - * |
|
142 | - * @return array |
|
143 | - */ |
|
144 | - protected function packagesToIgnore() |
|
145 | - { |
|
146 | - if (! file_exists($this->basePath.'/composer.json')) { |
|
147 | - return []; |
|
148 | - } |
|
149 | - |
|
150 | - return json_decode(file_get_contents( |
|
151 | - $this->basePath.'/composer.json' |
|
152 | - ), true)['extra']['epesi']['dont-discover'] ?? []; |
|
153 | - } |
|
154 | - |
|
155 | - /** |
|
156 | - * Write the given manifest array to disk. |
|
157 | - * |
|
158 | - * @param array $manifest |
|
159 | - * @return void |
|
160 | - * @throws \Exception |
|
161 | - */ |
|
162 | - protected function write(array $manifest) |
|
163 | - { |
|
164 | - if (! is_writable(dirname($this->manifestPath))) { |
|
165 | - throw new Exception('The '.dirname($this->manifestPath).' directory must be present and writable.'); |
|
166 | - } |
|
167 | - |
|
168 | - $this->files->put( |
|
169 | - $this->manifestPath, '<?php return '.var_export($manifest, true).';' |
|
170 | - ); |
|
171 | - } |
|
100 | + return $this->manifest = file_exists($this->manifestPath) ? |
|
101 | + $this->files->getRequire($this->manifestPath) : []; |
|
102 | + } |
|
103 | + |
|
104 | + /** |
|
105 | + * Build the manifest and write it to disk. |
|
106 | + * |
|
107 | + * @return void |
|
108 | + */ |
|
109 | + public function build() |
|
110 | + { |
|
111 | + $packages = []; |
|
112 | + |
|
113 | + if ($this->files->exists($path = $this->vendorPath.'/composer/installed.json')) { |
|
114 | + $packages = json_decode($this->files->get($path), true); |
|
115 | + } |
|
116 | + |
|
117 | + $ignoreAll = in_array('*', $ignore = $this->packagesToIgnore()); |
|
118 | + |
|
119 | + $this->write(collect($packages)->mapWithKeys(function ($package) { |
|
120 | + return [$this->format($package['name']) => $package['extra']['epesi'] ?? []]; |
|
121 | + })->each(function ($configuration) use (&$ignore) { |
|
122 | + $ignore = array_merge($ignore, $configuration['dont-discover'] ?? []); |
|
123 | + })->reject(function ($configuration, $package) use ($ignore, $ignoreAll) { |
|
124 | + return $ignoreAll || in_array($package, $ignore); |
|
125 | + })->filter()->all()); |
|
126 | + } |
|
127 | + |
|
128 | + /** |
|
129 | + * Format the given package name. |
|
130 | + * |
|
131 | + * @param string $package |
|
132 | + * @return string |
|
133 | + */ |
|
134 | + protected function format($package) |
|
135 | + { |
|
136 | + return str_replace($this->vendorPath.'/', '', $package); |
|
137 | + } |
|
138 | + |
|
139 | + /** |
|
140 | + * Get all of the package names that should be ignored. |
|
141 | + * |
|
142 | + * @return array |
|
143 | + */ |
|
144 | + protected function packagesToIgnore() |
|
145 | + { |
|
146 | + if (! file_exists($this->basePath.'/composer.json')) { |
|
147 | + return []; |
|
148 | + } |
|
149 | + |
|
150 | + return json_decode(file_get_contents( |
|
151 | + $this->basePath.'/composer.json' |
|
152 | + ), true)['extra']['epesi']['dont-discover'] ?? []; |
|
153 | + } |
|
154 | + |
|
155 | + /** |
|
156 | + * Write the given manifest array to disk. |
|
157 | + * |
|
158 | + * @param array $manifest |
|
159 | + * @return void |
|
160 | + * @throws \Exception |
|
161 | + */ |
|
162 | + protected function write(array $manifest) |
|
163 | + { |
|
164 | + if (! is_writable(dirname($this->manifestPath))) { |
|
165 | + throw new Exception('The '.dirname($this->manifestPath).' directory must be present and writable.'); |
|
166 | + } |
|
167 | + |
|
168 | + $this->files->put( |
|
169 | + $this->manifestPath, '<?php return '.var_export($manifest, true).';' |
|
170 | + ); |
|
171 | + } |
|
172 | 172 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $this->files = $files; |
56 | 56 | $this->basePath = $basePath; |
57 | 57 | $this->manifestPath = $manifestPath; |
58 | - $this->vendorPath = $basePath.'/vendor'; |
|
58 | + $this->vendorPath = $basePath . '/vendor'; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function joints() |
67 | 67 | { |
68 | - return collect($this->getManifest())->flatMap(function ($configuration) { |
|
68 | + return collect($this->getManifest())->flatMap(function($configuration) { |
|
69 | 69 | return (array) ($configuration['joints'] ?? []); |
70 | 70 | })->filter()->all(); |
71 | 71 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public function modules() |
79 | 79 | { |
80 | - return collect($this->getManifest())->flatMap(function ($configuration) { |
|
80 | + return collect($this->getManifest())->flatMap(function($configuration) { |
|
81 | 81 | return (array) ($configuration['modules'] ?? []); |
82 | 82 | })->filter()->all(); |
83 | 83 | } |
@@ -89,11 +89,11 @@ discard block |
||
89 | 89 | */ |
90 | 90 | protected function getManifest() |
91 | 91 | { |
92 | - if (! is_null($this->manifest)) { |
|
92 | + if (!is_null($this->manifest)) { |
|
93 | 93 | return $this->manifest; |
94 | 94 | } |
95 | 95 | |
96 | - if (! file_exists($this->manifestPath)) { |
|
96 | + if (!file_exists($this->manifestPath)) { |
|
97 | 97 | $this->build(); |
98 | 98 | } |
99 | 99 | |
@@ -110,17 +110,17 @@ discard block |
||
110 | 110 | { |
111 | 111 | $packages = []; |
112 | 112 | |
113 | - if ($this->files->exists($path = $this->vendorPath.'/composer/installed.json')) { |
|
113 | + if ($this->files->exists($path = $this->vendorPath . '/composer/installed.json')) { |
|
114 | 114 | $packages = json_decode($this->files->get($path), true); |
115 | 115 | } |
116 | 116 | |
117 | 117 | $ignoreAll = in_array('*', $ignore = $this->packagesToIgnore()); |
118 | 118 | |
119 | - $this->write(collect($packages)->mapWithKeys(function ($package) { |
|
119 | + $this->write(collect($packages)->mapWithKeys(function($package) { |
|
120 | 120 | return [$this->format($package['name']) => $package['extra']['epesi'] ?? []]; |
121 | - })->each(function ($configuration) use (&$ignore) { |
|
121 | + })->each(function($configuration) use (&$ignore) { |
|
122 | 122 | $ignore = array_merge($ignore, $configuration['dont-discover'] ?? []); |
123 | - })->reject(function ($configuration, $package) use ($ignore, $ignoreAll) { |
|
123 | + })->reject(function($configuration, $package) use ($ignore, $ignoreAll) { |
|
124 | 124 | return $ignoreAll || in_array($package, $ignore); |
125 | 125 | })->filter()->all()); |
126 | 126 | } |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | */ |
134 | 134 | protected function format($package) |
135 | 135 | { |
136 | - return str_replace($this->vendorPath.'/', '', $package); |
|
136 | + return str_replace($this->vendorPath . '/', '', $package); |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | /** |
@@ -143,12 +143,12 @@ discard block |
||
143 | 143 | */ |
144 | 144 | protected function packagesToIgnore() |
145 | 145 | { |
146 | - if (! file_exists($this->basePath.'/composer.json')) { |
|
146 | + if (!file_exists($this->basePath . '/composer.json')) { |
|
147 | 147 | return []; |
148 | 148 | } |
149 | 149 | |
150 | 150 | return json_decode(file_get_contents( |
151 | - $this->basePath.'/composer.json' |
|
151 | + $this->basePath . '/composer.json' |
|
152 | 152 | ), true)['extra']['epesi']['dont-discover'] ?? []; |
153 | 153 | } |
154 | 154 | |
@@ -161,12 +161,12 @@ discard block |
||
161 | 161 | */ |
162 | 162 | protected function write(array $manifest) |
163 | 163 | { |
164 | - if (! is_writable(dirname($this->manifestPath))) { |
|
165 | - throw new Exception('The '.dirname($this->manifestPath).' directory must be present and writable.'); |
|
164 | + if (!is_writable(dirname($this->manifestPath))) { |
|
165 | + throw new Exception('The ' . dirname($this->manifestPath) . ' directory must be present and writable.'); |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | $this->files->put( |
169 | - $this->manifestPath, '<?php return '.var_export($manifest, true).';' |
|
169 | + $this->manifestPath, '<?php return ' . var_export($manifest, true) . ';' |
|
170 | 170 | ); |
171 | 171 | } |
172 | 172 | } |
@@ -34,10 +34,10 @@ |
||
34 | 34 | */ |
35 | 35 | final public function displayModuleContent($method, $args) { |
36 | 36 | // if method not callbale abort to 'not found' |
37 | - if (! is_callable([$this, $method])) abort(404); |
|
37 | + if (!is_callable([$this, $method])) abort(404); |
|
38 | 38 | |
39 | 39 | // if user has no access abort 'no access' |
40 | - if (! $this->access()) abort(401); |
|
40 | + if (!$this->access()) abort(401); |
|
41 | 41 | |
42 | 42 | $args = $this->decodeArgs($args); |
43 | 43 |
@@ -34,10 +34,14 @@ |
||
34 | 34 | */ |
35 | 35 | final public function displayModuleContent($method, $args) { |
36 | 36 | // if method not callbale abort to 'not found' |
37 | - if (! is_callable([$this, $method])) abort(404); |
|
37 | + if (! is_callable([$this, $method])) { |
|
38 | + abort(404); |
|
39 | + } |
|
38 | 40 | |
39 | 41 | // if user has no access abort 'no access' |
40 | - if (! $this->access()) abort(401); |
|
42 | + if (! $this->access()) { |
|
43 | + abort(401); |
|
44 | + } |
|
41 | 45 | |
42 | 46 | $args = $this->decodeArgs($args); |
43 | 47 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | */ |
30 | 30 | $joint = new $class(); |
31 | 31 | |
32 | - if (! $joint->access()) continue; |
|
32 | + if (!$joint->access()) continue; |
|
33 | 33 | |
34 | 34 | $ret->add($joint); |
35 | 35 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | final public static function packageManifest() |
71 | 71 | { |
72 | - return self::$packageManifest = self::$packageManifest?: new PackageManifest(new Filesystem(), app()->basePath(), self::getCachedManifestPath()); |
|
72 | + return self::$packageManifest = self::$packageManifest ?: new PackageManifest(new Filesystem(), app()->basePath(), self::getCachedManifestPath()); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | final public static function getCachedManifestPath() |
@@ -29,7 +29,9 @@ |
||
29 | 29 | */ |
30 | 30 | $joint = new $class(); |
31 | 31 | |
32 | - if (! $joint->access()) continue; |
|
32 | + if (! $joint->access()) { |
|
33 | + continue; |
|
34 | + } |
|
33 | 35 | |
34 | 36 | $ret->add($joint); |
35 | 37 | } |
@@ -2,35 +2,35 @@ |
||
2 | 2 | |
3 | 3 | if (! function_exists('epesi')) { |
4 | 4 | function epesi() : Epesi\Core\App |
5 | - { |
|
6 | - return resolve(Epesi\Core\App::class); |
|
7 | - } |
|
5 | + { |
|
6 | + return resolve(Epesi\Core\App::class); |
|
7 | + } |
|
8 | 8 | } |
9 | 9 | |
10 | 10 | if (! function_exists('eval_css')) { |
11 | 11 | function eval_css($css) |
12 | - { |
|
13 | - return epesi()->addStyle($css); |
|
14 | - } |
|
12 | + { |
|
13 | + return epesi()->addStyle($css); |
|
14 | + } |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | if (! function_exists('eval_js')) { |
18 | 18 | function eval_js($js, $args = []) |
19 | - { |
|
20 | - return epesi()->addJS($js, $args); |
|
21 | - } |
|
19 | + { |
|
20 | + return epesi()->addJS($js, $args); |
|
21 | + } |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | if (! function_exists('load_css')) { |
25 | 25 | function load_css($url) |
26 | - { |
|
27 | - return epesi()->requireCSS($url); |
|
28 | - } |
|
26 | + { |
|
27 | + return epesi()->requireCSS($url); |
|
28 | + } |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | if (! function_exists('load_js')) { |
32 | 32 | function load_js($url) |
33 | - { |
|
34 | - return epesi()->requireJS($url); |
|
35 | - } |
|
33 | + { |
|
34 | + return epesi()->requireJS($url); |
|
35 | + } |
|
36 | 36 | } |
@@ -1,34 +1,34 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! function_exists('epesi')) { |
|
3 | +if (!function_exists('epesi')) { |
|
4 | 4 | function epesi() : Epesi\Core\App |
5 | 5 | { |
6 | 6 | return resolve(Epesi\Core\App::class); |
7 | 7 | } |
8 | 8 | } |
9 | 9 | |
10 | -if (! function_exists('eval_css')) { |
|
10 | +if (!function_exists('eval_css')) { |
|
11 | 11 | function eval_css($css) |
12 | 12 | { |
13 | 13 | return epesi()->addStyle($css); |
14 | 14 | } |
15 | 15 | } |
16 | 16 | |
17 | -if (! function_exists('eval_js')) { |
|
17 | +if (!function_exists('eval_js')) { |
|
18 | 18 | function eval_js($js, $args = []) |
19 | 19 | { |
20 | 20 | return epesi()->addJS($js, $args); |
21 | 21 | } |
22 | 22 | } |
23 | 23 | |
24 | -if (! function_exists('load_css')) { |
|
24 | +if (!function_exists('load_css')) { |
|
25 | 25 | function load_css($url) |
26 | 26 | { |
27 | 27 | return epesi()->requireCSS($url); |
28 | 28 | } |
29 | 29 | } |
30 | 30 | |
31 | -if (! function_exists('load_js')) { |
|
31 | +if (!function_exists('load_js')) { |
|
32 | 32 | function load_js($url) |
33 | 33 | { |
34 | 34 | return epesi()->requireJS($url); |