@@ -79,7 +79,7 @@ |
||
79 | 79 | |
80 | 80 | if(empty($count)){ |
81 | 81 | $output .= __('No Invoice(s)','invoicing'); |
82 | - }else{ |
|
82 | + } else{ |
|
83 | 83 | $link_url = admin_url( "edit.php?post_type=wpi_invoice&author=".absint($user_id) ); |
84 | 84 | $link_text = sprintf( __('Invoices ( %d )', 'invoicing'), $count ); |
85 | 85 | $output .= "<a href='$link_url' >$link_text</a>"; |
@@ -7,15 +7,15 @@ discard block |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | // MUST have WordPress. |
10 | -if ( !defined( 'WPINC' ) ) { |
|
11 | - exit( 'Do NOT access this file directly: ' . basename( __FILE__ ) ); |
|
10 | +if (!defined('WPINC')) { |
|
11 | + exit('Do NOT access this file directly: ' . basename(__FILE__)); |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | class WPInv_Admin_Users { |
15 | 15 | private static $instance; |
16 | 16 | |
17 | 17 | public static function run() { |
18 | - if ( !isset( self::$instance ) && !( self::$instance instanceof WPInv_Admin_Users ) ) { |
|
18 | + if (!isset(self::$instance) && !(self::$instance instanceof WPInv_Admin_Users)) { |
|
19 | 19 | self::$instance = new WPInv_Admin_Users; |
20 | 20 | } |
21 | 21 | |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | } |
24 | 24 | |
25 | 25 | public function __construct() { |
26 | - add_filter( 'manage_users_columns', array( $this, 'wpinv_add_user_column') ); |
|
27 | - add_filter( 'manage_users_custom_column', array( $this, 'wpinv_user_column_content') , 10, 3 ); |
|
26 | + add_filter('manage_users_columns', array($this, 'wpinv_add_user_column')); |
|
27 | + add_filter('manage_users_custom_column', array($this, 'wpinv_user_column_content'), 10, 3); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | * |
35 | 35 | * @return mixed |
36 | 36 | */ |
37 | - public function wpinv_add_user_column( $column ) { |
|
38 | - $column['wpinvoicing'] = __('Invoicing','invoicing'); |
|
37 | + public function wpinv_add_user_column($column) { |
|
38 | + $column['wpinvoicing'] = __('Invoicing', 'invoicing'); |
|
39 | 39 | return $column; |
40 | 40 | } |
41 | 41 | |
@@ -48,10 +48,10 @@ discard block |
||
48 | 48 | * |
49 | 49 | * @return string |
50 | 50 | */ |
51 | - function wpinv_user_column_content( $val, $column_name, $user_id ) { |
|
51 | + function wpinv_user_column_content($val, $column_name, $user_id) { |
|
52 | 52 | switch ($column_name) { |
53 | 53 | case 'wpinvoicing' : |
54 | - return $this->get_user_invoices( $user_id ); |
|
54 | + return $this->get_user_invoices($user_id); |
|
55 | 55 | break; |
56 | 56 | default: |
57 | 57 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * |
66 | 66 | * @return string |
67 | 67 | */ |
68 | - public function get_user_invoices($user_id){ |
|
68 | + public function get_user_invoices($user_id) { |
|
69 | 69 | $output = ''; |
70 | 70 | $wp_query_args = array( |
71 | 71 | 'post_type' => 'wpi_invoice', |
@@ -77,14 +77,14 @@ discard block |
||
77 | 77 | |
78 | 78 | $wp_query_args = apply_filters('wpinv_get_user_invoices_args', $wp_query_args, $user_id); |
79 | 79 | |
80 | - $invoices = new WP_Query( $wp_query_args ); |
|
81 | - $count = absint( $invoices->found_posts ); |
|
80 | + $invoices = new WP_Query($wp_query_args); |
|
81 | + $count = absint($invoices->found_posts); |
|
82 | 82 | |
83 | - if(empty($count)){ |
|
84 | - $output .= __('No Invoice(s)','invoicing'); |
|
85 | - }else{ |
|
86 | - $link_url = admin_url( "edit.php?post_type=wpi_invoice&author=".absint($user_id) ); |
|
87 | - $link_text = sprintf( __('Invoices ( %d )', 'invoicing'), $count ); |
|
83 | + if (empty($count)) { |
|
84 | + $output .= __('No Invoice(s)', 'invoicing'); |
|
85 | + } else { |
|
86 | + $link_url = admin_url("edit.php?post_type=wpi_invoice&author=" . absint($user_id)); |
|
87 | + $link_text = sprintf(__('Invoices ( %d )', 'invoicing'), $count); |
|
88 | 88 | $output .= "<a href='$link_url' >$link_text</a>"; |
89 | 89 | } |
90 | 90 |
@@ -28,6 +28,9 @@ |
||
28 | 28 | 'WP_Super_Duper' => __DIR__ . '/..' . '/ayecode/wp-super-duper/wp-super-duper.php', |
29 | 29 | ); |
30 | 30 | |
31 | + /** |
|
32 | + * @return callable |
|
33 | + */ |
|
31 | 34 | public static function getInitializer(ClassLoader $loader) |
32 | 35 | { |
33 | 36 | return \Closure::bind(function () use ($loader) { |
@@ -6,31 +6,31 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInit8b6d4385c391849a80038f0b0e87c8b5 |
8 | 8 | { |
9 | - public static $files = array ( |
|
9 | + public static $files = array( |
|
10 | 10 | '24583d3588ebda5228dd453cfaa070da' => __DIR__ . '/..' . '/ayecode/wp-font-awesome-settings/wp-font-awesome-settings.php', |
11 | 11 | ); |
12 | 12 | |
13 | - public static $prefixLengthsPsr4 = array ( |
|
13 | + public static $prefixLengthsPsr4 = array( |
|
14 | 14 | 'C' => |
15 | - array ( |
|
15 | + array( |
|
16 | 16 | 'Composer\\Installers\\' => 20, |
17 | 17 | ), |
18 | 18 | ); |
19 | 19 | |
20 | - public static $prefixDirsPsr4 = array ( |
|
20 | + public static $prefixDirsPsr4 = array( |
|
21 | 21 | 'Composer\\Installers\\' => |
22 | - array ( |
|
22 | + array( |
|
23 | 23 | 0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers', |
24 | 24 | ), |
25 | 25 | ); |
26 | 26 | |
27 | - public static $classMap = array ( |
|
27 | + public static $classMap = array( |
|
28 | 28 | 'WP_Super_Duper' => __DIR__ . '/..' . '/ayecode/wp-super-duper/wp-super-duper.php', |
29 | 29 | ); |
30 | 30 | |
31 | 31 | public static function getInitializer(ClassLoader $loader) |
32 | 32 | { |
33 | - return \Closure::bind(function () use ($loader) { |
|
33 | + return \Closure::bind(function() use ($loader) { |
|
34 | 34 | $loader->prefixLengthsPsr4 = ComposerStaticInit8b6d4385c391849a80038f0b0e87c8b5::$prefixLengthsPsr4; |
35 | 35 | $loader->prefixDirsPsr4 = ComposerStaticInit8b6d4385c391849a80038f0b0e87c8b5::$prefixDirsPsr4; |
36 | 36 | $loader->classMap = ComposerStaticInit8b6d4385c391849a80038f0b0e87c8b5::$classMap; |
@@ -367,6 +367,10 @@ |
||
367 | 367 | return $file; |
368 | 368 | } |
369 | 369 | |
370 | + /** |
|
371 | + * @param string $class |
|
372 | + * @param string $ext |
|
373 | + */ |
|
370 | 374 | private function findFileWithExtension($class, $ext) |
371 | 375 | { |
372 | 376 | // PSR-4 lookup |
@@ -111,13 +111,13 @@ discard block |
||
111 | 111 | if (!$prefix) { |
112 | 112 | if ($prepend) { |
113 | 113 | $this->fallbackDirsPsr0 = array_merge( |
114 | - (array) $paths, |
|
114 | + (array)$paths, |
|
115 | 115 | $this->fallbackDirsPsr0 |
116 | 116 | ); |
117 | 117 | } else { |
118 | 118 | $this->fallbackDirsPsr0 = array_merge( |
119 | 119 | $this->fallbackDirsPsr0, |
120 | - (array) $paths |
|
120 | + (array)$paths |
|
121 | 121 | ); |
122 | 122 | } |
123 | 123 | |
@@ -126,19 +126,19 @@ discard block |
||
126 | 126 | |
127 | 127 | $first = $prefix[0]; |
128 | 128 | if (!isset($this->prefixesPsr0[$first][$prefix])) { |
129 | - $this->prefixesPsr0[$first][$prefix] = (array) $paths; |
|
129 | + $this->prefixesPsr0[$first][$prefix] = (array)$paths; |
|
130 | 130 | |
131 | 131 | return; |
132 | 132 | } |
133 | 133 | if ($prepend) { |
134 | 134 | $this->prefixesPsr0[$first][$prefix] = array_merge( |
135 | - (array) $paths, |
|
135 | + (array)$paths, |
|
136 | 136 | $this->prefixesPsr0[$first][$prefix] |
137 | 137 | ); |
138 | 138 | } else { |
139 | 139 | $this->prefixesPsr0[$first][$prefix] = array_merge( |
140 | 140 | $this->prefixesPsr0[$first][$prefix], |
141 | - (array) $paths |
|
141 | + (array)$paths |
|
142 | 142 | ); |
143 | 143 | } |
144 | 144 | } |
@@ -159,13 +159,13 @@ discard block |
||
159 | 159 | // Register directories for the root namespace. |
160 | 160 | if ($prepend) { |
161 | 161 | $this->fallbackDirsPsr4 = array_merge( |
162 | - (array) $paths, |
|
162 | + (array)$paths, |
|
163 | 163 | $this->fallbackDirsPsr4 |
164 | 164 | ); |
165 | 165 | } else { |
166 | 166 | $this->fallbackDirsPsr4 = array_merge( |
167 | 167 | $this->fallbackDirsPsr4, |
168 | - (array) $paths |
|
168 | + (array)$paths |
|
169 | 169 | ); |
170 | 170 | } |
171 | 171 | } elseif (!isset($this->prefixDirsPsr4[$prefix])) { |
@@ -175,18 +175,18 @@ discard block |
||
175 | 175 | throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); |
176 | 176 | } |
177 | 177 | $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; |
178 | - $this->prefixDirsPsr4[$prefix] = (array) $paths; |
|
178 | + $this->prefixDirsPsr4[$prefix] = (array)$paths; |
|
179 | 179 | } elseif ($prepend) { |
180 | 180 | // Prepend directories for an already registered namespace. |
181 | 181 | $this->prefixDirsPsr4[$prefix] = array_merge( |
182 | - (array) $paths, |
|
182 | + (array)$paths, |
|
183 | 183 | $this->prefixDirsPsr4[$prefix] |
184 | 184 | ); |
185 | 185 | } else { |
186 | 186 | // Append directories for an already registered namespace. |
187 | 187 | $this->prefixDirsPsr4[$prefix] = array_merge( |
188 | 188 | $this->prefixDirsPsr4[$prefix], |
189 | - (array) $paths |
|
189 | + (array)$paths |
|
190 | 190 | ); |
191 | 191 | } |
192 | 192 | } |
@@ -201,9 +201,9 @@ discard block |
||
201 | 201 | public function set($prefix, $paths) |
202 | 202 | { |
203 | 203 | if (!$prefix) { |
204 | - $this->fallbackDirsPsr0 = (array) $paths; |
|
204 | + $this->fallbackDirsPsr0 = (array)$paths; |
|
205 | 205 | } else { |
206 | - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; |
|
206 | + $this->prefixesPsr0[$prefix[0]][$prefix] = (array)$paths; |
|
207 | 207 | } |
208 | 208 | } |
209 | 209 | |
@@ -219,14 +219,14 @@ discard block |
||
219 | 219 | public function setPsr4($prefix, $paths) |
220 | 220 | { |
221 | 221 | if (!$prefix) { |
222 | - $this->fallbackDirsPsr4 = (array) $paths; |
|
222 | + $this->fallbackDirsPsr4 = (array)$paths; |
|
223 | 223 | } else { |
224 | 224 | $length = strlen($prefix); |
225 | 225 | if ('\\' !== $prefix[$length - 1]) { |
226 | 226 | throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); |
227 | 227 | } |
228 | 228 | $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; |
229 | - $this->prefixDirsPsr4[$prefix] = (array) $paths; |
|
229 | + $this->prefixDirsPsr4[$prefix] = (array)$paths; |
|
230 | 230 | } |
231 | 231 | } |
232 | 232 | |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | return false; |
343 | 343 | } |
344 | 344 | if (null !== $this->apcuPrefix) { |
345 | - $file = apcu_fetch($this->apcuPrefix.$class, $hit); |
|
345 | + $file = apcu_fetch($this->apcuPrefix . $class, $hit); |
|
346 | 346 | if ($hit) { |
347 | 347 | return $file; |
348 | 348 | } |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | } |
357 | 357 | |
358 | 358 | if (null !== $this->apcuPrefix) { |
359 | - apcu_add($this->apcuPrefix.$class, $file); |
|
359 | + apcu_add($this->apcuPrefix . $class, $file); |
|
360 | 360 | } |
361 | 361 | |
362 | 362 | if (false === $file) { |
@@ -35,7 +35,7 @@ |
||
35 | 35 | public function getLocations() |
36 | 36 | { |
37 | 37 | if ($this->matchesCakeVersion('>=', '3.0.0')) { |
38 | - $this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/'; |
|
38 | + $this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/'; |
|
39 | 39 | } |
40 | 40 | return $this->locations; |
41 | 41 | } |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | |
6 | 6 | class OxidInstaller extends BaseInstaller |
7 | 7 | { |
8 | - const VENDOR_PATTERN = '/^modules\/(?P<vendor>.+)\/.+/'; |
|
8 | + const VENDOR_PATTERN = '/^modules\/(?P<vendor>.+)\/.+/'; |
|
9 | 9 | |
10 | 10 | protected $locations = array( |
11 | 11 | 'module' => 'modules/{$name}/', |
@@ -13,47 +13,47 @@ discard block |
||
13 | 13 | 'out' => 'out/{$name}/', |
14 | 14 | ); |
15 | 15 | |
16 | - /** |
|
17 | - * getInstallPath |
|
18 | - * |
|
19 | - * @param PackageInterface $package |
|
20 | - * @param string $frameworkType |
|
21 | - * @return void |
|
22 | - */ |
|
23 | - public function getInstallPath(PackageInterface $package, $frameworkType = '') |
|
24 | - { |
|
25 | - $installPath = parent::getInstallPath($package, $frameworkType); |
|
26 | - $type = $this->package->getType(); |
|
27 | - if ($type === 'oxid-module') { |
|
28 | - $this->prepareVendorDirectory($installPath); |
|
29 | - } |
|
30 | - return $installPath; |
|
31 | - } |
|
16 | + /** |
|
17 | + * getInstallPath |
|
18 | + * |
|
19 | + * @param PackageInterface $package |
|
20 | + * @param string $frameworkType |
|
21 | + * @return void |
|
22 | + */ |
|
23 | + public function getInstallPath(PackageInterface $package, $frameworkType = '') |
|
24 | + { |
|
25 | + $installPath = parent::getInstallPath($package, $frameworkType); |
|
26 | + $type = $this->package->getType(); |
|
27 | + if ($type === 'oxid-module') { |
|
28 | + $this->prepareVendorDirectory($installPath); |
|
29 | + } |
|
30 | + return $installPath; |
|
31 | + } |
|
32 | 32 | |
33 | - /** |
|
34 | - * prepareVendorDirectory |
|
35 | - * |
|
36 | - * Makes sure there is a vendormetadata.php file inside |
|
37 | - * the vendor folder if there is a vendor folder. |
|
38 | - * |
|
39 | - * @param string $installPath |
|
40 | - * @return void |
|
41 | - */ |
|
42 | - protected function prepareVendorDirectory($installPath) |
|
43 | - { |
|
44 | - $matches = ''; |
|
45 | - $hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches); |
|
46 | - if (!$hasVendorDirectory) { |
|
47 | - return; |
|
48 | - } |
|
33 | + /** |
|
34 | + * prepareVendorDirectory |
|
35 | + * |
|
36 | + * Makes sure there is a vendormetadata.php file inside |
|
37 | + * the vendor folder if there is a vendor folder. |
|
38 | + * |
|
39 | + * @param string $installPath |
|
40 | + * @return void |
|
41 | + */ |
|
42 | + protected function prepareVendorDirectory($installPath) |
|
43 | + { |
|
44 | + $matches = ''; |
|
45 | + $hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches); |
|
46 | + if (!$hasVendorDirectory) { |
|
47 | + return; |
|
48 | + } |
|
49 | 49 | |
50 | - $vendorDirectory = $matches['vendor']; |
|
51 | - $vendorPath = getcwd() . '/modules/' . $vendorDirectory; |
|
52 | - if (!file_exists($vendorPath)) { |
|
53 | - mkdir($vendorPath, 0755, true); |
|
54 | - } |
|
50 | + $vendorDirectory = $matches['vendor']; |
|
51 | + $vendorPath = getcwd() . '/modules/' . $vendorDirectory; |
|
52 | + if (!file_exists($vendorPath)) { |
|
53 | + mkdir($vendorPath, 0755, true); |
|
54 | + } |
|
55 | 55 | |
56 | - $vendorMetaDataPath = $vendorPath . '/vendormetadata.php'; |
|
57 | - touch($vendorMetaDataPath); |
|
58 | - } |
|
56 | + $vendorMetaDataPath = $vendorPath . '/vendormetadata.php'; |
|
57 | + touch($vendorMetaDataPath); |
|
58 | + } |
|
59 | 59 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | $restrictedWords = implode('|', array_keys($this->locations)); |
21 | 21 | |
22 | 22 | $vars['name'] = strtolower($vars['name']); |
23 | - $vars['name'] = preg_replace('/^(?:grav-)?(?:(?:'.$restrictedWords.')-)?(.*?)(?:-(?:'.$restrictedWords.'))?$/ui', |
|
23 | + $vars['name'] = preg_replace('/^(?:grav-)?(?:(?:' . $restrictedWords . ')-)?(.*?)(?:-(?:' . $restrictedWords . '))?$/ui', |
|
24 | 24 | '$1', |
25 | 25 | $vars['name'] |
26 | 26 | ); |
@@ -3,8 +3,8 @@ |
||
3 | 3 | |
4 | 4 | class ClanCatsFrameworkInstaller extends BaseInstaller |
5 | 5 | { |
6 | - protected $locations = array( |
|
7 | - 'ship' => 'CCF/orbit/{$name}/', |
|
8 | - 'theme' => 'CCF/app/themes/{$name}/', |
|
9 | - ); |
|
6 | + protected $locations = array( |
|
7 | + 'ship' => 'CCF/orbit/{$name}/', |
|
8 | + 'theme' => 'CCF/app/themes/{$name}/', |
|
9 | + ); |
|
10 | 10 | } |
11 | 11 | \ No newline at end of file |
@@ -14,7 +14,7 @@ |
||
14 | 14 | public function inflectPackageVars($vars) |
15 | 15 | { |
16 | 16 | if ($vars['type'] == 'mautic-plugin') { |
17 | - $vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) { |
|
17 | + $vars['name'] = preg_replace_callback('/(-[a-z])/', function($matches) { |
|
18 | 18 | return strtoupper($matches[0][1]); |
19 | 19 | }, ucfirst($vars['name'])); |
20 | 20 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | unset($vars['name'][$key]); |
23 | 23 | } |
24 | 24 | } |
25 | - $vars['name'] = implode("",$vars['name']); |
|
25 | + $vars['name'] = implode("", $vars['name']); |
|
26 | 26 | |
27 | 27 | return $vars; |
28 | 28 | } |