Completed
Pull Request — develop (#1687)
by
unknown
16:12
created
includes/class-admin-views.php 1 patch
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -62,28 +62,28 @@  discard block
 block discarded – undo
62 62
 	}
63 63
 
64 64
 	/**
65
-     * When on the Add/Edit View screen, suggest most popular articles related to that
66
-     *
65
+	 * When on the Add/Edit View screen, suggest most popular articles related to that
66
+	 *
67 67
 	 * @param array $localization_data Data to be passed to the Support Port JS
68 68
 	 *
69 69
 	 * @return array
70 70
 	 */
71 71
 	function suggest_support_articles( $localization_data = array() ) {
72 72
 
73
-	    if( ! gravityview()->request->is_view() ) {
74
-	        return $localization_data;
75
-        }
73
+		if( ! gravityview()->request->is_view() ) {
74
+			return $localization_data;
75
+		}
76 76
 
77 77
 		$localization_data['suggest'] = array(
78
-            '57ef23539033602e61d4a560',
79
-            '54c67bb9e4b0512429885513',
80
-            '54c67bb9e4b0512429885512',
81
-            '54c67bbbe4b07997ea3f3f6b',
82
-            '54d1a33ae4b086c0c0964ce9',
83
-            '57ef253c9033602e61d4a563',
84
-            '552355bfe4b0221aadf2572b',
85
-            '54c67bcde4b051242988553e',
86
-        );
78
+			'57ef23539033602e61d4a560',
79
+			'54c67bb9e4b0512429885513',
80
+			'54c67bb9e4b0512429885512',
81
+			'54c67bbbe4b07997ea3f3f6b',
82
+			'54d1a33ae4b086c0c0964ce9',
83
+			'57ef253c9033602e61d4a563',
84
+			'552355bfe4b0221aadf2572b',
85
+			'54c67bcde4b051242988553e',
86
+		);
87 87
 
88 88
 		return $localization_data;
89 89
 	}
@@ -229,11 +229,11 @@  discard block
 block discarded – undo
229 229
 
230 230
 		if( 'form_list' === GFForms::get_page() ) {
231 231
 			$priority = 790;
232
-        }
232
+		}
233 233
 
234 234
 		if( empty( $connected_views ) ) {
235 235
 
236
-		    $menu_items['gravityview'] = array(
236
+			$menu_items['gravityview'] = array(
237 237
 				'label'          => esc_attr__( 'Create a View', 'gravityview' ),
238 238
 				'icon'           => '<i class="fa fa-lg gv-icon-astronaut-head gv-icon"></i>', // Only appears in GF pre-2.5
239 239
 				'title'          => esc_attr__( 'Create a View using this form as a data source', 'gravityview' ),
@@ -265,13 +265,13 @@  discard block
 block discarded – undo
265 265
 		// If there were no items added, then let's create the parent menu
266 266
 		if( $sub_menu_items ) {
267 267
 
268
-		    $sub_menu_items[] = array(
269
-			    'label' => esc_attr__( 'Create a View', 'gravityview' ),
270
-			    'icon' => '<span class="dashicons dashicons-plus"></span>',
271
-			    'title' => esc_attr__( 'Create a View using this form as a data source', 'gravityview' ),
272
-			    'url'   => admin_url( 'post-new.php?post_type=gravityview&form_id=' . $id ),
273
-			    'capabilities'   => array( 'edit_gravityviews' ),
274
-            );
268
+			$sub_menu_items[] = array(
269
+				'label' => esc_attr__( 'Create a View', 'gravityview' ),
270
+				'icon' => '<span class="dashicons dashicons-plus"></span>',
271
+				'title' => esc_attr__( 'Create a View using this form as a data source', 'gravityview' ),
272
+				'url'   => admin_url( 'post-new.php?post_type=gravityview&form_id=' . $id ),
273
+				'capabilities'   => array( 'edit_gravityviews' ),
274
+			);
275 275
 
276 276
 			// Make sure Gravity Forms uses the submenu; if there's only one item, it uses a link instead of a dropdown
277 277
 			$sub_menu_items[] = array(
@@ -668,16 +668,16 @@  discard block
 block discarded – undo
668 668
 	/**
669 669
 	 * Render html for displaying available fields based on a Form ID
670 670
 	 *
671
-     * @see GravityView_Ajax::get_available_fields_html() Triggers `gravityview_render_available_fields` action
671
+	 * @see GravityView_Ajax::get_available_fields_html() Triggers `gravityview_render_available_fields` action
672 672
 	 *
673 673
 	 * @param int $form Gravity Forms Form ID (default: '')
674 674
 	 * @param string $context (default: 'single')
675
-     *
675
+	 *
676 676
 	 * @return void
677 677
 	 */
678 678
 	function render_available_fields( $form = 0, $context = 'single' ) {
679 679
 
680
-	    // Determine if form is a preset and convert it to an array with fields
680
+		// Determine if form is a preset and convert it to an array with fields
681 681
 		$form = ( is_string( $form ) && preg_match( '/^preset_/', $form ) ) ? GravityView_Ajax::pre_get_form_fields( $form ) : $form;
682 682
 
683 683
 		/**
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
 
696 696
 		if ( ! is_array( $blocklist_field_types ) ) {
697 697
 
698
-		    gravityview()->log->error( '$blocklist_field_types is not an array', array( 'data' => print_r( $blocklist_field_types, true ) ) );
698
+			gravityview()->log->error( '$blocklist_field_types is not an array', array( 'data' => print_r( $blocklist_field_types, true ) ) );
699 699
 
700 700
 			$blocklist_field_types = array();
701 701
 		}
@@ -953,9 +953,9 @@  discard block
 block discarded – undo
953 953
 
954 954
 				$joined_forms = gravityview_get_joined_forms( $post->ID );
955 955
 
956
-                foreach ( $joined_forms as $form ) {
957
-                    $available_items[ $form->ID ] = $this->get_available_fields( $form->ID, $zone );
958
-                }
956
+				foreach ( $joined_forms as $form ) {
957
+					$available_items[ $form->ID ] = $this->get_available_fields( $form->ID, $zone );
958
+				}
959 959
 			} else {
960 960
 				$available_items[ $form ] = \GV\Widget::registered();
961 961
 			}
@@ -994,9 +994,9 @@  discard block
 block discarded – undo
994 994
 
995 995
 										if ( $form_id ) {
996 996
 											$original_item = isset( $available_items[ $form_id ] [ $field['id'] ] ) ? $available_items[ $form_id ] [ $field['id'] ] : false ;
997
-                                        } else {
997
+										} else {
998 998
 											$original_item = isset( $available_items[ $field['id'] ] ) ? $available_items[ $field['id'] ] : false ;
999
-                                        }
999
+										}
1000 1000
 
1001 1001
 										if ( !$original_item ) {
1002 1002
 											gravityview()->log->error( 'An item was not available when rendering the output; maybe it was added by a plugin that is now de-activated.', array(' data' => array('available_items' => $available_items, 'field' => $field ) ) );
@@ -1246,7 +1246,7 @@  discard block
 block discarded – undo
1246 1246
 		}
1247 1247
 
1248 1248
 		// Add the GV font (with the Astronaut)
1249
-        wp_enqueue_style( 'gravityview_global', plugins_url('assets/css/admin-global.css', GRAVITYVIEW_FILE), array(), \GV\Plugin::$version );
1249
+		wp_enqueue_style( 'gravityview_global', plugins_url('assets/css/admin-global.css', GRAVITYVIEW_FILE), array(), \GV\Plugin::$version );
1250 1250
 		wp_register_style( 'gravityview_views_styles', plugins_url( 'assets/css/admin-views.css', GRAVITYVIEW_FILE ), array( 'dashicons', 'wp-jquery-ui-dialog' ), \GV\Plugin::$version );
1251 1251
 
1252 1252
 		wp_register_script( 'gravityview-jquery-cookie', plugins_url('assets/lib/jquery.cookie/jquery.cookie.min.js', GRAVITYVIEW_FILE), array( 'jquery' ), \GV\Plugin::$version, true );
@@ -1254,46 +1254,46 @@  discard block
 block discarded – undo
1254 1254
 		if( GFForms::get_page() === 'form_list' ) {
1255 1255
 			wp_enqueue_style( 'gravityview_views_styles' );
1256 1256
 			return;
1257
-        }
1257
+		}
1258 1258
 
1259 1259
 		// Don't process any scripts below here if it's not a GravityView page.
1260 1260
 		if( ! gravityview()->request->is_admin( $hook, 'single' ) && ! $is_widgets_page ) {
1261
-		    return;
1261
+			return;
1262 1262
 		}
1263 1263
 
1264 1264
 		wp_enqueue_code_editor( array( 'type' => 'text/html' ) );
1265 1265
 
1266
-        wp_enqueue_script( 'jquery-ui-datepicker' );
1267
-
1268
-        wp_enqueue_style( 'gravityview_views_datepicker', plugins_url('assets/css/admin-datepicker.css', GRAVITYVIEW_FILE), \GV\Plugin::$version );
1269
-
1270
-        // Enqueue scripts
1271
-        wp_enqueue_script( 'gravityview_views_scripts', plugins_url( 'assets/js/admin-views' . $script_debug . '.js', GRAVITYVIEW_FILE ), array( 'jquery-ui-tabs', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-ui-tooltip', 'jquery-ui-dialog', 'gravityview-jquery-cookie', 'jquery-ui-datepicker', 'underscore' ), \GV\Plugin::$version );
1272
-
1273
-        wp_localize_script('gravityview_views_scripts', 'gvGlobals', array(
1274
-            'cookiepath' => COOKIEPATH,
1275
-            'admin_cookiepath' => ADMIN_COOKIE_PATH,
1276
-            'passed_form_id' => (bool) \GV\Utils::_GET( 'form_id' ),
1277
-            'nonce' => wp_create_nonce( 'gravityview_ajaxviews' ),
1278
-            'label_viewname' => __( 'Enter View name here', 'gravityview' ),
1279
-            'label_reorder_search_fields' => __( 'Reorder Search Fields', 'gravityview' ),
1280
-            'label_add_search_field' => __( 'Add Search Field', 'gravityview' ),
1281
-            'label_remove_search_field' => __( 'Remove Search Field', 'gravityview' ),
1282
-            'label_close' => __( 'Close', 'gravityview' ),
1283
-            'label_cancel' => __( 'Cancel', 'gravityview' ),
1284
-            'label_continue' => __( 'Continue', 'gravityview' ),
1285
-            'label_ok' => __( 'Ok', 'gravityview' ),
1286
-            'label_publisherror' => __( 'Error while creating the View for you. Check the settings or contact GravityView support.', 'gravityview' ),
1287
-            'loading_text' => esc_html__( 'Loading&hellip;', 'gravityview' ),
1288
-            'loading_error' => esc_html__( 'There was an error loading dynamic content.', 'gravityview' ),
1289
-            'field_loaderror' => __( 'Error while adding the field. Please try again or contact GravityView support.', 'gravityview' ),
1290
-            'remove_all_fields' => __( 'Would you like to remove all fields in this zone?', 'gravityview' ),
1291
-        ));
1266
+		wp_enqueue_script( 'jquery-ui-datepicker' );
1267
+
1268
+		wp_enqueue_style( 'gravityview_views_datepicker', plugins_url('assets/css/admin-datepicker.css', GRAVITYVIEW_FILE), \GV\Plugin::$version );
1269
+
1270
+		// Enqueue scripts
1271
+		wp_enqueue_script( 'gravityview_views_scripts', plugins_url( 'assets/js/admin-views' . $script_debug . '.js', GRAVITYVIEW_FILE ), array( 'jquery-ui-tabs', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-ui-tooltip', 'jquery-ui-dialog', 'gravityview-jquery-cookie', 'jquery-ui-datepicker', 'underscore' ), \GV\Plugin::$version );
1272
+
1273
+		wp_localize_script('gravityview_views_scripts', 'gvGlobals', array(
1274
+			'cookiepath' => COOKIEPATH,
1275
+			'admin_cookiepath' => ADMIN_COOKIE_PATH,
1276
+			'passed_form_id' => (bool) \GV\Utils::_GET( 'form_id' ),
1277
+			'nonce' => wp_create_nonce( 'gravityview_ajaxviews' ),
1278
+			'label_viewname' => __( 'Enter View name here', 'gravityview' ),
1279
+			'label_reorder_search_fields' => __( 'Reorder Search Fields', 'gravityview' ),
1280
+			'label_add_search_field' => __( 'Add Search Field', 'gravityview' ),
1281
+			'label_remove_search_field' => __( 'Remove Search Field', 'gravityview' ),
1282
+			'label_close' => __( 'Close', 'gravityview' ),
1283
+			'label_cancel' => __( 'Cancel', 'gravityview' ),
1284
+			'label_continue' => __( 'Continue', 'gravityview' ),
1285
+			'label_ok' => __( 'Ok', 'gravityview' ),
1286
+			'label_publisherror' => __( 'Error while creating the View for you. Check the settings or contact GravityView support.', 'gravityview' ),
1287
+			'loading_text' => esc_html__( 'Loading&hellip;', 'gravityview' ),
1288
+			'loading_error' => esc_html__( 'There was an error loading dynamic content.', 'gravityview' ),
1289
+			'field_loaderror' => __( 'Error while adding the field. Please try again or contact GravityView support.', 'gravityview' ),
1290
+			'remove_all_fields' => __( 'Would you like to remove all fields in this zone?', 'gravityview' ),
1291
+		));
1292 1292
 
1293 1293
 		wp_enqueue_style( 'gravityview_views_styles' );
1294 1294
 
1295
-        // Enqueue scripts needed for merge tags
1296
-        self::enqueue_gravity_forms_scripts();
1295
+		// Enqueue scripts needed for merge tags
1296
+		self::enqueue_gravity_forms_scripts();
1297 1297
 
1298 1298
 		// 2.5 changed how Merge Tags are enqueued
1299 1299
 		if ( is_callable( array( 'GFCommon', 'output_hooks_javascript') ) ) {
@@ -1303,24 +1303,24 @@  discard block
 block discarded – undo
1303 1303
 
1304 1304
 	/**
1305 1305
 	 * Enqueue Gravity Forms scripts, needed for Merge Tags
1306
-     *
1307
-     * @since 1.0.5-beta
1308
-     *
1309
-     * @return void
1306
+	 *
1307
+	 * @since 1.0.5-beta
1308
+	 *
1309
+	 * @return void
1310 1310
 	 */
1311 1311
 	static function enqueue_gravity_forms_scripts() {
1312 1312
 		GFForms::register_scripts();
1313 1313
 
1314 1314
 		$scripts = array(
1315
-		    'sack',
1316
-		    'gform_gravityforms',
1317
-		    'gform_forms',
1318
-		    'gform_form_admin',
1319
-		    'jquery-ui-autocomplete'
1315
+			'sack',
1316
+			'gform_gravityforms',
1317
+			'gform_forms',
1318
+			'gform_form_admin',
1319
+			'jquery-ui-autocomplete'
1320 1320
 		);
1321 1321
 
1322 1322
 		if ( wp_is_mobile() ) {
1323
-		    $scripts[] = 'jquery-touch-punch';
1323
+			$scripts[] = 'jquery-touch-punch';
1324 1324
 		}
1325 1325
 
1326 1326
 		wp_enqueue_script( $scripts );
Please login to merge, or discard this patch.
includes/class-common.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -316,12 +316,12 @@  discard block
 block discarded – undo
316 316
 						}
317 317
 
318 318
 						/**
319
-                         * @hack
320
-                         * In case of email/email confirmation, the input for email has the same id as the parent field
321
-                         */
319
+						 * @hack
320
+						 * In case of email/email confirmation, the input for email has the same id as the parent field
321
+						 */
322 322
 						if( 'email' === $field['type'] && false === strpos( $input['id'], '.' ) ) {
323
-                            continue;
324
-                        }
323
+							continue;
324
+						}
325 325
 						$fields["{$input['id']}"] = array(
326 326
 							'label' => \GV\Utils::get( $input, 'label' ),
327 327
 							'customLabel' => \GV\Utils::get( $input, 'customLabel' ),
@@ -1421,7 +1421,7 @@  discard block
 block discarded – undo
1421 1421
 			),
1422 1422
 		);
1423 1423
 
1424
-        $fields = $date_created + $fields;
1424
+		$fields = $date_created + $fields;
1425 1425
 
1426 1426
 		$blocklist_field_types = $blocklist;
1427 1427
 
@@ -1453,13 +1453,13 @@  discard block
 block discarded – undo
1453 1453
 
1454 1454
 		}
1455 1455
 
1456
-        /**
1457
-         * @filter `gravityview/common/sortable_fields` Filter the sortable fields
1458
-         * @since 1.12
1459
-         * @param array $fields Sub-set of GF form fields that are sortable
1460
-         * @param int $formid The Gravity Forms form ID that the fields are from
1461
-         */
1462
-        $fields = apply_filters( 'gravityview/common/sortable_fields', $fields, $formid );
1456
+		/**
1457
+		 * @filter `gravityview/common/sortable_fields` Filter the sortable fields
1458
+		 * @since 1.12
1459
+		 * @param array $fields Sub-set of GF form fields that are sortable
1460
+		 * @param int $formid The Gravity Forms form ID that the fields are from
1461
+		 */
1462
+		$fields = apply_filters( 'gravityview/common/sortable_fields', $fields, $formid );
1463 1463
 
1464 1464
 		return $fields;
1465 1465
 	}
@@ -1752,26 +1752,26 @@  discard block
 block discarded – undo
1752 1752
 	}
1753 1753
 
1754 1754
 
1755
-    /**
1756
-     * Display updated/error notice
1757
-     *
1758
-     * @since 1.19.2 Added $cap and $object_id parameters
1759
-     *
1760
-     * @param string $notice text/HTML of notice
1761
-     * @param string $class CSS class for notice (`updated` or `error`)
1762
-     * @param string $cap [Optional] Define a capability required to show a notice. If not set, displays to all caps.
1763
-     *
1764
-     * @return string
1765
-     */
1766
-    public static function generate_notice( $notice, $class = '', $cap = '', $object_id = null ) {
1767
-
1768
-    	// If $cap is defined, only show notice if user has capability
1769
-    	if( $cap && ! GVCommon::has_cap( $cap, $object_id ) ) {
1770
-    		return '';
1771
-	    }
1772
-
1773
-        return '<div class="gv-notice '.gravityview_sanitize_html_class( $class ) .'">'. $notice .'</div>';
1774
-    }
1755
+	/**
1756
+	 * Display updated/error notice
1757
+	 *
1758
+	 * @since 1.19.2 Added $cap and $object_id parameters
1759
+	 *
1760
+	 * @param string $notice text/HTML of notice
1761
+	 * @param string $class CSS class for notice (`updated` or `error`)
1762
+	 * @param string $cap [Optional] Define a capability required to show a notice. If not set, displays to all caps.
1763
+	 *
1764
+	 * @return string
1765
+	 */
1766
+	public static function generate_notice( $notice, $class = '', $cap = '', $object_id = null ) {
1767
+
1768
+		// If $cap is defined, only show notice if user has capability
1769
+		if( $cap && ! GVCommon::has_cap( $cap, $object_id ) ) {
1770
+			return '';
1771
+		}
1772
+
1773
+		return '<div class="gv-notice '.gravityview_sanitize_html_class( $class ) .'">'. $notice .'</div>';
1774
+	}
1775 1775
 
1776 1776
 	/**
1777 1777
 	 * Inspired on \GFCommon::encode_shortcodes, reverse the encoding by replacing the ascii characters by the shortcode brackets
Please login to merge, or discard this patch.
includes/extensions/edit-entry/class-edit-entry.php 1 patch
Indentation   +157 added lines, -157 removed lines patch added patch discarded remove patch
@@ -18,84 +18,84 @@  discard block
 block discarded – undo
18 18
 
19 19
 class GravityView_Edit_Entry {
20 20
 
21
-    /**
22
-     * @var string
23
-     */
21
+	/**
22
+	 * @var string
23
+	 */
24 24
 	static $file;
25 25
 
26 26
 	static $instance;
27 27
 
28
-    /**
29
-     * Component instances.
30
-     * @var array
31
-     */
32
-    public $instances = array();
28
+	/**
29
+	 * Component instances.
30
+	 * @var array
31
+	 */
32
+	public $instances = array();
33 33
 
34 34
 
35 35
 	function __construct() {
36 36
 
37
-        self::$file = plugin_dir_path( __FILE__ );
37
+		self::$file = plugin_dir_path( __FILE__ );
38 38
 
39
-        if( is_admin() ) {
40
-            $this->load_components( 'admin' );
41
-        }
39
+		if( is_admin() ) {
40
+			$this->load_components( 'admin' );
41
+		}
42 42
 
43 43
 		$this->load_components( 'locking' );
44 44
 
45
-        $this->load_components( 'render' );
45
+		$this->load_components( 'render' );
46 46
 
47
-        // If GF User Registration Add-on exists
48
-        $this->load_components( 'user-registration' );
47
+		// If GF User Registration Add-on exists
48
+		$this->load_components( 'user-registration' );
49 49
 
50
-        $this->add_hooks();
50
+		$this->add_hooks();
51 51
 
52 52
 		// Process hooks for addons that may or may not be present
53 53
 		$this->addon_specific_hooks();
54 54
 	}
55 55
 
56 56
 
57
-    static function getInstance() {
57
+	static function getInstance() {
58 58
 
59
-        if( empty( self::$instance ) ) {
60
-            self::$instance = new GravityView_Edit_Entry;
61
-        }
59
+		if( empty( self::$instance ) ) {
60
+			self::$instance = new GravityView_Edit_Entry;
61
+		}
62 62
 
63
-        return self::$instance;
64
-    }
63
+		return self::$instance;
64
+	}
65 65
 
66 66
 
67
-    private function load_components( $component ) {
67
+	private function load_components( $component ) {
68 68
 
69
-        $dir = trailingslashit( self::$file );
69
+		$dir = trailingslashit( self::$file );
70 70
 
71
-        $filename  = $dir . 'class-edit-entry-' . $component . '.php';
72
-        $classname = 'GravityView_Edit_Entry_' . str_replace( ' ', '_', ucwords( str_replace( '-', ' ', $component ) ) );
71
+		$filename  = $dir . 'class-edit-entry-' . $component . '.php';
72
+		$classname = 'GravityView_Edit_Entry_' . str_replace( ' ', '_', ucwords( str_replace( '-', ' ', $component ) ) );
73 73
 
74
-        // Loads component and pass extension's instance so that component can
75
-        // talk each other.
76
-        require_once $filename;
77
-        $this->instances[ $component ] = new $classname( $this );
78
-        $this->instances[ $component ]->load();
74
+		// Loads component and pass extension's instance so that component can
75
+		// talk each other.
76
+		require_once $filename;
77
+		$this->instances[ $component ] = new $classname( $this );
78
+		$this->instances[ $component ]->load();
79 79
 
80
-    }
80
+	}
81 81
 
82
-    private function add_hooks() {
82
+	private function add_hooks() {
83 83
 
84
-        // Add front-end access to Gravity Forms delete file action
85
-        add_action( 'wp_ajax_nopriv_rg_delete_file', array( 'GFForms', 'delete_file') );
84
+		// Add front-end access to Gravity Forms delete file action
85
+		add_action( 'wp_ajax_nopriv_rg_delete_file', array( 'GFForms', 'delete_file') );
86 86
 
87
-        // Make sure this hook is run for non-admins
88
-        add_action( 'wp_ajax_rg_delete_file', array( 'GFForms', 'delete_file') );
87
+		// Make sure this hook is run for non-admins
88
+		add_action( 'wp_ajax_rg_delete_file', array( 'GFForms', 'delete_file') );
89 89
 
90
-        add_filter( 'gravityview_blocklist_field_types', array( $this, 'modify_field_blocklist' ), 10, 2 );
90
+		add_filter( 'gravityview_blocklist_field_types', array( $this, 'modify_field_blocklist' ), 10, 2 );
91 91
 
92
-        // add template path to check for field
93
-        add_filter( 'gravityview_template_paths', array( $this, 'add_template_path' ) );
92
+		// add template path to check for field
93
+		add_filter( 'gravityview_template_paths', array( $this, 'add_template_path' ) );
94 94
 
95 95
 		add_filter( 'gravityview/field/is_visible', array( $this, 'maybe_not_visible' ), 10, 3 );
96 96
 
97 97
 		add_filter( 'gravityview/api/reserved_query_args', array( $this, 'add_reserved_arg' ) );
98
-    }
98
+	}
99 99
 
100 100
 	/**
101 101
 	 * Adds "edit" to the list of internal reserved query args
@@ -166,74 +166,74 @@  discard block
 block discarded – undo
166 166
 		return false;
167 167
 	}
168 168
 
169
-    /**
170
-     * Include this extension templates path
171
-     * @param array $file_paths List of template paths ordered
172
-     */
173
-    public function add_template_path( $file_paths ) {
174
-
175
-        // Index 100 is the default GravityView template path.
176
-        $file_paths[ 110 ] = self::$file;
177
-
178
-        return $file_paths;
179
-    }
180
-
181
-    /**
182
-     *
183
-     * Return a well formatted nonce key according to GravityView Edit Entry protocol
184
-     *
185
-     * @param $view_id int GravityView view id
186
-     * @param $form_id int Gravity Forms form id
187
-     * @param $entry_id int Gravity Forms entry id
188
-     * @return string
189
-     */
190
-    public static function get_nonce_key( $view_id, $form_id, $entry_id ) {
191
-        return sprintf( 'edit_%d_%d_%d', $view_id, $form_id, $entry_id );
192
-    }
193
-
194
-
195
-    /**
196
-     * The edit entry link creates a secure link with a nonce
197
-     *
198
-     * It also mimics the URL structure Gravity Forms expects to have so that
199
-     * it formats the display of the edit form like it does in the backend, like
200
-     * "You can edit this post from the post page" fields, for example.
201
-     *
202
-     * @param $entry array Gravity Forms entry object
203
-     * @param $view_id int GravityView view id
204
-     * @param $post_id int GravityView Post ID where View may be embedded {@since 1.9.2}
205
-     * @param string|array $field_values Parameters to pass in to the Edit Entry form to prefill data. Uses the same format as Gravity Forms "Allow field to be populated dynamically" {@since 1.9.2} {@see https://www.gravityhelp.com/documentation/article/allow-field-to-be-populated-dynamically/ }
206
-     * @return string
207
-     */
208
-    public static function get_edit_link( $entry, $view_id, $post_id = null, $field_values = '' ) {
209
-
210
-        $nonce_key = self::get_nonce_key( $view_id, $entry['form_id'], $entry['id']  );
211
-
212
-        $base = gv_entry_link( $entry, $post_id ? : $view_id  );
213
-
214
-        $url = add_query_arg( array(
215
-            'edit' => wp_create_nonce( $nonce_key )
216
-        ), $base );
217
-
218
-        if( $post_id ) {
219
-	        $url = add_query_arg( array( 'gvid' => $view_id ), $url );
220
-        }
221
-
222
-	    /**
223
-	     * Allow passing params to dynamically populate entry with values
224
-	     * @since 1.9.2
225
-	     */
226
-	    if( !empty( $field_values ) ) {
227
-
228
-		    if( is_array( $field_values ) ) {
229
-			    // If already an array, no parse_str() needed
230
-			    $params = $field_values;
231
-		    } else {
232
-			    parse_str( $field_values, $params );
233
-		    }
234
-
235
-		    $url = add_query_arg( $params, $url );
236
-	    }
169
+	/**
170
+	 * Include this extension templates path
171
+	 * @param array $file_paths List of template paths ordered
172
+	 */
173
+	public function add_template_path( $file_paths ) {
174
+
175
+		// Index 100 is the default GravityView template path.
176
+		$file_paths[ 110 ] = self::$file;
177
+
178
+		return $file_paths;
179
+	}
180
+
181
+	/**
182
+	 *
183
+	 * Return a well formatted nonce key according to GravityView Edit Entry protocol
184
+	 *
185
+	 * @param $view_id int GravityView view id
186
+	 * @param $form_id int Gravity Forms form id
187
+	 * @param $entry_id int Gravity Forms entry id
188
+	 * @return string
189
+	 */
190
+	public static function get_nonce_key( $view_id, $form_id, $entry_id ) {
191
+		return sprintf( 'edit_%d_%d_%d', $view_id, $form_id, $entry_id );
192
+	}
193
+
194
+
195
+	/**
196
+	 * The edit entry link creates a secure link with a nonce
197
+	 *
198
+	 * It also mimics the URL structure Gravity Forms expects to have so that
199
+	 * it formats the display of the edit form like it does in the backend, like
200
+	 * "You can edit this post from the post page" fields, for example.
201
+	 *
202
+	 * @param $entry array Gravity Forms entry object
203
+	 * @param $view_id int GravityView view id
204
+	 * @param $post_id int GravityView Post ID where View may be embedded {@since 1.9.2}
205
+	 * @param string|array $field_values Parameters to pass in to the Edit Entry form to prefill data. Uses the same format as Gravity Forms "Allow field to be populated dynamically" {@since 1.9.2} {@see https://www.gravityhelp.com/documentation/article/allow-field-to-be-populated-dynamically/ }
206
+	 * @return string
207
+	 */
208
+	public static function get_edit_link( $entry, $view_id, $post_id = null, $field_values = '' ) {
209
+
210
+		$nonce_key = self::get_nonce_key( $view_id, $entry['form_id'], $entry['id']  );
211
+
212
+		$base = gv_entry_link( $entry, $post_id ? : $view_id  );
213
+
214
+		$url = add_query_arg( array(
215
+			'edit' => wp_create_nonce( $nonce_key )
216
+		), $base );
217
+
218
+		if( $post_id ) {
219
+			$url = add_query_arg( array( 'gvid' => $view_id ), $url );
220
+		}
221
+
222
+		/**
223
+		 * Allow passing params to dynamically populate entry with values
224
+		 * @since 1.9.2
225
+		 */
226
+		if( !empty( $field_values ) ) {
227
+
228
+			if( is_array( $field_values ) ) {
229
+				// If already an array, no parse_str() needed
230
+				$params = $field_values;
231
+			} else {
232
+				parse_str( $field_values, $params );
233
+			}
234
+
235
+			$url = add_query_arg( $params, $url );
236
+		}
237 237
 
238 238
 		/**
239 239
 		 * @filter `gravityview/edit/link` Filter the edit URL link.
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 		 * @param \GV\View $view The View.
243 243
 		 */
244 244
 		return apply_filters( 'gravityview/edit/link', $url, $entry, \GV\View::by_id( $view_id  ) );
245
-    }
245
+	}
246 246
 
247 247
 	/**
248 248
 	 * @depecated 2.14 Use {@see GravityView_Edit_Entry::modify_field_blocklist()}
@@ -333,19 +333,19 @@  discard block
 block discarded – undo
333 333
 	}
334 334
 
335 335
 
336
-    /**
337
-     * checks if user has permissions to edit a specific entry
338
-     *
339
-     * Needs to be used combined with GravityView_Edit_Entry::user_can_edit_entry for maximum security!!
340
-     *
341
-     * @param  array $entry Gravity Forms entry array
342
-     * @param \GV\View|int $view ID of the view you want to check visibility against {@since 1.9.2}. Required since 2.0
343
-     * @return bool
344
-     */
345
-    public static function check_user_cap_edit_entry( $entry, $view = 0 ) {
336
+	/**
337
+	 * checks if user has permissions to edit a specific entry
338
+	 *
339
+	 * Needs to be used combined with GravityView_Edit_Entry::user_can_edit_entry for maximum security!!
340
+	 *
341
+	 * @param  array $entry Gravity Forms entry array
342
+	 * @param \GV\View|int $view ID of the view you want to check visibility against {@since 1.9.2}. Required since 2.0
343
+	 * @return bool
344
+	 */
345
+	public static function check_user_cap_edit_entry( $entry, $view = 0 ) {
346 346
 
347
-        // No permission by default
348
-        $user_can_edit = false;
347
+		// No permission by default
348
+		$user_can_edit = false;
349 349
 
350 350
 		// get user_edit setting
351 351
 		if ( empty( $view ) ) {
@@ -363,60 +363,60 @@  discard block
 block discarded – undo
363 363
 			$user_edit = GVCommon::get_template_setting( $view_id, 'user_edit' );
364 364
 		}
365 365
 
366
-        // If they can edit any entries (as defined in Gravity Forms)
367
-        // Or if they can edit other people's entries
368
-        // Then we're good.
369
-        if( GVCommon::has_cap( array( 'gravityforms_edit_entries', 'gravityview_edit_others_entries' ), $entry['id'] ) ) {
366
+		// If they can edit any entries (as defined in Gravity Forms)
367
+		// Or if they can edit other people's entries
368
+		// Then we're good.
369
+		if( GVCommon::has_cap( array( 'gravityforms_edit_entries', 'gravityview_edit_others_entries' ), $entry['id'] ) ) {
370 370
 
371
-            gravityview()->log->debug( 'User has ability to edit all entries.' );
371
+			gravityview()->log->debug( 'User has ability to edit all entries.' );
372 372
 
373
-            $user_can_edit = true;
373
+			$user_can_edit = true;
374 374
 
375
-        } else if( !isset( $entry['created_by'] ) ) {
375
+		} else if( !isset( $entry['created_by'] ) ) {
376 376
 
377
-            gravityview()->log->error( 'Entry `created_by` doesn\'t exist.');
377
+			gravityview()->log->error( 'Entry `created_by` doesn\'t exist.');
378 378
 
379
-            $user_can_edit = false;
379
+			$user_can_edit = false;
380 380
 
381
-        } else {
381
+		} else {
382 382
 
383
-            $current_user = wp_get_current_user();
383
+			$current_user = wp_get_current_user();
384 384
 
385
-            // User edit is disabled
386
-            if( empty( $user_edit ) ) {
385
+			// User edit is disabled
386
+			if( empty( $user_edit ) ) {
387 387
 
388
-                gravityview()->log->debug( 'User Edit is disabled. Returning false.' );
388
+				gravityview()->log->debug( 'User Edit is disabled. Returning false.' );
389 389
 
390
-                $user_can_edit = false;
391
-            }
390
+				$user_can_edit = false;
391
+			}
392 392
 
393
-            // User edit is enabled and the logged-in user is the same as the user who created the entry. We're good.
394
-            else if( is_user_logged_in() && intval( $current_user->ID ) === intval( $entry['created_by'] ) ) {
393
+			// User edit is enabled and the logged-in user is the same as the user who created the entry. We're good.
394
+			else if( is_user_logged_in() && intval( $current_user->ID ) === intval( $entry['created_by'] ) ) {
395 395
 
396
-                gravityview()->log->debug( 'User {user_id} created the entry.', array( 'user_id', $current_user->ID ) );
396
+				gravityview()->log->debug( 'User {user_id} created the entry.', array( 'user_id', $current_user->ID ) );
397 397
 
398
-                $user_can_edit = true;
398
+				$user_can_edit = true;
399 399
 
400
-            } else if( ! is_user_logged_in() ) {
400
+			} else if( ! is_user_logged_in() ) {
401 401
 
402
-                gravityview()->log->debug( 'No user defined; edit entry requires logged in user' );
402
+				gravityview()->log->debug( 'No user defined; edit entry requires logged in user' );
403 403
 
404
-	            $user_can_edit = false; // Here just for clarity
405
-            }
404
+				$user_can_edit = false; // Here just for clarity
405
+			}
406 406
 
407
-        }
407
+		}
408 408
 
409
-        /**
410
-         * @filter `gravityview/edit_entry/user_can_edit_entry` Modify whether user can edit an entry.
411
-         * @since 1.15 Added `$entry` and `$view_id` parameters
412
-         * @param[in,out] boolean $user_can_edit Can the current user edit the current entry? (Default: false)
413
-         * @param[in] array $entry Gravity Forms entry array {@since 1.15}
414
-         * @param[in] int $view_id ID of the view you want to check visibility against {@since 1.15}
415
-         */
416
-        $user_can_edit = apply_filters( 'gravityview/edit_entry/user_can_edit_entry', $user_can_edit, $entry, $view_id );
409
+		/**
410
+		 * @filter `gravityview/edit_entry/user_can_edit_entry` Modify whether user can edit an entry.
411
+		 * @since 1.15 Added `$entry` and `$view_id` parameters
412
+		 * @param[in,out] boolean $user_can_edit Can the current user edit the current entry? (Default: false)
413
+		 * @param[in] array $entry Gravity Forms entry array {@since 1.15}
414
+		 * @param[in] int $view_id ID of the view you want to check visibility against {@since 1.15}
415
+		 */
416
+		$user_can_edit = apply_filters( 'gravityview/edit_entry/user_can_edit_entry', $user_can_edit, $entry, $view_id );
417 417
 
418
-        return (bool) $user_can_edit;
419
-    }
418
+		return (bool) $user_can_edit;
419
+	}
420 420
 
421 421
 
422 422
 
Please login to merge, or discard this patch.
includes/extensions/edit-entry/class-edit-entry-render.php 1 patch
Indentation   +239 added lines, -239 removed lines patch added patch discarded remove patch
@@ -102,10 +102,10 @@  discard block
 block discarded – undo
102 102
 
103 103
 	/**
104 104
 	 * ID of the current post. May also be ID of the current View.
105
-     *
106
-     * @since 2.0.13
107 105
 	 *
108
-     * @var int
106
+	 * @since 2.0.13
107
+	 *
108
+	 * @var int
109 109
 	 */
110 110
 	public $post_id;
111 111
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 	 */
190 190
 	public function prevent_maybe_process_form() {
191 191
 
192
-	    if( ! $this->is_edit_entry_submission() ) {
192
+		if( ! $this->is_edit_entry_submission() ) {
193 193
 			return;
194 194
 		}
195 195
 
@@ -228,14 +228,14 @@  discard block
 block discarded – undo
228 228
 	 * When Edit entry view is requested setup the vars
229 229
 	 */
230 230
 	private function setup_vars() {
231
-        global $post;
231
+		global $post;
232 232
 
233 233
 		$gravityview_view = GravityView_View::getInstance();
234 234
 
235 235
 
236 236
 		$entries = $gravityview_view->getEntries();
237
-	    self::$original_entry = $entries[0];
238
-	    $this->entry = $entries[0];
237
+		self::$original_entry = $entries[0];
238
+		$this->entry = $entries[0];
239 239
 
240 240
 		self::$original_form = GFAPI::get_form( $this->entry['form_id'] );
241 241
 		$this->form = self::$original_form;
@@ -380,8 +380,8 @@  discard block
 block discarded – undo
380 380
 
381 381
 			GFFormsModel::save_lead( $form, $this->entry );
382 382
 
383
-	        // Delete the values for hidden inputs
384
-	        $this->unset_hidden_field_values();
383
+			// Delete the values for hidden inputs
384
+			$this->unset_hidden_field_values();
385 385
 
386 386
 			$this->entry['date_created'] = $date_created;
387 387
 
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 			// Perform actions normally performed after updating a lead
395 395
 			$this->after_update();
396 396
 
397
-	        /**
397
+			/**
398 398
 			 * Must be AFTER after_update()!
399 399
 			 * @see https://github.com/gravityview/GravityView/issues/764
400 400
 			 */
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
 
403 403
 			/**
404 404
 			 * @action `gravityview/edit_entry/after_update` Perform an action after the entry has been updated using Edit Entry
405
-             * @since 2.1 Added $gv_data parameter
405
+			 * @since 2.1 Added $gv_data parameter
406 406
 			 * @param array $form Gravity Forms form array
407 407
 			 * @param string $entry_id Numeric ID of the entry that was updated
408 408
 			 * @param GravityView_Edit_Entry_Render $this This object
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 	 * @return void
427 427
 	 */
428 428
 	private function unset_hidden_field_values() {
429
-	    global $wpdb;
429
+		global $wpdb;
430 430
 
431 431
 		/**
432 432
 		 * @filter `gravityview/edit_entry/unset_hidden_field_values` Whether to delete values of fields hidden by conditional logic
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
 			$current_fields = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $lead_detail_table WHERE lead_id=%d", $this->entry['id'] ) );
451 451
 		}
452 452
 
453
-	    foreach ( $this->entry as $input_id => $field_value ) {
453
+		foreach ( $this->entry as $input_id => $field_value ) {
454 454
 
455 455
 			if ( ! is_numeric( $input_id ) ) {
456 456
 				continue;
@@ -460,8 +460,8 @@  discard block
 block discarded – undo
460 460
 				continue;
461 461
 			}
462 462
 
463
-		    // Reset fields that are or would be hidden
464
-		    if ( GFFormsModel::is_field_hidden( $this->form, $field, array(), $this->entry ) ) {
463
+			// Reset fields that are or would be hidden
464
+			if ( GFFormsModel::is_field_hidden( $this->form, $field, array(), $this->entry ) ) {
465 465
 
466 466
 				$empty_value = $field->get_value_save_entry(
467 467
 					is_array( $field->get_entry_inputs() ) ? array() : '',
@@ -473,16 +473,16 @@  discard block
 block discarded – undo
473 473
 					$empty_value = '';
474 474
 				}
475 475
 
476
-			    $lead_detail_id = GFFormsModel::get_lead_detail_id( $current_fields, $input_id );
476
+				$lead_detail_id = GFFormsModel::get_lead_detail_id( $current_fields, $input_id );
477 477
 
478
-			    GFFormsModel::update_lead_field_value( $this->form, $this->entry, $field, $lead_detail_id, $input_id, $empty_value );
478
+				GFFormsModel::update_lead_field_value( $this->form, $this->entry, $field, $lead_detail_id, $input_id, $empty_value );
479 479
 
480
-			    // Prevent the $_POST values of hidden fields from being used as default values when rendering the form
480
+				// Prevent the $_POST values of hidden fields from being used as default values when rendering the form
481 481
 				// after submission
482
-			    $post_input_id = 'input_' . str_replace( '.', '_', $input_id );
483
-			    $_POST[ $post_input_id ] = '';
484
-		    }
485
-	    }
482
+				$post_input_id = 'input_' . str_replace( '.', '_', $input_id );
483
+				$_POST[ $post_input_id ] = '';
484
+			}
485
+		}
486 486
 	}
487 487
 
488 488
 	/**
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
 
638 638
 		$form = $this->filter_conditional_logic( $this->form );
639 639
 
640
-	    /** @type GF_Field $field */
640
+		/** @type GF_Field $field */
641 641
 		foreach( $form['fields'] as $k => &$field ) {
642 642
 
643 643
 			/**
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
 
653 653
 			if( isset( $field->inputs ) && is_array( $field->inputs ) ) {
654 654
 				foreach( $field->inputs as $key => $input ) {
655
-				    $field->inputs[ $key ][ 'id' ] = (string)$input['id'];
655
+					$field->inputs[ $key ][ 'id' ] = (string)$input['id'];
656 656
 				}
657 657
 			}
658 658
 		}
@@ -692,7 +692,7 @@  discard block
 block discarded – undo
692 692
 
693 693
 				$inputs = $field->get_entry_inputs();
694 694
 				if ( is_array( $inputs ) ) {
695
-				    foreach ( $inputs as $input ) {
695
+					foreach ( $inputs as $input ) {
696 696
 						list( $field_id, $input_id ) = rgexplode( '.', $input['id'], 2 );
697 697
 
698 698
 						if ( 'product' === $field->type ) {
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
 						}
712 712
 
713 713
 						GFFormsModel::save_input( $form, $field, $entry, $current_fields, $input['id'] );
714
-				    }
714
+					}
715 715
 				} else {
716 716
 					// Set to what it previously was if it's not editable
717 717
 					if ( ! in_array( $field->id, $allowed_fields ) ) {
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
 			$value = RGFormsModel::prepare_value( $form, $field, $value, $input_name, $entry['id'] );
758 758
 
759 759
 			$ary = ! empty( $value ) ? explode( '|:|', $value ) : array();
760
-	        $ary = stripslashes_deep( $ary );
760
+			$ary = stripslashes_deep( $ary );
761 761
 			$img_url = \GV\Utils::get( $ary, 0 );
762 762
 
763 763
 			$img_title       = count( $ary ) > 1 ? $ary[1] : '';
@@ -830,7 +830,7 @@  discard block
 block discarded – undo
830 830
 	private function maybe_update_post_fields( $form ) {
831 831
 
832 832
 		if( empty( $this->entry['post_id'] ) ) {
833
-	        gravityview()->log->debug( 'This entry has no post fields. Continuing...' );
833
+			gravityview()->log->debug( 'This entry has no post fields. Continuing...' );
834 834
 			return;
835 835
 		}
836 836
 
@@ -865,49 +865,49 @@  discard block
 block discarded – undo
865 865
 
866 866
 				switch( $field->type ) {
867 867
 
868
-				    case 'post_title':
869
-				        $post_title = $value;
870
-				        if ( \GV\Utils::get( $form, 'postTitleTemplateEnabled' ) ) {
871
-				            $post_title = $this->fill_post_template( $form['postTitleTemplate'], $form, $entry_tmp );
872
-				        }
873
-				        $updated_post->post_title = $post_title;
874
-				        $updated_post->post_name  = $post_title;
875
-				        unset( $post_title );
876
-				        break;
877
-
878
-				    case 'post_content':
879
-				        $post_content = $value;
880
-				        if ( \GV\Utils::get( $form, 'postContentTemplateEnabled' ) ) {
881
-				            $post_content = $this->fill_post_template( $form['postContentTemplate'], $form, $entry_tmp, true );
882
-				        }
883
-				        $updated_post->post_content = $post_content;
884
-				        unset( $post_content );
885
-				        break;
886
-				    case 'post_excerpt':
887
-				        $updated_post->post_excerpt = $value;
888
-				        break;
889
-				    case 'post_tags':
890
-				        wp_set_post_tags( $post_id, $value, false );
891
-				        break;
892
-				    case 'post_category':
893
-				        break;
894
-				    case 'post_custom_field':
868
+					case 'post_title':
869
+						$post_title = $value;
870
+						if ( \GV\Utils::get( $form, 'postTitleTemplateEnabled' ) ) {
871
+							$post_title = $this->fill_post_template( $form['postTitleTemplate'], $form, $entry_tmp );
872
+						}
873
+						$updated_post->post_title = $post_title;
874
+						$updated_post->post_name  = $post_title;
875
+						unset( $post_title );
876
+						break;
877
+
878
+					case 'post_content':
879
+						$post_content = $value;
880
+						if ( \GV\Utils::get( $form, 'postContentTemplateEnabled' ) ) {
881
+							$post_content = $this->fill_post_template( $form['postContentTemplate'], $form, $entry_tmp, true );
882
+						}
883
+						$updated_post->post_content = $post_content;
884
+						unset( $post_content );
885
+						break;
886
+					case 'post_excerpt':
887
+						$updated_post->post_excerpt = $value;
888
+						break;
889
+					case 'post_tags':
890
+						wp_set_post_tags( $post_id, $value, false );
891
+						break;
892
+					case 'post_category':
893
+						break;
894
+					case 'post_custom_field':
895 895
 						if ( is_array( $value ) && ( floatval( $field_id ) !== floatval( $field->id ) ) ) {
896 896
 							$value = $value[ $field_id ];
897 897
 						}
898 898
 
899
-				        if( ! empty( $field->customFieldTemplateEnabled ) ) {
900
-				            $value = $this->fill_post_template( $field->customFieldTemplate, $form, $entry_tmp, true );
901
-				        }
899
+						if( ! empty( $field->customFieldTemplateEnabled ) ) {
900
+							$value = $this->fill_post_template( $field->customFieldTemplate, $form, $entry_tmp, true );
901
+						}
902 902
 
903 903
 						$value = $field->get_value_save_entry( $value, $form, '', $this->entry['id'], $this->entry );
904 904
 
905
-				        update_post_meta( $post_id, $field->postCustomFieldName, $value );
906
-				        break;
905
+						update_post_meta( $post_id, $field->postCustomFieldName, $value );
906
+						break;
907 907
 
908
-				    case 'post_image':
909
-				        $value = $this->update_post_image( $form, $field, $field_id, $value, $this->entry, $post_id );
910
-				        break;
908
+					case 'post_image':
909
+						$value = $this->update_post_image( $form, $field, $field_id, $value, $this->entry, $post_id );
910
+						break;
911 911
 
912 912
 				}
913 913
 
@@ -1077,14 +1077,14 @@  discard block
 block discarded – undo
1077 1077
 			?><h2 class="gv-edit-entry-title">
1078 1078
 				<span><?php
1079 1079
 
1080
-				    /**
1081
-				     * @filter `gravityview_edit_entry_title` Modify the edit entry title
1082
-				     * @param string $edit_entry_title Modify the "Edit Entry" title
1083
-				     * @param GravityView_Edit_Entry_Render $this This object
1084
-				     */
1085
-				    $edit_entry_title = apply_filters('gravityview_edit_entry_title', __('Edit Entry', 'gravityview'), $this );
1080
+					/**
1081
+					 * @filter `gravityview_edit_entry_title` Modify the edit entry title
1082
+					 * @param string $edit_entry_title Modify the "Edit Entry" title
1083
+					 * @param GravityView_Edit_Entry_Render $this This object
1084
+					 */
1085
+					$edit_entry_title = apply_filters('gravityview_edit_entry_title', __('Edit Entry', 'gravityview'), $this );
1086 1086
 
1087
-				    echo esc_attr( $edit_entry_title );
1087
+					echo esc_attr( $edit_entry_title );
1088 1088
 			?></span>
1089 1089
 			</h2>
1090 1090
 
@@ -1150,13 +1150,13 @@  discard block
 block discarded – undo
1150 1150
 			);
1151 1151
 
1152 1152
 			/**
1153
-			* @filter `gravityview/edit_entry/button_labels` Modify the cancel/submit buttons' labels
1154
-			* @since 1.16.3
1155
-			* @param array $labels Default button labels associative array
1156
-			* @param array $form The Gravity Forms form
1157
-			* @param array $entry The Gravity Forms entry
1158
-			* @param int $view_id The current View ID
1159
-			*/
1153
+			 * @filter `gravityview/edit_entry/button_labels` Modify the cancel/submit buttons' labels
1154
+			 * @since 1.16.3
1155
+			 * @param array $labels Default button labels associative array
1156
+			 * @param array $form The Gravity Forms form
1157
+			 * @param array $entry The Gravity Forms entry
1158
+			 * @param int $view_id The current View ID
1159
+			 */
1160 1160
 			$labels = apply_filters( 'gravityview/edit_entry/button_labels', $labels, $this->form, $this->entry, $this->view_id );
1161 1161
 
1162 1162
 			$this->is_paged_submitted = \GV\Utils::_POST( 'save' ) === $labels['submit'];
@@ -1276,13 +1276,13 @@  discard block
 block discarded – undo
1276 1276
 				);
1277 1277
 
1278 1278
 				/**
1279
-				* @filter `gravityview/edit_entry/button_labels` Modify the cancel/submit buttons' labels
1280
-				* @since 1.16.3
1281
-				* @param array $labels Default button labels associative array
1282
-				* @param array $form The Gravity Forms form
1283
-				* @param array $entry The Gravity Forms entry
1284
-				* @param int $view_id The current View ID
1285
-				*/
1279
+				 * @filter `gravityview/edit_entry/button_labels` Modify the cancel/submit buttons' labels
1280
+				 * @since 1.16.3
1281
+				 * @param array $labels Default button labels associative array
1282
+				 * @param array $form The Gravity Forms form
1283
+				 * @param array $entry The Gravity Forms entry
1284
+				 * @param int $view_id The current View ID
1285
+				 */
1286 1286
 				$labels = apply_filters( 'gravityview/edit_entry/button_labels', $labels, $this->form, $this->entry, $this->view_id );
1287 1287
 
1288 1288
 				GFFormDisplay::$submission[ $this->form['id'] ][ 'form' ] = $this->form;
@@ -1328,7 +1328,7 @@  discard block
 block discarded – undo
1328 1328
 
1329 1329
 		ob_get_clean();
1330 1330
 
1331
-	    remove_filter( 'gform_pre_render', array( $this, 'filter_modify_form_fields' ), 5000 );
1331
+		remove_filter( 'gform_pre_render', array( $this, 'filter_modify_form_fields' ), 5000 );
1332 1332
 		remove_filter( 'gform_submit_button', array( $this, 'render_form_buttons' ) );
1333 1333
 		remove_filter( 'gform_next_button', array( $this, 'render_form_buttons' ) );
1334 1334
 		remove_filter( 'gform_previous_button', array( $this, 'render_form_buttons' ) );
@@ -1388,7 +1388,7 @@  discard block
 block discarded – undo
1388 1388
 
1389 1389
 		// for now we don't support Save and Continue feature.
1390 1390
 		if( ! self::$supports_save_and_continue ) {
1391
-	        unset( $form['save'] );
1391
+			unset( $form['save'] );
1392 1392
 		}
1393 1393
 
1394 1394
 		$form = $this->unselect_default_values( $form );
@@ -1415,30 +1415,30 @@  discard block
 block discarded – undo
1415 1415
 			return $field_content;
1416 1416
 		}
1417 1417
 
1418
-        $message = null;
1418
+		$message = null;
1419 1419
 
1420
-        // First, make sure they have the capability to edit the post.
1421
-        if( false === current_user_can( 'edit_post', $this->entry['post_id'] ) ) {
1420
+		// First, make sure they have the capability to edit the post.
1421
+		if( false === current_user_can( 'edit_post', $this->entry['post_id'] ) ) {
1422 1422
 
1423
-            /**
1424
-             * @filter `gravityview/edit_entry/unsupported_post_field_text` Modify the message when someone isn't able to edit a post
1425
-             * @param string $message The existing "You don't have permission..." text
1426
-             */
1427
-            $message = apply_filters('gravityview/edit_entry/unsupported_post_field_text', __('You don&rsquo;t have permission to edit this post.', 'gravityview') );
1423
+			/**
1424
+			 * @filter `gravityview/edit_entry/unsupported_post_field_text` Modify the message when someone isn't able to edit a post
1425
+			 * @param string $message The existing "You don't have permission..." text
1426
+			 */
1427
+			$message = apply_filters('gravityview/edit_entry/unsupported_post_field_text', __('You don&rsquo;t have permission to edit this post.', 'gravityview') );
1428 1428
 
1429
-        } elseif( null === get_post( $this->entry['post_id'] ) ) {
1430
-            /**
1431
-             * @filter `gravityview/edit_entry/no_post_text` Modify the message when someone is editing an entry attached to a post that no longer exists
1432
-             * @param string $message The existing "This field is not editable; the post no longer exists." text
1433
-             */
1434
-            $message = apply_filters('gravityview/edit_entry/no_post_text', __('This field is not editable; the post no longer exists.', 'gravityview' ) );
1435
-        }
1429
+		} elseif( null === get_post( $this->entry['post_id'] ) ) {
1430
+			/**
1431
+			 * @filter `gravityview/edit_entry/no_post_text` Modify the message when someone is editing an entry attached to a post that no longer exists
1432
+			 * @param string $message The existing "This field is not editable; the post no longer exists." text
1433
+			 */
1434
+			$message = apply_filters('gravityview/edit_entry/no_post_text', __('This field is not editable; the post no longer exists.', 'gravityview' ) );
1435
+		}
1436 1436
 
1437
-        if( $message ) {
1438
-            $field_content = sprintf('<div class="ginput_container ginput_container_' . $field->type . '">%s</div>', wpautop( $message ) );
1439
-        }
1437
+		if( $message ) {
1438
+			$field_content = sprintf('<div class="ginput_container ginput_container_' . $field->type . '">%s</div>', wpautop( $message ) );
1439
+		}
1440 1440
 
1441
-        return $field_content;
1441
+		return $field_content;
1442 1442
 	}
1443 1443
 
1444 1444
 	/**
@@ -1466,7 +1466,7 @@  discard block
 block discarded – undo
1466 1466
 			|| ! empty( $field_content )
1467 1467
 			|| in_array( $field->type, array( 'honeypot' ) )
1468 1468
 		) {
1469
-	        return $field_content;
1469
+			return $field_content;
1470 1470
 		}
1471 1471
 
1472 1472
 		// SET SOME FIELD DEFAULTS TO PREVENT ISSUES
@@ -1474,24 +1474,24 @@  discard block
 block discarded – undo
1474 1474
 
1475 1475
 		$field_value = $this->get_field_value( $field );
1476 1476
 
1477
-	    // Prevent any PHP warnings, like undefined index
1478
-	    ob_start();
1477
+		// Prevent any PHP warnings, like undefined index
1478
+		ob_start();
1479 1479
 
1480
-	    $return = null;
1480
+		$return = null;
1481 1481
 
1482 1482
 		/** @var GravityView_Field $gv_field */
1483 1483
 		if( $gv_field && is_callable( array( $gv_field, 'get_field_input' ) ) ) {
1484 1484
 			$return = $gv_field->get_field_input( $this->form, $field_value, $this->entry, $field );
1485 1485
 		} else {
1486
-	        $return = $field->get_field_input( $this->form, $field_value, $this->entry );
1487
-	    }
1486
+			$return = $field->get_field_input( $this->form, $field_value, $this->entry );
1487
+		}
1488 1488
 
1489
-	    // If there was output, it's an error
1490
-	    $warnings = ob_get_clean();
1489
+		// If there was output, it's an error
1490
+		$warnings = ob_get_clean();
1491 1491
 
1492
-	    if( !empty( $warnings ) ) {
1493
-		    gravityview()->log->error( '{warning}', array( 'warning' => $warnings, 'data' => $field_value ) );
1494
-	    }
1492
+		if( !empty( $warnings ) ) {
1493
+			gravityview()->log->error( '{warning}', array( 'warning' => $warnings, 'data' => $field_value ) );
1494
+		}
1495 1495
 
1496 1496
 		return $return;
1497 1497
 	}
@@ -1526,8 +1526,8 @@  discard block
 block discarded – undo
1526 1526
 				$input_id = strval( $input['id'] );
1527 1527
 
1528 1528
 				if ( isset( $this->entry[ $input_id ] ) && ! gv_empty( $this->entry[ $input_id ], false, false ) ) {
1529
-				    $field_value[ $input_id ] =  'post_category' === $field->type ? GFCommon::format_post_category( $this->entry[ $input_id ], true ) : $this->entry[ $input_id ];
1530
-				    $allow_pre_populated = false;
1529
+					$field_value[ $input_id ] =  'post_category' === $field->type ? GFCommon::format_post_category( $this->entry[ $input_id ], true ) : $this->entry[ $input_id ];
1530
+					$allow_pre_populated = false;
1531 1531
 				}
1532 1532
 
1533 1533
 			}
@@ -1551,7 +1551,7 @@  discard block
 block discarded – undo
1551 1551
 			if ( 'post_category' === $field->type && !gv_empty( $field_value, false, false ) ) {
1552 1552
 				$categories = array();
1553 1553
 				foreach ( explode( ',', $field_value ) as $cat_string ) {
1554
-				    $categories[] = GFCommon::format_post_category( $cat_string, true );
1554
+					$categories[] = GFCommon::format_post_category( $cat_string, true );
1555 1555
 				}
1556 1556
 				$field_value = 'multiselect' === $field->get_input_type() ? $categories : implode( '', $categories );
1557 1557
 			}
@@ -1561,25 +1561,25 @@  discard block
 block discarded – undo
1561 1561
 		// if value is empty get the default value if defined
1562 1562
 		$field_value = $field->get_value_default_if_empty( $field_value );
1563 1563
 
1564
-	    /**
1565
-	     * @filter `gravityview/edit_entry/field_value` Change the value of an Edit Entry field, if needed
1566
-	     * @since 1.11
1567
-	     * @since 1.20 Added third param
1568
-	     * @param mixed $field_value field value used to populate the input
1569
-	     * @param object $field Gravity Forms field object ( Class GF_Field )
1570
-	     * @param GravityView_Edit_Entry_Render $this Current object
1571
-	     */
1572
-	    $field_value = apply_filters( 'gravityview/edit_entry/field_value', $field_value, $field, $this );
1573
-
1574
-	    /**
1575
-	     * @filter `gravityview/edit_entry/field_value_{field_type}` Change the value of an Edit Entry field for a specific field type
1576
-	     * @since 1.17
1577
-	     * @since 1.20 Added third param
1578
-	     * @param mixed $field_value field value used to populate the input
1579
-	     * @param GF_Field $field Gravity Forms field object
1580
-	     * @param GravityView_Edit_Entry_Render $this Current object
1581
-	     */
1582
-	    $field_value = apply_filters( 'gravityview/edit_entry/field_value_' . $field->type , $field_value, $field, $this );
1564
+		/**
1565
+		 * @filter `gravityview/edit_entry/field_value` Change the value of an Edit Entry field, if needed
1566
+		 * @since 1.11
1567
+		 * @since 1.20 Added third param
1568
+		 * @param mixed $field_value field value used to populate the input
1569
+		 * @param object $field Gravity Forms field object ( Class GF_Field )
1570
+		 * @param GravityView_Edit_Entry_Render $this Current object
1571
+		 */
1572
+		$field_value = apply_filters( 'gravityview/edit_entry/field_value', $field_value, $field, $this );
1573
+
1574
+		/**
1575
+		 * @filter `gravityview/edit_entry/field_value_{field_type}` Change the value of an Edit Entry field for a specific field type
1576
+		 * @since 1.17
1577
+		 * @since 1.20 Added third param
1578
+		 * @param mixed $field_value field value used to populate the input
1579
+		 * @param GF_Field $field Gravity Forms field object
1580
+		 * @param GravityView_Edit_Entry_Render $this Current object
1581
+		 */
1582
+		$field_value = apply_filters( 'gravityview/edit_entry/field_value_' . $field->type , $field_value, $field, $this );
1583 1583
 
1584 1584
 		return $field_value;
1585 1585
 	}
@@ -1606,7 +1606,7 @@  discard block
 block discarded – undo
1606 1606
 			// This is because we're doing admin form pretending to be front-end, so Gravity Forms
1607 1607
 			// expects certain field array items to be set.
1608 1608
 			foreach ( array( 'noDuplicates', 'adminOnly', 'inputType', 'isRequired', 'enablePrice', 'inputs', 'allowedExtensions' ) as $key ) {
1609
-	            $field->{$key} = isset( $field->{$key} ) ? $field->{$key} : NULL;
1609
+				$field->{$key} = isset( $field->{$key} ) ? $field->{$key} : NULL;
1610 1610
 			}
1611 1611
 
1612 1612
 			switch( RGFormsModel::get_input_type( $field ) ) {
@@ -1620,31 +1620,31 @@  discard block
 block discarded – undo
1620 1620
 				 */
1621 1621
 				case 'fileupload':
1622 1622
 
1623
-				    // Set the previous value
1624
-				    $entry = $this->get_entry();
1623
+					// Set the previous value
1624
+					$entry = $this->get_entry();
1625 1625
 
1626
-				    $input_name = 'input_'.$field->id;
1627
-				    $form_id = $form['id'];
1626
+					$input_name = 'input_'.$field->id;
1627
+					$form_id = $form['id'];
1628 1628
 
1629
-				    $value = NULL;
1629
+					$value = NULL;
1630 1630
 
1631
-				    // Use the previous entry value as the default.
1632
-				    if( isset( $entry[ $field->id ] ) ) {
1633
-				        $value = $entry[ $field->id ];
1634
-				    }
1631
+					// Use the previous entry value as the default.
1632
+					if( isset( $entry[ $field->id ] ) ) {
1633
+						$value = $entry[ $field->id ];
1634
+					}
1635 1635
 
1636
-				    // If this is a single upload file
1637
-				    if( !empty( $_FILES[ $input_name ] ) && !empty( $_FILES[ $input_name ]['name'] ) ) {
1638
-				        $file_path = GFFormsModel::get_file_upload_path( $form['id'], $_FILES[ $input_name ]['name'] );
1639
-				        $value = $file_path['url'];
1636
+					// If this is a single upload file
1637
+					if( !empty( $_FILES[ $input_name ] ) && !empty( $_FILES[ $input_name ]['name'] ) ) {
1638
+						$file_path = GFFormsModel::get_file_upload_path( $form['id'], $_FILES[ $input_name ]['name'] );
1639
+						$value = $file_path['url'];
1640 1640
 
1641
-				    } else {
1641
+					} else {
1642 1642
 
1643
-				        // Fix PHP warning on line 1498 of form_display.php for post_image fields
1644
-				        // Fix PHP Notice:  Undefined index:  size in form_display.php on line 1511
1645
-				        $_FILES[ $input_name ] = array('name' => '', 'size' => '' );
1643
+						// Fix PHP warning on line 1498 of form_display.php for post_image fields
1644
+						// Fix PHP Notice:  Undefined index:  size in form_display.php on line 1511
1645
+						$_FILES[ $input_name ] = array('name' => '', 'size' => '' );
1646 1646
 
1647
-				    }
1647
+					}
1648 1648
 
1649 1649
 					if ( \GV\Utils::get( $field, 'multipleFiles' ) ) {
1650 1650
 						// If there are fresh uploads, process and merge them.
@@ -1665,17 +1665,17 @@  discard block
 block discarded – undo
1665 1665
 						GFFormsModel::$uploaded_files[ $form_id ][ $input_name ] = $value;
1666 1666
 					}
1667 1667
 
1668
-				    $this->entry[ $input_name ] = $value;
1669
-				    $_POST[ $input_name ] = $value;
1668
+					$this->entry[ $input_name ] = $value;
1669
+					$_POST[ $input_name ] = $value;
1670 1670
 
1671
-				    break;
1671
+					break;
1672 1672
 
1673 1673
 				case 'number':
1674
-				    // Fix "undefined index" issue at line 1286 in form_display.php
1675
-				    if( !isset( $_POST['input_'.$field->id ] ) ) {
1676
-				        $_POST['input_'.$field->id ] = NULL;
1677
-				    }
1678
-				    break;
1674
+					// Fix "undefined index" issue at line 1286 in form_display.php
1675
+					if( !isset( $_POST['input_'.$field->id ] ) ) {
1676
+						$_POST['input_'.$field->id ] = NULL;
1677
+					}
1678
+					break;
1679 1679
 			}
1680 1680
 
1681 1681
 		}
@@ -1796,7 +1796,7 @@  discard block
 block discarded – undo
1796 1796
 
1797 1797
 						// count uploaded files and existent entry files
1798 1798
 						$count_files = ( is_array( $file_names ) ? count( $file_names ) : 0 ) +
1799
-						               ( is_array( $value ) ? count( $value ) : 0 );
1799
+									   ( is_array( $value ) ? count( $value ) : 0 );
1800 1800
 
1801 1801
 						if ( $count_files > $field->maxFiles ) {
1802 1802
 							$field->validation_message = __( 'Maximum number of files reached', 'gravityview' );
@@ -1818,47 +1818,47 @@  discard block
 block discarded – undo
1818 1818
 
1819 1819
 				switch ( $field_type ) {
1820 1820
 
1821
-				    // Captchas don't need to be re-entered.
1822
-				    case 'captcha':
1821
+					// Captchas don't need to be re-entered.
1822
+					case 'captcha':
1823 1823
 
1824
-				        // Post Image fields aren't editable, so we un-fail them.
1825
-				    case 'post_image':
1826
-				        $field->failed_validation = false;
1827
-				        unset( $field->validation_message );
1828
-				        break;
1824
+						// Post Image fields aren't editable, so we un-fail them.
1825
+					case 'post_image':
1826
+						$field->failed_validation = false;
1827
+						unset( $field->validation_message );
1828
+						break;
1829 1829
 
1830 1830
 				}
1831 1831
 
1832 1832
 				// You can't continue inside a switch, so we do it after.
1833 1833
 				if( empty( $field->failed_validation ) ) {
1834
-				    continue;
1834
+					continue;
1835 1835
 				}
1836 1836
 
1837 1837
 				// checks if the No Duplicates option is not validating entry against itself, since
1838 1838
 				// we're editing a stored entry, it would also assume it's a duplicate.
1839 1839
 				if( !empty( $field->noDuplicates ) ) {
1840 1840
 
1841
-				    $entry = $this->get_entry();
1841
+					$entry = $this->get_entry();
1842 1842
 
1843
-				    // If the value of the entry is the same as the stored value
1844
-				    // Then we can assume it's not a duplicate, it's the same.
1845
-				    if( !empty( $entry ) && $value == $entry[ $field->id ] ) {
1846
-				        //if value submitted was not changed, then don't validate
1847
-				        $field->failed_validation = false;
1843
+					// If the value of the entry is the same as the stored value
1844
+					// Then we can assume it's not a duplicate, it's the same.
1845
+					if( !empty( $entry ) && $value == $entry[ $field->id ] ) {
1846
+						//if value submitted was not changed, then don't validate
1847
+						$field->failed_validation = false;
1848 1848
 
1849
-				        unset( $field->validation_message );
1849
+						unset( $field->validation_message );
1850 1850
 
1851
-				        gravityview()->log->debug( 'GravityView_Edit_Entry[custom_validation] Field not a duplicate; it is the same entry.', array( 'data' => $entry ) );
1851
+						gravityview()->log->debug( 'GravityView_Edit_Entry[custom_validation] Field not a duplicate; it is the same entry.', array( 'data' => $entry ) );
1852 1852
 
1853
-				        continue;
1854
-				    }
1853
+						continue;
1854
+					}
1855 1855
 				}
1856 1856
 
1857 1857
 				// if here then probably we are facing the validation 'At least one field must be filled out'
1858 1858
 				if( GFFormDisplay::is_empty( $field, $this->form_id  ) && empty( $field->isRequired ) ) {
1859
-				    unset( $field->validation_message );
1859
+					unset( $field->validation_message );
1860 1860
 					$field->failed_validation = false;
1861
-				    continue;
1861
+					continue;
1862 1862
 				}
1863 1863
 
1864 1864
 				$gv_valid = false;
@@ -1922,8 +1922,8 @@  discard block
 block discarded – undo
1922 1922
 		// Hide fields depending on admin settings
1923 1923
 		$fields = $this->filter_fields( $form['fields'], $edit_fields );
1924 1924
 
1925
-	    // If Edit Entry fields are configured, remove adminOnly field settings. Otherwise, don't.
1926
-	    $fields = $this->filter_admin_only_fields( $fields, $edit_fields, $form, $view_id );
1925
+		// If Edit Entry fields are configured, remove adminOnly field settings. Otherwise, don't.
1926
+		$fields = $this->filter_admin_only_fields( $fields, $edit_fields, $form, $view_id );
1927 1927
 
1928 1928
 		/**
1929 1929
 		 * @filter `gravityview/edit_entry/form_fields` Modify the fields displayed in Edit Entry form
@@ -2014,11 +2014,11 @@  discard block
 block discarded – undo
2014 2014
 		// The edit tab has been configured, so we loop through to configured settings
2015 2015
 		foreach ( $configured_fields as $configured_field ) {
2016 2016
 
2017
-	        /** @var GF_Field $field */
2018
-	        foreach ( $fields as $field ) {
2017
+			/** @var GF_Field $field */
2018
+			foreach ( $fields as $field ) {
2019 2019
 				if( intval( $configured_field['id'] ) === intval( $field->id ) && $this->user_can_edit_field( $configured_field, false ) ) {
2020
-				    $edit_fields[] = $this->merge_field_properties( $field, $configured_field );
2021
-				    break;
2020
+					$edit_fields[] = $this->merge_field_properties( $field, $configured_field );
2021
+					break;
2022 2022
 				}
2023 2023
 
2024 2024
 			}
@@ -2074,28 +2074,28 @@  discard block
 block discarded – undo
2074 2074
 	 */
2075 2075
 	private function filter_admin_only_fields( $fields = array(), $edit_fields = null, $form = array(), $view_id = 0 ) {
2076 2076
 
2077
-	    /**
2077
+		/**
2078 2078
 		 * @filter `gravityview/edit_entry/use_gf_admin_only_setting` When Edit tab isn't configured, should the Gravity Forms "Admin Only" field settings be used to control field display to non-admins? Default: true
2079
-	     * If the Edit Entry tab is not configured, adminOnly fields will not be shown to non-administrators.
2080
-	     * If the Edit Entry tab *is* configured, adminOnly fields will be shown to non-administrators, using the configured GV permissions
2081
-	     * @since 1.9.1
2082
-	     * @param boolean $use_gf_adminonly_setting True: Hide field if set to Admin Only in GF and the user is not an admin. False: show field based on GV permissions, ignoring GF permissions.
2083
-	     * @param array $form GF Form array
2084
-	     * @param int $view_id View ID
2085
-	     */
2086
-	    $use_gf_adminonly_setting = apply_filters( 'gravityview/edit_entry/use_gf_admin_only_setting', empty( $edit_fields ), $form, $view_id );
2087
-
2088
-	    if( $use_gf_adminonly_setting && false === GVCommon::has_cap( 'gravityforms_edit_entries', $this->entry['id'] ) ) {
2079
+		 * If the Edit Entry tab is not configured, adminOnly fields will not be shown to non-administrators.
2080
+		 * If the Edit Entry tab *is* configured, adminOnly fields will be shown to non-administrators, using the configured GV permissions
2081
+		 * @since 1.9.1
2082
+		 * @param boolean $use_gf_adminonly_setting True: Hide field if set to Admin Only in GF and the user is not an admin. False: show field based on GV permissions, ignoring GF permissions.
2083
+		 * @param array $form GF Form array
2084
+		 * @param int $view_id View ID
2085
+		 */
2086
+		$use_gf_adminonly_setting = apply_filters( 'gravityview/edit_entry/use_gf_admin_only_setting', empty( $edit_fields ), $form, $view_id );
2087
+
2088
+		if( $use_gf_adminonly_setting && false === GVCommon::has_cap( 'gravityforms_edit_entries', $this->entry['id'] ) ) {
2089 2089
 			foreach( $fields as $k => $field ) {
2090 2090
 				if( $field->adminOnly ) {
2091
-				    unset( $fields[ $k ] );
2091
+					unset( $fields[ $k ] );
2092 2092
 				}
2093 2093
 			}
2094 2094
 			return array_values( $fields );
2095 2095
 		}
2096 2096
 
2097
-	    foreach( $fields as &$field ) {
2098
-		    $field->adminOnly = false;
2097
+		foreach( $fields as &$field ) {
2098
+			$field->adminOnly = false;
2099 2099
 		}
2100 2100
 
2101 2101
 		return $fields;
@@ -2115,13 +2115,13 @@  discard block
 block discarded – undo
2115 2115
 	 */
2116 2116
 	private function unselect_default_values( $form ) {
2117 2117
 
2118
-	    foreach ( $form['fields'] as &$field ) {
2118
+		foreach ( $form['fields'] as &$field ) {
2119 2119
 
2120 2120
 			if ( empty( $field->choices ) ) {
2121
-                continue;
2121
+				continue;
2122 2122
 			}
2123 2123
 
2124
-            foreach ( $field->choices as &$choice ) {
2124
+			foreach ( $field->choices as &$choice ) {
2125 2125
 				if ( \GV\Utils::get( $choice, 'isSelected' ) ) {
2126 2126
 					$choice['isSelected'] = false;
2127 2127
 				}
@@ -2158,36 +2158,36 @@  discard block
 block discarded – undo
2158 2158
 
2159 2159
 			if( 'checkbox' === $field->type ) {
2160 2160
 				foreach ( $field->get_entry_inputs() as $key => $input ) {
2161
-				    $input_id = $input['id'];
2162
-				    $choice = $field->choices[ $key ];
2163
-				    $value = \GV\Utils::get( $this->entry, $input_id );
2164
-				    $match = RGFormsModel::choice_value_match( $field, $choice, $value );
2165
-				    if( $match ) {
2166
-				        $field->choices[ $key ]['isSelected'] = true;
2167
-				    }
2161
+					$input_id = $input['id'];
2162
+					$choice = $field->choices[ $key ];
2163
+					$value = \GV\Utils::get( $this->entry, $input_id );
2164
+					$match = RGFormsModel::choice_value_match( $field, $choice, $value );
2165
+					if( $match ) {
2166
+						$field->choices[ $key ]['isSelected'] = true;
2167
+					}
2168 2168
 				}
2169 2169
 			} else {
2170 2170
 
2171 2171
 				// We need to run through each field to set the default values
2172 2172
 				foreach ( $this->entry as $field_id => $field_value ) {
2173 2173
 
2174
-				    if( floatval( $field_id ) === floatval( $field->id ) ) {
2174
+					if( floatval( $field_id ) === floatval( $field->id ) ) {
2175 2175
 
2176
-				        if( 'list' === $field->type ) {
2177
-				            $list_rows = maybe_unserialize( $field_value );
2176
+						if( 'list' === $field->type ) {
2177
+							$list_rows = maybe_unserialize( $field_value );
2178 2178
 
2179
-				            $list_field_value = array();
2180
-				            foreach ( (array) $list_rows as $row ) {
2181
-				                foreach ( (array) $row as $column ) {
2182
-				                    $list_field_value[] = $column;
2183
-				                }
2184
-				            }
2179
+							$list_field_value = array();
2180
+							foreach ( (array) $list_rows as $row ) {
2181
+								foreach ( (array) $row as $column ) {
2182
+									$list_field_value[] = $column;
2183
+								}
2184
+							}
2185 2185
 
2186
-				            $field->defaultValue = serialize( $list_field_value );
2187
-				        } else {
2188
-				            $field->defaultValue = $field_value;
2189
-				        }
2190
-				    }
2186
+							$field->defaultValue = serialize( $list_field_value );
2187
+						} else {
2188
+							$field->defaultValue = $field_value;
2189
+						}
2190
+					}
2191 2191
 				}
2192 2192
 			}
2193 2193
 		}
@@ -2248,7 +2248,7 @@  discard block
 block discarded – undo
2248 2248
 			foreach ( $form['fields'] as &$field ) {
2249 2249
 				foreach ( $remove_conditions_rule as $_remove_conditions_r ) {
2250 2250
 
2251
-				    list( $rule_field_id, $rule_i ) = $_remove_conditions_r;
2251
+					list( $rule_field_id, $rule_i ) = $_remove_conditions_r;
2252 2252
 
2253 2253
 					if ( $field['id'] == $rule_field_id ) {
2254 2254
 						unset( $field->conditionalLogic['rules'][ $rule_i ] );
@@ -2299,7 +2299,7 @@  discard block
 block discarded – undo
2299 2299
 			return $has_conditional_logic;
2300 2300
 		}
2301 2301
 
2302
-	    /** @see GravityView_Edit_Entry_Render::filter_conditional_logic for filter documentation */
2302
+		/** @see GravityView_Edit_Entry_Render::filter_conditional_logic for filter documentation */
2303 2303
 		return apply_filters( 'gravityview/edit_entry/conditional_logic', $has_conditional_logic, $form );
2304 2304
 	}
2305 2305
 
@@ -2366,14 +2366,14 @@  discard block
 block discarded – undo
2366 2366
 
2367 2367
 		if( $echo && $error !== true ) {
2368 2368
 
2369
-	        $error = esc_html( $error );
2369
+			$error = esc_html( $error );
2370 2370
 
2371
-	        /**
2372
-	         * @since 1.9
2373
-	         */
2374
-	        if ( ! empty( $this->entry ) ) {
2375
-		        $error .= ' ' . gravityview_get_link( '#', _x('Go back.', 'Link shown when invalid Edit Entry link is clicked', 'gravityview' ), array( 'onclick' => "window.history.go(-1); return false;" ) );
2376
-	        }
2371
+			/**
2372
+			 * @since 1.9
2373
+			 */
2374
+			if ( ! empty( $this->entry ) ) {
2375
+				$error .= ' ' . gravityview_get_link( '#', _x('Go back.', 'Link shown when invalid Edit Entry link is clicked', 'gravityview' ), array( 'onclick' => "window.history.go(-1); return false;" ) );
2376
+			}
2377 2377
 
2378 2378
 			echo GVCommon::generate_notice( wpautop( $error ), 'gv-error error');
2379 2379
 		}
Please login to merge, or discard this patch.
vendor/composer/autoload_classmap.php 1 patch
Indentation   +128 added lines, -128 removed lines patch added patch discarded remove patch
@@ -6,132 +6,132 @@
 block discarded – undo
6 6
 $baseDir = dirname($vendorDir);
7 7
 
8 8
 return array(
9
-    'ComposerAutoloaderInitb5638313a52df4893eb45c04efdaa356' => $vendorDir . '/trustedlogin/client/vendor/composer/autoload_real.php',
10
-    'Composer\\Autoload\\ClassLoader' => $vendorDir . '/trustedlogin/client/vendor/composer/ClassLoader.php',
11
-    'Composer\\Autoload\\ComposerStaticInitb5638313a52df4893eb45c04efdaa356' => $vendorDir . '/trustedlogin/client/vendor/composer/autoload_static.php',
12
-    'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
13
-    'Error' => $vendorDir . '/paragonie/random_compat/lib/error_polyfill.php',
14
-    'Katzgrau\\KLogger\\Logger' => $vendorDir . '/katzgrau/klogger/src/Logger.php',
15
-    'Katzgrau\\KLogger\\TrustedLogin_Logger' => $vendorDir . '/trustedlogin/client/vendor/TrustedLogin/katzgrau/klogger/src/Logger.php',
16
-    'LoggerTest' => $vendorDir . '/katzgrau/klogger/tests/LoggerTest.php',
17
-    'ParagonIE\\Sodium\\Compat' => $vendorDir . '/paragonie/sodium_compat/namespaced/Compat.php',
18
-    'ParagonIE\\Sodium\\Core\\BLAKE2b' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/BLAKE2b.php',
19
-    'ParagonIE\\Sodium\\Core\\ChaCha20' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/ChaCha20.php',
20
-    'ParagonIE\\Sodium\\Core\\ChaCha20\\Ctx' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/ChaCha20/Ctx.php',
21
-    'ParagonIE\\Sodium\\Core\\ChaCha20\\IetfCtx' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/ChaCha20/IetfCtx.php',
22
-    'ParagonIE\\Sodium\\Core\\Curve25519' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Curve25519.php',
23
-    'ParagonIE\\Sodium\\Core\\Curve25519\\Fe' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Fe.php',
24
-    'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\Cached' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/Cached.php',
25
-    'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\P1p1' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P1p1.php',
26
-    'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\P2' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P2.php',
27
-    'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\P3' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P3.php',
28
-    'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\Precomp' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/Precomp.php',
29
-    'ParagonIE\\Sodium\\Core\\Curve25519\\H' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Curve25519/H.php',
30
-    'ParagonIE\\Sodium\\Core\\Ed25519' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Ed25519.php',
31
-    'ParagonIE\\Sodium\\Core\\HChaCha20' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/HChaCha20.php',
32
-    'ParagonIE\\Sodium\\Core\\HSalsa20' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/HSalsa20.php',
33
-    'ParagonIE\\Sodium\\Core\\Poly1305' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Poly1305.php',
34
-    'ParagonIE\\Sodium\\Core\\Poly1305\\State' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Poly1305/State.php',
35
-    'ParagonIE\\Sodium\\Core\\Salsa20' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Salsa20.php',
36
-    'ParagonIE\\Sodium\\Core\\SipHash' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/SipHash.php',
37
-    'ParagonIE\\Sodium\\Core\\Util' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Util.php',
38
-    'ParagonIE\\Sodium\\Core\\X25519' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/X25519.php',
39
-    'ParagonIE\\Sodium\\Core\\XChaCha20' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/XChaCha20.php',
40
-    'ParagonIE\\Sodium\\Core\\Xsalsa20' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Xsalsa20.php',
41
-    'ParagonIE\\Sodium\\Crypto' => $vendorDir . '/paragonie/sodium_compat/namespaced/Crypto.php',
42
-    'ParagonIE\\Sodium\\File' => $vendorDir . '/paragonie/sodium_compat/namespaced/File.php',
43
-    'ParagonIE_Sodium_Compat' => $vendorDir . '/paragonie/sodium_compat/src/Compat.php',
44
-    'ParagonIE_Sodium_Core32_BLAKE2b' => $vendorDir . '/paragonie/sodium_compat/src/Core32/BLAKE2b.php',
45
-    'ParagonIE_Sodium_Core32_ChaCha20' => $vendorDir . '/paragonie/sodium_compat/src/Core32/ChaCha20.php',
46
-    'ParagonIE_Sodium_Core32_ChaCha20_Ctx' => $vendorDir . '/paragonie/sodium_compat/src/Core32/ChaCha20/Ctx.php',
47
-    'ParagonIE_Sodium_Core32_ChaCha20_IetfCtx' => $vendorDir . '/paragonie/sodium_compat/src/Core32/ChaCha20/IetfCtx.php',
48
-    'ParagonIE_Sodium_Core32_Curve25519' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Curve25519.php',
49
-    'ParagonIE_Sodium_Core32_Curve25519_Fe' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Curve25519/Fe.php',
50
-    'ParagonIE_Sodium_Core32_Curve25519_Ge_Cached' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/Cached.php',
51
-    'ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P1p1.php',
52
-    'ParagonIE_Sodium_Core32_Curve25519_Ge_P2' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P2.php',
53
-    'ParagonIE_Sodium_Core32_Curve25519_Ge_P3' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P3.php',
54
-    'ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/Precomp.php',
55
-    'ParagonIE_Sodium_Core32_Curve25519_H' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Curve25519/H.php',
56
-    'ParagonIE_Sodium_Core32_Ed25519' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Ed25519.php',
57
-    'ParagonIE_Sodium_Core32_HChaCha20' => $vendorDir . '/paragonie/sodium_compat/src/Core32/HChaCha20.php',
58
-    'ParagonIE_Sodium_Core32_HSalsa20' => $vendorDir . '/paragonie/sodium_compat/src/Core32/HSalsa20.php',
59
-    'ParagonIE_Sodium_Core32_Int32' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Int32.php',
60
-    'ParagonIE_Sodium_Core32_Int64' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Int64.php',
61
-    'ParagonIE_Sodium_Core32_Poly1305' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Poly1305.php',
62
-    'ParagonIE_Sodium_Core32_Poly1305_State' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Poly1305/State.php',
63
-    'ParagonIE_Sodium_Core32_Salsa20' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Salsa20.php',
64
-    'ParagonIE_Sodium_Core32_SecretStream_State' => $vendorDir . '/paragonie/sodium_compat/src/Core32/SecretStream/State.php',
65
-    'ParagonIE_Sodium_Core32_SipHash' => $vendorDir . '/paragonie/sodium_compat/src/Core32/SipHash.php',
66
-    'ParagonIE_Sodium_Core32_Util' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Util.php',
67
-    'ParagonIE_Sodium_Core32_X25519' => $vendorDir . '/paragonie/sodium_compat/src/Core32/X25519.php',
68
-    'ParagonIE_Sodium_Core32_XChaCha20' => $vendorDir . '/paragonie/sodium_compat/src/Core32/XChaCha20.php',
69
-    'ParagonIE_Sodium_Core32_XSalsa20' => $vendorDir . '/paragonie/sodium_compat/src/Core32/XSalsa20.php',
70
-    'ParagonIE_Sodium_Core_BLAKE2b' => $vendorDir . '/paragonie/sodium_compat/src/Core/BLAKE2b.php',
71
-    'ParagonIE_Sodium_Core_Base64_Common' => $vendorDir . '/paragonie/sodium_compat/src/Core/Base64/Common.php',
72
-    'ParagonIE_Sodium_Core_Base64_Original' => $vendorDir . '/paragonie/sodium_compat/src/Core/Base64/Original.php',
73
-    'ParagonIE_Sodium_Core_Base64_UrlSafe' => $vendorDir . '/paragonie/sodium_compat/src/Core/Base64/UrlSafe.php',
74
-    'ParagonIE_Sodium_Core_ChaCha20' => $vendorDir . '/paragonie/sodium_compat/src/Core/ChaCha20.php',
75
-    'ParagonIE_Sodium_Core_ChaCha20_Ctx' => $vendorDir . '/paragonie/sodium_compat/src/Core/ChaCha20/Ctx.php',
76
-    'ParagonIE_Sodium_Core_ChaCha20_IetfCtx' => $vendorDir . '/paragonie/sodium_compat/src/Core/ChaCha20/IetfCtx.php',
77
-    'ParagonIE_Sodium_Core_Curve25519' => $vendorDir . '/paragonie/sodium_compat/src/Core/Curve25519.php',
78
-    'ParagonIE_Sodium_Core_Curve25519_Fe' => $vendorDir . '/paragonie/sodium_compat/src/Core/Curve25519/Fe.php',
79
-    'ParagonIE_Sodium_Core_Curve25519_Ge_Cached' => $vendorDir . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/Cached.php',
80
-    'ParagonIE_Sodium_Core_Curve25519_Ge_P1p1' => $vendorDir . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/P1p1.php',
81
-    'ParagonIE_Sodium_Core_Curve25519_Ge_P2' => $vendorDir . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/P2.php',
82
-    'ParagonIE_Sodium_Core_Curve25519_Ge_P3' => $vendorDir . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/P3.php',
83
-    'ParagonIE_Sodium_Core_Curve25519_Ge_Precomp' => $vendorDir . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/Precomp.php',
84
-    'ParagonIE_Sodium_Core_Curve25519_H' => $vendorDir . '/paragonie/sodium_compat/src/Core/Curve25519/H.php',
85
-    'ParagonIE_Sodium_Core_Ed25519' => $vendorDir . '/paragonie/sodium_compat/src/Core/Ed25519.php',
86
-    'ParagonIE_Sodium_Core_HChaCha20' => $vendorDir . '/paragonie/sodium_compat/src/Core/HChaCha20.php',
87
-    'ParagonIE_Sodium_Core_HSalsa20' => $vendorDir . '/paragonie/sodium_compat/src/Core/HSalsa20.php',
88
-    'ParagonIE_Sodium_Core_Poly1305' => $vendorDir . '/paragonie/sodium_compat/src/Core/Poly1305.php',
89
-    'ParagonIE_Sodium_Core_Poly1305_State' => $vendorDir . '/paragonie/sodium_compat/src/Core/Poly1305/State.php',
90
-    'ParagonIE_Sodium_Core_Ristretto255' => $vendorDir . '/paragonie/sodium_compat/src/Core/Ristretto255.php',
91
-    'ParagonIE_Sodium_Core_Salsa20' => $vendorDir . '/paragonie/sodium_compat/src/Core/Salsa20.php',
92
-    'ParagonIE_Sodium_Core_SecretStream_State' => $vendorDir . '/paragonie/sodium_compat/src/Core/SecretStream/State.php',
93
-    'ParagonIE_Sodium_Core_SipHash' => $vendorDir . '/paragonie/sodium_compat/src/Core/SipHash.php',
94
-    'ParagonIE_Sodium_Core_Util' => $vendorDir . '/paragonie/sodium_compat/src/Core/Util.php',
95
-    'ParagonIE_Sodium_Core_X25519' => $vendorDir . '/paragonie/sodium_compat/src/Core/X25519.php',
96
-    'ParagonIE_Sodium_Core_XChaCha20' => $vendorDir . '/paragonie/sodium_compat/src/Core/XChaCha20.php',
97
-    'ParagonIE_Sodium_Core_XSalsa20' => $vendorDir . '/paragonie/sodium_compat/src/Core/XSalsa20.php',
98
-    'ParagonIE_Sodium_Crypto' => $vendorDir . '/paragonie/sodium_compat/src/Crypto.php',
99
-    'ParagonIE_Sodium_Crypto32' => $vendorDir . '/paragonie/sodium_compat/src/Crypto32.php',
100
-    'ParagonIE_Sodium_File' => $vendorDir . '/paragonie/sodium_compat/src/File.php',
101
-    'Psr\\Log\\AbstractLogger' => $vendorDir . '/psr/log/Psr/Log/AbstractLogger.php',
102
-    'Psr\\Log\\InvalidArgumentException' => $vendorDir . '/psr/log/Psr/Log/InvalidArgumentException.php',
103
-    'Psr\\Log\\LogLevel' => $vendorDir . '/psr/log/Psr/Log/LogLevel.php',
104
-    'Psr\\Log\\LoggerAwareInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareInterface.php',
105
-    'Psr\\Log\\LoggerAwareTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareTrait.php',
106
-    'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php',
107
-    'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php',
108
-    'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php',
109
-    'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/DummyTest.php',
110
-    'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
111
-    'Psr\\Log\\Test\\TestLogger' => $vendorDir . '/psr/log/Psr/Log/Test/TestLogger.php',
112
-    'SodiumException' => $vendorDir . '/paragonie/sodium_compat/src/SodiumException.php',
113
-    'SplFixedArray' => $vendorDir . '/paragonie/sodium_compat/src/PHP52/SplFixedArray.php',
114
-    'TrustedLoginAJAXTest' => $vendorDir . '/trustedlogin/client/tests/test-ajax.php',
115
-    'TrustedLoginConfigTest' => $vendorDir . '/trustedlogin/client/tests/test-config.php',
116
-    'TrustedLoginUsersTest' => $vendorDir . '/trustedlogin/client/tests/test-users.php',
117
-    'TrustedLogin\\Admin' => $vendorDir . '/trustedlogin/client/src/Admin.php',
118
-    'TrustedLogin\\Ajax' => $vendorDir . '/trustedlogin/client/src/Ajax.php',
119
-    'TrustedLogin\\Client' => $vendorDir . '/trustedlogin/client/src/Client.php',
120
-    'TrustedLogin\\Config' => $vendorDir . '/trustedlogin/client/src/Config.php',
121
-    'TrustedLogin\\Cron' => $vendorDir . '/trustedlogin/client/src/Cron.php',
122
-    'TrustedLogin\\Encryption' => $vendorDir . '/trustedlogin/client/src/Encryption.php',
123
-    'TrustedLogin\\Endpoint' => $vendorDir . '/trustedlogin/client/src/Endpoint.php',
124
-    'TrustedLogin\\Envelope' => $vendorDir . '/trustedlogin/client/src/Envelope.php',
125
-    'TrustedLogin\\Logging' => $vendorDir . '/trustedlogin/client/src/Logging.php',
126
-    'TrustedLogin\\Remote' => $vendorDir . '/trustedlogin/client/src/Remote.php',
127
-    'TrustedLogin\\SecurityChecks' => $vendorDir . '/trustedlogin/client/src/SecurityChecks.php',
128
-    'TrustedLogin\\SiteAccess' => $vendorDir . '/trustedlogin/client/src/SiteAccess.php',
129
-    'TrustedLogin\\SupportRole' => $vendorDir . '/trustedlogin/client/src/SupportRole.php',
130
-    'TrustedLogin\\SupportUser' => $vendorDir . '/trustedlogin/client/src/SupportUser.php',
131
-    'TrustedLogin\\TrustedLoginClientTest' => $vendorDir . '/trustedlogin/client/tests/test-client.php',
132
-    'TrustedLogin\\TrustedLoginEncryptionTest' => $vendorDir . '/trustedlogin/client/tests/test-encryption.php',
133
-    'TrustedLogin\\TrustedLoginLoggingTest' => $vendorDir . '/trustedlogin/client/tests/test-logging.php',
134
-    'TrustedLogin\\TrustedLoginRemoteTest' => $vendorDir . '/trustedlogin/client/tests/test-remote.php',
135
-    'TrustedLogin\\TrustedLoginSiteAccessTest' => $vendorDir . '/trustedlogin/client/tests/test-siteaccess.php',
136
-    'TypeError' => $vendorDir . '/paragonie/random_compat/lib/error_polyfill.php',
9
+	'ComposerAutoloaderInitb5638313a52df4893eb45c04efdaa356' => $vendorDir . '/trustedlogin/client/vendor/composer/autoload_real.php',
10
+	'Composer\\Autoload\\ClassLoader' => $vendorDir . '/trustedlogin/client/vendor/composer/ClassLoader.php',
11
+	'Composer\\Autoload\\ComposerStaticInitb5638313a52df4893eb45c04efdaa356' => $vendorDir . '/trustedlogin/client/vendor/composer/autoload_static.php',
12
+	'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
13
+	'Error' => $vendorDir . '/paragonie/random_compat/lib/error_polyfill.php',
14
+	'Katzgrau\\KLogger\\Logger' => $vendorDir . '/katzgrau/klogger/src/Logger.php',
15
+	'Katzgrau\\KLogger\\TrustedLogin_Logger' => $vendorDir . '/trustedlogin/client/vendor/TrustedLogin/katzgrau/klogger/src/Logger.php',
16
+	'LoggerTest' => $vendorDir . '/katzgrau/klogger/tests/LoggerTest.php',
17
+	'ParagonIE\\Sodium\\Compat' => $vendorDir . '/paragonie/sodium_compat/namespaced/Compat.php',
18
+	'ParagonIE\\Sodium\\Core\\BLAKE2b' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/BLAKE2b.php',
19
+	'ParagonIE\\Sodium\\Core\\ChaCha20' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/ChaCha20.php',
20
+	'ParagonIE\\Sodium\\Core\\ChaCha20\\Ctx' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/ChaCha20/Ctx.php',
21
+	'ParagonIE\\Sodium\\Core\\ChaCha20\\IetfCtx' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/ChaCha20/IetfCtx.php',
22
+	'ParagonIE\\Sodium\\Core\\Curve25519' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Curve25519.php',
23
+	'ParagonIE\\Sodium\\Core\\Curve25519\\Fe' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Fe.php',
24
+	'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\Cached' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/Cached.php',
25
+	'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\P1p1' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P1p1.php',
26
+	'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\P2' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P2.php',
27
+	'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\P3' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P3.php',
28
+	'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\Precomp' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/Precomp.php',
29
+	'ParagonIE\\Sodium\\Core\\Curve25519\\H' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Curve25519/H.php',
30
+	'ParagonIE\\Sodium\\Core\\Ed25519' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Ed25519.php',
31
+	'ParagonIE\\Sodium\\Core\\HChaCha20' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/HChaCha20.php',
32
+	'ParagonIE\\Sodium\\Core\\HSalsa20' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/HSalsa20.php',
33
+	'ParagonIE\\Sodium\\Core\\Poly1305' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Poly1305.php',
34
+	'ParagonIE\\Sodium\\Core\\Poly1305\\State' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Poly1305/State.php',
35
+	'ParagonIE\\Sodium\\Core\\Salsa20' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Salsa20.php',
36
+	'ParagonIE\\Sodium\\Core\\SipHash' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/SipHash.php',
37
+	'ParagonIE\\Sodium\\Core\\Util' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Util.php',
38
+	'ParagonIE\\Sodium\\Core\\X25519' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/X25519.php',
39
+	'ParagonIE\\Sodium\\Core\\XChaCha20' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/XChaCha20.php',
40
+	'ParagonIE\\Sodium\\Core\\Xsalsa20' => $vendorDir . '/paragonie/sodium_compat/namespaced/Core/Xsalsa20.php',
41
+	'ParagonIE\\Sodium\\Crypto' => $vendorDir . '/paragonie/sodium_compat/namespaced/Crypto.php',
42
+	'ParagonIE\\Sodium\\File' => $vendorDir . '/paragonie/sodium_compat/namespaced/File.php',
43
+	'ParagonIE_Sodium_Compat' => $vendorDir . '/paragonie/sodium_compat/src/Compat.php',
44
+	'ParagonIE_Sodium_Core32_BLAKE2b' => $vendorDir . '/paragonie/sodium_compat/src/Core32/BLAKE2b.php',
45
+	'ParagonIE_Sodium_Core32_ChaCha20' => $vendorDir . '/paragonie/sodium_compat/src/Core32/ChaCha20.php',
46
+	'ParagonIE_Sodium_Core32_ChaCha20_Ctx' => $vendorDir . '/paragonie/sodium_compat/src/Core32/ChaCha20/Ctx.php',
47
+	'ParagonIE_Sodium_Core32_ChaCha20_IetfCtx' => $vendorDir . '/paragonie/sodium_compat/src/Core32/ChaCha20/IetfCtx.php',
48
+	'ParagonIE_Sodium_Core32_Curve25519' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Curve25519.php',
49
+	'ParagonIE_Sodium_Core32_Curve25519_Fe' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Curve25519/Fe.php',
50
+	'ParagonIE_Sodium_Core32_Curve25519_Ge_Cached' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/Cached.php',
51
+	'ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P1p1.php',
52
+	'ParagonIE_Sodium_Core32_Curve25519_Ge_P2' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P2.php',
53
+	'ParagonIE_Sodium_Core32_Curve25519_Ge_P3' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P3.php',
54
+	'ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/Precomp.php',
55
+	'ParagonIE_Sodium_Core32_Curve25519_H' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Curve25519/H.php',
56
+	'ParagonIE_Sodium_Core32_Ed25519' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Ed25519.php',
57
+	'ParagonIE_Sodium_Core32_HChaCha20' => $vendorDir . '/paragonie/sodium_compat/src/Core32/HChaCha20.php',
58
+	'ParagonIE_Sodium_Core32_HSalsa20' => $vendorDir . '/paragonie/sodium_compat/src/Core32/HSalsa20.php',
59
+	'ParagonIE_Sodium_Core32_Int32' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Int32.php',
60
+	'ParagonIE_Sodium_Core32_Int64' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Int64.php',
61
+	'ParagonIE_Sodium_Core32_Poly1305' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Poly1305.php',
62
+	'ParagonIE_Sodium_Core32_Poly1305_State' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Poly1305/State.php',
63
+	'ParagonIE_Sodium_Core32_Salsa20' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Salsa20.php',
64
+	'ParagonIE_Sodium_Core32_SecretStream_State' => $vendorDir . '/paragonie/sodium_compat/src/Core32/SecretStream/State.php',
65
+	'ParagonIE_Sodium_Core32_SipHash' => $vendorDir . '/paragonie/sodium_compat/src/Core32/SipHash.php',
66
+	'ParagonIE_Sodium_Core32_Util' => $vendorDir . '/paragonie/sodium_compat/src/Core32/Util.php',
67
+	'ParagonIE_Sodium_Core32_X25519' => $vendorDir . '/paragonie/sodium_compat/src/Core32/X25519.php',
68
+	'ParagonIE_Sodium_Core32_XChaCha20' => $vendorDir . '/paragonie/sodium_compat/src/Core32/XChaCha20.php',
69
+	'ParagonIE_Sodium_Core32_XSalsa20' => $vendorDir . '/paragonie/sodium_compat/src/Core32/XSalsa20.php',
70
+	'ParagonIE_Sodium_Core_BLAKE2b' => $vendorDir . '/paragonie/sodium_compat/src/Core/BLAKE2b.php',
71
+	'ParagonIE_Sodium_Core_Base64_Common' => $vendorDir . '/paragonie/sodium_compat/src/Core/Base64/Common.php',
72
+	'ParagonIE_Sodium_Core_Base64_Original' => $vendorDir . '/paragonie/sodium_compat/src/Core/Base64/Original.php',
73
+	'ParagonIE_Sodium_Core_Base64_UrlSafe' => $vendorDir . '/paragonie/sodium_compat/src/Core/Base64/UrlSafe.php',
74
+	'ParagonIE_Sodium_Core_ChaCha20' => $vendorDir . '/paragonie/sodium_compat/src/Core/ChaCha20.php',
75
+	'ParagonIE_Sodium_Core_ChaCha20_Ctx' => $vendorDir . '/paragonie/sodium_compat/src/Core/ChaCha20/Ctx.php',
76
+	'ParagonIE_Sodium_Core_ChaCha20_IetfCtx' => $vendorDir . '/paragonie/sodium_compat/src/Core/ChaCha20/IetfCtx.php',
77
+	'ParagonIE_Sodium_Core_Curve25519' => $vendorDir . '/paragonie/sodium_compat/src/Core/Curve25519.php',
78
+	'ParagonIE_Sodium_Core_Curve25519_Fe' => $vendorDir . '/paragonie/sodium_compat/src/Core/Curve25519/Fe.php',
79
+	'ParagonIE_Sodium_Core_Curve25519_Ge_Cached' => $vendorDir . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/Cached.php',
80
+	'ParagonIE_Sodium_Core_Curve25519_Ge_P1p1' => $vendorDir . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/P1p1.php',
81
+	'ParagonIE_Sodium_Core_Curve25519_Ge_P2' => $vendorDir . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/P2.php',
82
+	'ParagonIE_Sodium_Core_Curve25519_Ge_P3' => $vendorDir . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/P3.php',
83
+	'ParagonIE_Sodium_Core_Curve25519_Ge_Precomp' => $vendorDir . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/Precomp.php',
84
+	'ParagonIE_Sodium_Core_Curve25519_H' => $vendorDir . '/paragonie/sodium_compat/src/Core/Curve25519/H.php',
85
+	'ParagonIE_Sodium_Core_Ed25519' => $vendorDir . '/paragonie/sodium_compat/src/Core/Ed25519.php',
86
+	'ParagonIE_Sodium_Core_HChaCha20' => $vendorDir . '/paragonie/sodium_compat/src/Core/HChaCha20.php',
87
+	'ParagonIE_Sodium_Core_HSalsa20' => $vendorDir . '/paragonie/sodium_compat/src/Core/HSalsa20.php',
88
+	'ParagonIE_Sodium_Core_Poly1305' => $vendorDir . '/paragonie/sodium_compat/src/Core/Poly1305.php',
89
+	'ParagonIE_Sodium_Core_Poly1305_State' => $vendorDir . '/paragonie/sodium_compat/src/Core/Poly1305/State.php',
90
+	'ParagonIE_Sodium_Core_Ristretto255' => $vendorDir . '/paragonie/sodium_compat/src/Core/Ristretto255.php',
91
+	'ParagonIE_Sodium_Core_Salsa20' => $vendorDir . '/paragonie/sodium_compat/src/Core/Salsa20.php',
92
+	'ParagonIE_Sodium_Core_SecretStream_State' => $vendorDir . '/paragonie/sodium_compat/src/Core/SecretStream/State.php',
93
+	'ParagonIE_Sodium_Core_SipHash' => $vendorDir . '/paragonie/sodium_compat/src/Core/SipHash.php',
94
+	'ParagonIE_Sodium_Core_Util' => $vendorDir . '/paragonie/sodium_compat/src/Core/Util.php',
95
+	'ParagonIE_Sodium_Core_X25519' => $vendorDir . '/paragonie/sodium_compat/src/Core/X25519.php',
96
+	'ParagonIE_Sodium_Core_XChaCha20' => $vendorDir . '/paragonie/sodium_compat/src/Core/XChaCha20.php',
97
+	'ParagonIE_Sodium_Core_XSalsa20' => $vendorDir . '/paragonie/sodium_compat/src/Core/XSalsa20.php',
98
+	'ParagonIE_Sodium_Crypto' => $vendorDir . '/paragonie/sodium_compat/src/Crypto.php',
99
+	'ParagonIE_Sodium_Crypto32' => $vendorDir . '/paragonie/sodium_compat/src/Crypto32.php',
100
+	'ParagonIE_Sodium_File' => $vendorDir . '/paragonie/sodium_compat/src/File.php',
101
+	'Psr\\Log\\AbstractLogger' => $vendorDir . '/psr/log/Psr/Log/AbstractLogger.php',
102
+	'Psr\\Log\\InvalidArgumentException' => $vendorDir . '/psr/log/Psr/Log/InvalidArgumentException.php',
103
+	'Psr\\Log\\LogLevel' => $vendorDir . '/psr/log/Psr/Log/LogLevel.php',
104
+	'Psr\\Log\\LoggerAwareInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareInterface.php',
105
+	'Psr\\Log\\LoggerAwareTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareTrait.php',
106
+	'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php',
107
+	'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php',
108
+	'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php',
109
+	'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/DummyTest.php',
110
+	'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
111
+	'Psr\\Log\\Test\\TestLogger' => $vendorDir . '/psr/log/Psr/Log/Test/TestLogger.php',
112
+	'SodiumException' => $vendorDir . '/paragonie/sodium_compat/src/SodiumException.php',
113
+	'SplFixedArray' => $vendorDir . '/paragonie/sodium_compat/src/PHP52/SplFixedArray.php',
114
+	'TrustedLoginAJAXTest' => $vendorDir . '/trustedlogin/client/tests/test-ajax.php',
115
+	'TrustedLoginConfigTest' => $vendorDir . '/trustedlogin/client/tests/test-config.php',
116
+	'TrustedLoginUsersTest' => $vendorDir . '/trustedlogin/client/tests/test-users.php',
117
+	'TrustedLogin\\Admin' => $vendorDir . '/trustedlogin/client/src/Admin.php',
118
+	'TrustedLogin\\Ajax' => $vendorDir . '/trustedlogin/client/src/Ajax.php',
119
+	'TrustedLogin\\Client' => $vendorDir . '/trustedlogin/client/src/Client.php',
120
+	'TrustedLogin\\Config' => $vendorDir . '/trustedlogin/client/src/Config.php',
121
+	'TrustedLogin\\Cron' => $vendorDir . '/trustedlogin/client/src/Cron.php',
122
+	'TrustedLogin\\Encryption' => $vendorDir . '/trustedlogin/client/src/Encryption.php',
123
+	'TrustedLogin\\Endpoint' => $vendorDir . '/trustedlogin/client/src/Endpoint.php',
124
+	'TrustedLogin\\Envelope' => $vendorDir . '/trustedlogin/client/src/Envelope.php',
125
+	'TrustedLogin\\Logging' => $vendorDir . '/trustedlogin/client/src/Logging.php',
126
+	'TrustedLogin\\Remote' => $vendorDir . '/trustedlogin/client/src/Remote.php',
127
+	'TrustedLogin\\SecurityChecks' => $vendorDir . '/trustedlogin/client/src/SecurityChecks.php',
128
+	'TrustedLogin\\SiteAccess' => $vendorDir . '/trustedlogin/client/src/SiteAccess.php',
129
+	'TrustedLogin\\SupportRole' => $vendorDir . '/trustedlogin/client/src/SupportRole.php',
130
+	'TrustedLogin\\SupportUser' => $vendorDir . '/trustedlogin/client/src/SupportUser.php',
131
+	'TrustedLogin\\TrustedLoginClientTest' => $vendorDir . '/trustedlogin/client/tests/test-client.php',
132
+	'TrustedLogin\\TrustedLoginEncryptionTest' => $vendorDir . '/trustedlogin/client/tests/test-encryption.php',
133
+	'TrustedLogin\\TrustedLoginLoggingTest' => $vendorDir . '/trustedlogin/client/tests/test-logging.php',
134
+	'TrustedLogin\\TrustedLoginRemoteTest' => $vendorDir . '/trustedlogin/client/tests/test-remote.php',
135
+	'TrustedLogin\\TrustedLoginSiteAccessTest' => $vendorDir . '/trustedlogin/client/tests/test-siteaccess.php',
136
+	'TypeError' => $vendorDir . '/paragonie/random_compat/lib/error_polyfill.php',
137 137
 );
Please login to merge, or discard this patch.
vendor/composer/autoload_psr4.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
 $baseDir = dirname($vendorDir);
7 7
 
8 8
 return array(
9
-    'TrustedLogin\\' => array($baseDir . '/src', $vendorDir . '/trustedlogin/client/src'),
10
-    'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
11
-    'Katzgrau\\KLogger\\' => array($vendorDir . '/katzgrau/klogger/src'),
12
-    'KatzGrau\\KLogger\\' => array($baseDir . '/src'),
9
+	'TrustedLogin\\' => array($baseDir . '/src', $vendorDir . '/trustedlogin/client/src'),
10
+	'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
11
+	'Katzgrau\\KLogger\\' => array($vendorDir . '/katzgrau/klogger/src'),
12
+	'KatzGrau\\KLogger\\' => array($baseDir . '/src'),
13 13
 );
Please login to merge, or discard this patch.
vendor/composer/autoload_files.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,6 +6,6 @@
 block discarded – undo
6 6
 $baseDir = dirname($vendorDir);
7 7
 
8 8
 return array(
9
-    '5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php',
10
-    '3109cb1a231dcd04bee1f9f620d46975' => $vendorDir . '/paragonie/sodium_compat/autoload.php',
9
+	'5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php',
10
+	'3109cb1a231dcd04bee1f9f620d46975' => $vendorDir . '/paragonie/sodium_compat/autoload.php',
11 11
 );
Please login to merge, or discard this patch.
vendor/composer/autoload_static.php 1 patch
Indentation   +176 added lines, -176 removed lines patch added patch discarded remove patch
@@ -6,185 +6,185 @@
 block discarded – undo
6 6
 
7 7
 class ComposerStaticInit984ed95bef2b0e3d4eeb0208a88dc67d
8 8
 {
9
-    public static $files = array (
10
-        '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php',
11
-        '3109cb1a231dcd04bee1f9f620d46975' => __DIR__ . '/..' . '/paragonie/sodium_compat/autoload.php',
12
-    );
9
+	public static $files = array (
10
+		'5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php',
11
+		'3109cb1a231dcd04bee1f9f620d46975' => __DIR__ . '/..' . '/paragonie/sodium_compat/autoload.php',
12
+	);
13 13
 
14
-    public static $prefixLengthsPsr4 = array (
15
-        'T' => 
16
-        array (
17
-            'TrustedLogin\\' => 13,
18
-        ),
19
-        'P' => 
20
-        array (
21
-            'Psr\\Log\\' => 8,
22
-        ),
23
-        'K' => 
24
-        array (
25
-            'Katzgrau\\KLogger\\' => 17,
26
-            'KatzGrau\\KLogger\\' => 17,
27
-        ),
28
-    );
14
+	public static $prefixLengthsPsr4 = array (
15
+		'T' => 
16
+		array (
17
+			'TrustedLogin\\' => 13,
18
+		),
19
+		'P' => 
20
+		array (
21
+			'Psr\\Log\\' => 8,
22
+		),
23
+		'K' => 
24
+		array (
25
+			'Katzgrau\\KLogger\\' => 17,
26
+			'KatzGrau\\KLogger\\' => 17,
27
+		),
28
+	);
29 29
 
30
-    public static $prefixDirsPsr4 = array (
31
-        'TrustedLogin\\' => 
32
-        array (
33
-            0 => __DIR__ . '/../..' . '/src',
34
-            1 => __DIR__ . '/..' . '/trustedlogin/client/src',
35
-        ),
36
-        'Psr\\Log\\' => 
37
-        array (
38
-            0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
39
-        ),
40
-        'Katzgrau\\KLogger\\' => 
41
-        array (
42
-            0 => __DIR__ . '/..' . '/katzgrau/klogger/src',
43
-        ),
44
-        'KatzGrau\\KLogger\\' => 
45
-        array (
46
-            0 => __DIR__ . '/../..' . '/src',
47
-        ),
48
-    );
30
+	public static $prefixDirsPsr4 = array (
31
+		'TrustedLogin\\' => 
32
+		array (
33
+			0 => __DIR__ . '/../..' . '/src',
34
+			1 => __DIR__ . '/..' . '/trustedlogin/client/src',
35
+		),
36
+		'Psr\\Log\\' => 
37
+		array (
38
+			0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
39
+		),
40
+		'Katzgrau\\KLogger\\' => 
41
+		array (
42
+			0 => __DIR__ . '/..' . '/katzgrau/klogger/src',
43
+		),
44
+		'KatzGrau\\KLogger\\' => 
45
+		array (
46
+			0 => __DIR__ . '/../..' . '/src',
47
+		),
48
+	);
49 49
 
50
-    public static $classMap = array (
51
-        'ComposerAutoloaderInitb5638313a52df4893eb45c04efdaa356' => __DIR__ . '/..' . '/trustedlogin/client/vendor/composer/autoload_real.php',
52
-        'Composer\\Autoload\\ClassLoader' => __DIR__ . '/..' . '/trustedlogin/client/vendor/composer/ClassLoader.php',
53
-        'Composer\\Autoload\\ComposerStaticInitb5638313a52df4893eb45c04efdaa356' => __DIR__ . '/..' . '/trustedlogin/client/vendor/composer/autoload_static.php',
54
-        'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
55
-        'Error' => __DIR__ . '/..' . '/paragonie/random_compat/lib/error_polyfill.php',
56
-        'Katzgrau\\KLogger\\Logger' => __DIR__ . '/..' . '/katzgrau/klogger/src/Logger.php',
57
-        'Katzgrau\\KLogger\\TrustedLogin_Logger' => __DIR__ . '/..' . '/trustedlogin/client/vendor/TrustedLogin/katzgrau/klogger/src/Logger.php',
58
-        'LoggerTest' => __DIR__ . '/..' . '/katzgrau/klogger/tests/LoggerTest.php',
59
-        'ParagonIE\\Sodium\\Compat' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Compat.php',
60
-        'ParagonIE\\Sodium\\Core\\BLAKE2b' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/BLAKE2b.php',
61
-        'ParagonIE\\Sodium\\Core\\ChaCha20' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/ChaCha20.php',
62
-        'ParagonIE\\Sodium\\Core\\ChaCha20\\Ctx' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/ChaCha20/Ctx.php',
63
-        'ParagonIE\\Sodium\\Core\\ChaCha20\\IetfCtx' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/ChaCha20/IetfCtx.php',
64
-        'ParagonIE\\Sodium\\Core\\Curve25519' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Curve25519.php',
65
-        'ParagonIE\\Sodium\\Core\\Curve25519\\Fe' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Fe.php',
66
-        'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\Cached' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/Cached.php',
67
-        'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\P1p1' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P1p1.php',
68
-        'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\P2' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P2.php',
69
-        'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\P3' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P3.php',
70
-        'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\Precomp' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/Precomp.php',
71
-        'ParagonIE\\Sodium\\Core\\Curve25519\\H' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Curve25519/H.php',
72
-        'ParagonIE\\Sodium\\Core\\Ed25519' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Ed25519.php',
73
-        'ParagonIE\\Sodium\\Core\\HChaCha20' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/HChaCha20.php',
74
-        'ParagonIE\\Sodium\\Core\\HSalsa20' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/HSalsa20.php',
75
-        'ParagonIE\\Sodium\\Core\\Poly1305' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Poly1305.php',
76
-        'ParagonIE\\Sodium\\Core\\Poly1305\\State' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Poly1305/State.php',
77
-        'ParagonIE\\Sodium\\Core\\Salsa20' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Salsa20.php',
78
-        'ParagonIE\\Sodium\\Core\\SipHash' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/SipHash.php',
79
-        'ParagonIE\\Sodium\\Core\\Util' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Util.php',
80
-        'ParagonIE\\Sodium\\Core\\X25519' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/X25519.php',
81
-        'ParagonIE\\Sodium\\Core\\XChaCha20' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/XChaCha20.php',
82
-        'ParagonIE\\Sodium\\Core\\Xsalsa20' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Xsalsa20.php',
83
-        'ParagonIE\\Sodium\\Crypto' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Crypto.php',
84
-        'ParagonIE\\Sodium\\File' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/File.php',
85
-        'ParagonIE_Sodium_Compat' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Compat.php',
86
-        'ParagonIE_Sodium_Core32_BLAKE2b' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/BLAKE2b.php',
87
-        'ParagonIE_Sodium_Core32_ChaCha20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/ChaCha20.php',
88
-        'ParagonIE_Sodium_Core32_ChaCha20_Ctx' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/ChaCha20/Ctx.php',
89
-        'ParagonIE_Sodium_Core32_ChaCha20_IetfCtx' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/ChaCha20/IetfCtx.php',
90
-        'ParagonIE_Sodium_Core32_Curve25519' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Curve25519.php',
91
-        'ParagonIE_Sodium_Core32_Curve25519_Fe' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Curve25519/Fe.php',
92
-        'ParagonIE_Sodium_Core32_Curve25519_Ge_Cached' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/Cached.php',
93
-        'ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P1p1.php',
94
-        'ParagonIE_Sodium_Core32_Curve25519_Ge_P2' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P2.php',
95
-        'ParagonIE_Sodium_Core32_Curve25519_Ge_P3' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P3.php',
96
-        'ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/Precomp.php',
97
-        'ParagonIE_Sodium_Core32_Curve25519_H' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Curve25519/H.php',
98
-        'ParagonIE_Sodium_Core32_Ed25519' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Ed25519.php',
99
-        'ParagonIE_Sodium_Core32_HChaCha20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/HChaCha20.php',
100
-        'ParagonIE_Sodium_Core32_HSalsa20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/HSalsa20.php',
101
-        'ParagonIE_Sodium_Core32_Int32' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Int32.php',
102
-        'ParagonIE_Sodium_Core32_Int64' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Int64.php',
103
-        'ParagonIE_Sodium_Core32_Poly1305' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Poly1305.php',
104
-        'ParagonIE_Sodium_Core32_Poly1305_State' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Poly1305/State.php',
105
-        'ParagonIE_Sodium_Core32_Salsa20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Salsa20.php',
106
-        'ParagonIE_Sodium_Core32_SecretStream_State' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/SecretStream/State.php',
107
-        'ParagonIE_Sodium_Core32_SipHash' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/SipHash.php',
108
-        'ParagonIE_Sodium_Core32_Util' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Util.php',
109
-        'ParagonIE_Sodium_Core32_X25519' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/X25519.php',
110
-        'ParagonIE_Sodium_Core32_XChaCha20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/XChaCha20.php',
111
-        'ParagonIE_Sodium_Core32_XSalsa20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/XSalsa20.php',
112
-        'ParagonIE_Sodium_Core_BLAKE2b' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/BLAKE2b.php',
113
-        'ParagonIE_Sodium_Core_Base64_Common' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Base64/Common.php',
114
-        'ParagonIE_Sodium_Core_Base64_Original' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Base64/Original.php',
115
-        'ParagonIE_Sodium_Core_Base64_UrlSafe' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Base64/UrlSafe.php',
116
-        'ParagonIE_Sodium_Core_ChaCha20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/ChaCha20.php',
117
-        'ParagonIE_Sodium_Core_ChaCha20_Ctx' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/ChaCha20/Ctx.php',
118
-        'ParagonIE_Sodium_Core_ChaCha20_IetfCtx' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/ChaCha20/IetfCtx.php',
119
-        'ParagonIE_Sodium_Core_Curve25519' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Curve25519.php',
120
-        'ParagonIE_Sodium_Core_Curve25519_Fe' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Curve25519/Fe.php',
121
-        'ParagonIE_Sodium_Core_Curve25519_Ge_Cached' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/Cached.php',
122
-        'ParagonIE_Sodium_Core_Curve25519_Ge_P1p1' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/P1p1.php',
123
-        'ParagonIE_Sodium_Core_Curve25519_Ge_P2' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/P2.php',
124
-        'ParagonIE_Sodium_Core_Curve25519_Ge_P3' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/P3.php',
125
-        'ParagonIE_Sodium_Core_Curve25519_Ge_Precomp' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/Precomp.php',
126
-        'ParagonIE_Sodium_Core_Curve25519_H' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Curve25519/H.php',
127
-        'ParagonIE_Sodium_Core_Ed25519' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Ed25519.php',
128
-        'ParagonIE_Sodium_Core_HChaCha20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/HChaCha20.php',
129
-        'ParagonIE_Sodium_Core_HSalsa20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/HSalsa20.php',
130
-        'ParagonIE_Sodium_Core_Poly1305' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Poly1305.php',
131
-        'ParagonIE_Sodium_Core_Poly1305_State' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Poly1305/State.php',
132
-        'ParagonIE_Sodium_Core_Ristretto255' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Ristretto255.php',
133
-        'ParagonIE_Sodium_Core_Salsa20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Salsa20.php',
134
-        'ParagonIE_Sodium_Core_SecretStream_State' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/SecretStream/State.php',
135
-        'ParagonIE_Sodium_Core_SipHash' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/SipHash.php',
136
-        'ParagonIE_Sodium_Core_Util' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Util.php',
137
-        'ParagonIE_Sodium_Core_X25519' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/X25519.php',
138
-        'ParagonIE_Sodium_Core_XChaCha20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/XChaCha20.php',
139
-        'ParagonIE_Sodium_Core_XSalsa20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/XSalsa20.php',
140
-        'ParagonIE_Sodium_Crypto' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Crypto.php',
141
-        'ParagonIE_Sodium_Crypto32' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Crypto32.php',
142
-        'ParagonIE_Sodium_File' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/File.php',
143
-        'Psr\\Log\\AbstractLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/AbstractLogger.php',
144
-        'Psr\\Log\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/log/Psr/Log/InvalidArgumentException.php',
145
-        'Psr\\Log\\LogLevel' => __DIR__ . '/..' . '/psr/log/Psr/Log/LogLevel.php',
146
-        'Psr\\Log\\LoggerAwareInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerAwareInterface.php',
147
-        'Psr\\Log\\LoggerAwareTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerAwareTrait.php',
148
-        'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php',
149
-        'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php',
150
-        'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php',
151
-        'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/DummyTest.php',
152
-        'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
153
-        'Psr\\Log\\Test\\TestLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/TestLogger.php',
154
-        'SodiumException' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/SodiumException.php',
155
-        'SplFixedArray' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/PHP52/SplFixedArray.php',
156
-        'TrustedLoginAJAXTest' => __DIR__ . '/..' . '/trustedlogin/client/tests/test-ajax.php',
157
-        'TrustedLoginConfigTest' => __DIR__ . '/..' . '/trustedlogin/client/tests/test-config.php',
158
-        'TrustedLoginUsersTest' => __DIR__ . '/..' . '/trustedlogin/client/tests/test-users.php',
159
-        'TrustedLogin\\Admin' => __DIR__ . '/..' . '/trustedlogin/client/src/Admin.php',
160
-        'TrustedLogin\\Ajax' => __DIR__ . '/..' . '/trustedlogin/client/src/Ajax.php',
161
-        'TrustedLogin\\Client' => __DIR__ . '/..' . '/trustedlogin/client/src/Client.php',
162
-        'TrustedLogin\\Config' => __DIR__ . '/..' . '/trustedlogin/client/src/Config.php',
163
-        'TrustedLogin\\Cron' => __DIR__ . '/..' . '/trustedlogin/client/src/Cron.php',
164
-        'TrustedLogin\\Encryption' => __DIR__ . '/..' . '/trustedlogin/client/src/Encryption.php',
165
-        'TrustedLogin\\Endpoint' => __DIR__ . '/..' . '/trustedlogin/client/src/Endpoint.php',
166
-        'TrustedLogin\\Envelope' => __DIR__ . '/..' . '/trustedlogin/client/src/Envelope.php',
167
-        'TrustedLogin\\Logging' => __DIR__ . '/..' . '/trustedlogin/client/src/Logging.php',
168
-        'TrustedLogin\\Remote' => __DIR__ . '/..' . '/trustedlogin/client/src/Remote.php',
169
-        'TrustedLogin\\SecurityChecks' => __DIR__ . '/..' . '/trustedlogin/client/src/SecurityChecks.php',
170
-        'TrustedLogin\\SiteAccess' => __DIR__ . '/..' . '/trustedlogin/client/src/SiteAccess.php',
171
-        'TrustedLogin\\SupportRole' => __DIR__ . '/..' . '/trustedlogin/client/src/SupportRole.php',
172
-        'TrustedLogin\\SupportUser' => __DIR__ . '/..' . '/trustedlogin/client/src/SupportUser.php',
173
-        'TrustedLogin\\TrustedLoginClientTest' => __DIR__ . '/..' . '/trustedlogin/client/tests/test-client.php',
174
-        'TrustedLogin\\TrustedLoginEncryptionTest' => __DIR__ . '/..' . '/trustedlogin/client/tests/test-encryption.php',
175
-        'TrustedLogin\\TrustedLoginLoggingTest' => __DIR__ . '/..' . '/trustedlogin/client/tests/test-logging.php',
176
-        'TrustedLogin\\TrustedLoginRemoteTest' => __DIR__ . '/..' . '/trustedlogin/client/tests/test-remote.php',
177
-        'TrustedLogin\\TrustedLoginSiteAccessTest' => __DIR__ . '/..' . '/trustedlogin/client/tests/test-siteaccess.php',
178
-        'TypeError' => __DIR__ . '/..' . '/paragonie/random_compat/lib/error_polyfill.php',
179
-    );
50
+	public static $classMap = array (
51
+		'ComposerAutoloaderInitb5638313a52df4893eb45c04efdaa356' => __DIR__ . '/..' . '/trustedlogin/client/vendor/composer/autoload_real.php',
52
+		'Composer\\Autoload\\ClassLoader' => __DIR__ . '/..' . '/trustedlogin/client/vendor/composer/ClassLoader.php',
53
+		'Composer\\Autoload\\ComposerStaticInitb5638313a52df4893eb45c04efdaa356' => __DIR__ . '/..' . '/trustedlogin/client/vendor/composer/autoload_static.php',
54
+		'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
55
+		'Error' => __DIR__ . '/..' . '/paragonie/random_compat/lib/error_polyfill.php',
56
+		'Katzgrau\\KLogger\\Logger' => __DIR__ . '/..' . '/katzgrau/klogger/src/Logger.php',
57
+		'Katzgrau\\KLogger\\TrustedLogin_Logger' => __DIR__ . '/..' . '/trustedlogin/client/vendor/TrustedLogin/katzgrau/klogger/src/Logger.php',
58
+		'LoggerTest' => __DIR__ . '/..' . '/katzgrau/klogger/tests/LoggerTest.php',
59
+		'ParagonIE\\Sodium\\Compat' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Compat.php',
60
+		'ParagonIE\\Sodium\\Core\\BLAKE2b' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/BLAKE2b.php',
61
+		'ParagonIE\\Sodium\\Core\\ChaCha20' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/ChaCha20.php',
62
+		'ParagonIE\\Sodium\\Core\\ChaCha20\\Ctx' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/ChaCha20/Ctx.php',
63
+		'ParagonIE\\Sodium\\Core\\ChaCha20\\IetfCtx' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/ChaCha20/IetfCtx.php',
64
+		'ParagonIE\\Sodium\\Core\\Curve25519' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Curve25519.php',
65
+		'ParagonIE\\Sodium\\Core\\Curve25519\\Fe' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Fe.php',
66
+		'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\Cached' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/Cached.php',
67
+		'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\P1p1' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P1p1.php',
68
+		'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\P2' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P2.php',
69
+		'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\P3' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P3.php',
70
+		'ParagonIE\\Sodium\\Core\\Curve25519\\Ge\\Precomp' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/Precomp.php',
71
+		'ParagonIE\\Sodium\\Core\\Curve25519\\H' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Curve25519/H.php',
72
+		'ParagonIE\\Sodium\\Core\\Ed25519' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Ed25519.php',
73
+		'ParagonIE\\Sodium\\Core\\HChaCha20' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/HChaCha20.php',
74
+		'ParagonIE\\Sodium\\Core\\HSalsa20' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/HSalsa20.php',
75
+		'ParagonIE\\Sodium\\Core\\Poly1305' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Poly1305.php',
76
+		'ParagonIE\\Sodium\\Core\\Poly1305\\State' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Poly1305/State.php',
77
+		'ParagonIE\\Sodium\\Core\\Salsa20' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Salsa20.php',
78
+		'ParagonIE\\Sodium\\Core\\SipHash' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/SipHash.php',
79
+		'ParagonIE\\Sodium\\Core\\Util' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Util.php',
80
+		'ParagonIE\\Sodium\\Core\\X25519' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/X25519.php',
81
+		'ParagonIE\\Sodium\\Core\\XChaCha20' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/XChaCha20.php',
82
+		'ParagonIE\\Sodium\\Core\\Xsalsa20' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Core/Xsalsa20.php',
83
+		'ParagonIE\\Sodium\\Crypto' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/Crypto.php',
84
+		'ParagonIE\\Sodium\\File' => __DIR__ . '/..' . '/paragonie/sodium_compat/namespaced/File.php',
85
+		'ParagonIE_Sodium_Compat' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Compat.php',
86
+		'ParagonIE_Sodium_Core32_BLAKE2b' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/BLAKE2b.php',
87
+		'ParagonIE_Sodium_Core32_ChaCha20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/ChaCha20.php',
88
+		'ParagonIE_Sodium_Core32_ChaCha20_Ctx' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/ChaCha20/Ctx.php',
89
+		'ParagonIE_Sodium_Core32_ChaCha20_IetfCtx' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/ChaCha20/IetfCtx.php',
90
+		'ParagonIE_Sodium_Core32_Curve25519' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Curve25519.php',
91
+		'ParagonIE_Sodium_Core32_Curve25519_Fe' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Curve25519/Fe.php',
92
+		'ParagonIE_Sodium_Core32_Curve25519_Ge_Cached' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/Cached.php',
93
+		'ParagonIE_Sodium_Core32_Curve25519_Ge_P1p1' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P1p1.php',
94
+		'ParagonIE_Sodium_Core32_Curve25519_Ge_P2' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P2.php',
95
+		'ParagonIE_Sodium_Core32_Curve25519_Ge_P3' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P3.php',
96
+		'ParagonIE_Sodium_Core32_Curve25519_Ge_Precomp' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Curve25519/Ge/Precomp.php',
97
+		'ParagonIE_Sodium_Core32_Curve25519_H' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Curve25519/H.php',
98
+		'ParagonIE_Sodium_Core32_Ed25519' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Ed25519.php',
99
+		'ParagonIE_Sodium_Core32_HChaCha20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/HChaCha20.php',
100
+		'ParagonIE_Sodium_Core32_HSalsa20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/HSalsa20.php',
101
+		'ParagonIE_Sodium_Core32_Int32' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Int32.php',
102
+		'ParagonIE_Sodium_Core32_Int64' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Int64.php',
103
+		'ParagonIE_Sodium_Core32_Poly1305' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Poly1305.php',
104
+		'ParagonIE_Sodium_Core32_Poly1305_State' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Poly1305/State.php',
105
+		'ParagonIE_Sodium_Core32_Salsa20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Salsa20.php',
106
+		'ParagonIE_Sodium_Core32_SecretStream_State' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/SecretStream/State.php',
107
+		'ParagonIE_Sodium_Core32_SipHash' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/SipHash.php',
108
+		'ParagonIE_Sodium_Core32_Util' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/Util.php',
109
+		'ParagonIE_Sodium_Core32_X25519' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/X25519.php',
110
+		'ParagonIE_Sodium_Core32_XChaCha20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/XChaCha20.php',
111
+		'ParagonIE_Sodium_Core32_XSalsa20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core32/XSalsa20.php',
112
+		'ParagonIE_Sodium_Core_BLAKE2b' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/BLAKE2b.php',
113
+		'ParagonIE_Sodium_Core_Base64_Common' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Base64/Common.php',
114
+		'ParagonIE_Sodium_Core_Base64_Original' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Base64/Original.php',
115
+		'ParagonIE_Sodium_Core_Base64_UrlSafe' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Base64/UrlSafe.php',
116
+		'ParagonIE_Sodium_Core_ChaCha20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/ChaCha20.php',
117
+		'ParagonIE_Sodium_Core_ChaCha20_Ctx' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/ChaCha20/Ctx.php',
118
+		'ParagonIE_Sodium_Core_ChaCha20_IetfCtx' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/ChaCha20/IetfCtx.php',
119
+		'ParagonIE_Sodium_Core_Curve25519' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Curve25519.php',
120
+		'ParagonIE_Sodium_Core_Curve25519_Fe' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Curve25519/Fe.php',
121
+		'ParagonIE_Sodium_Core_Curve25519_Ge_Cached' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/Cached.php',
122
+		'ParagonIE_Sodium_Core_Curve25519_Ge_P1p1' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/P1p1.php',
123
+		'ParagonIE_Sodium_Core_Curve25519_Ge_P2' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/P2.php',
124
+		'ParagonIE_Sodium_Core_Curve25519_Ge_P3' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/P3.php',
125
+		'ParagonIE_Sodium_Core_Curve25519_Ge_Precomp' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Curve25519/Ge/Precomp.php',
126
+		'ParagonIE_Sodium_Core_Curve25519_H' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Curve25519/H.php',
127
+		'ParagonIE_Sodium_Core_Ed25519' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Ed25519.php',
128
+		'ParagonIE_Sodium_Core_HChaCha20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/HChaCha20.php',
129
+		'ParagonIE_Sodium_Core_HSalsa20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/HSalsa20.php',
130
+		'ParagonIE_Sodium_Core_Poly1305' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Poly1305.php',
131
+		'ParagonIE_Sodium_Core_Poly1305_State' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Poly1305/State.php',
132
+		'ParagonIE_Sodium_Core_Ristretto255' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Ristretto255.php',
133
+		'ParagonIE_Sodium_Core_Salsa20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Salsa20.php',
134
+		'ParagonIE_Sodium_Core_SecretStream_State' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/SecretStream/State.php',
135
+		'ParagonIE_Sodium_Core_SipHash' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/SipHash.php',
136
+		'ParagonIE_Sodium_Core_Util' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/Util.php',
137
+		'ParagonIE_Sodium_Core_X25519' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/X25519.php',
138
+		'ParagonIE_Sodium_Core_XChaCha20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/XChaCha20.php',
139
+		'ParagonIE_Sodium_Core_XSalsa20' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Core/XSalsa20.php',
140
+		'ParagonIE_Sodium_Crypto' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Crypto.php',
141
+		'ParagonIE_Sodium_Crypto32' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/Crypto32.php',
142
+		'ParagonIE_Sodium_File' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/File.php',
143
+		'Psr\\Log\\AbstractLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/AbstractLogger.php',
144
+		'Psr\\Log\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/log/Psr/Log/InvalidArgumentException.php',
145
+		'Psr\\Log\\LogLevel' => __DIR__ . '/..' . '/psr/log/Psr/Log/LogLevel.php',
146
+		'Psr\\Log\\LoggerAwareInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerAwareInterface.php',
147
+		'Psr\\Log\\LoggerAwareTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerAwareTrait.php',
148
+		'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php',
149
+		'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php',
150
+		'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php',
151
+		'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/DummyTest.php',
152
+		'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
153
+		'Psr\\Log\\Test\\TestLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/TestLogger.php',
154
+		'SodiumException' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/SodiumException.php',
155
+		'SplFixedArray' => __DIR__ . '/..' . '/paragonie/sodium_compat/src/PHP52/SplFixedArray.php',
156
+		'TrustedLoginAJAXTest' => __DIR__ . '/..' . '/trustedlogin/client/tests/test-ajax.php',
157
+		'TrustedLoginConfigTest' => __DIR__ . '/..' . '/trustedlogin/client/tests/test-config.php',
158
+		'TrustedLoginUsersTest' => __DIR__ . '/..' . '/trustedlogin/client/tests/test-users.php',
159
+		'TrustedLogin\\Admin' => __DIR__ . '/..' . '/trustedlogin/client/src/Admin.php',
160
+		'TrustedLogin\\Ajax' => __DIR__ . '/..' . '/trustedlogin/client/src/Ajax.php',
161
+		'TrustedLogin\\Client' => __DIR__ . '/..' . '/trustedlogin/client/src/Client.php',
162
+		'TrustedLogin\\Config' => __DIR__ . '/..' . '/trustedlogin/client/src/Config.php',
163
+		'TrustedLogin\\Cron' => __DIR__ . '/..' . '/trustedlogin/client/src/Cron.php',
164
+		'TrustedLogin\\Encryption' => __DIR__ . '/..' . '/trustedlogin/client/src/Encryption.php',
165
+		'TrustedLogin\\Endpoint' => __DIR__ . '/..' . '/trustedlogin/client/src/Endpoint.php',
166
+		'TrustedLogin\\Envelope' => __DIR__ . '/..' . '/trustedlogin/client/src/Envelope.php',
167
+		'TrustedLogin\\Logging' => __DIR__ . '/..' . '/trustedlogin/client/src/Logging.php',
168
+		'TrustedLogin\\Remote' => __DIR__ . '/..' . '/trustedlogin/client/src/Remote.php',
169
+		'TrustedLogin\\SecurityChecks' => __DIR__ . '/..' . '/trustedlogin/client/src/SecurityChecks.php',
170
+		'TrustedLogin\\SiteAccess' => __DIR__ . '/..' . '/trustedlogin/client/src/SiteAccess.php',
171
+		'TrustedLogin\\SupportRole' => __DIR__ . '/..' . '/trustedlogin/client/src/SupportRole.php',
172
+		'TrustedLogin\\SupportUser' => __DIR__ . '/..' . '/trustedlogin/client/src/SupportUser.php',
173
+		'TrustedLogin\\TrustedLoginClientTest' => __DIR__ . '/..' . '/trustedlogin/client/tests/test-client.php',
174
+		'TrustedLogin\\TrustedLoginEncryptionTest' => __DIR__ . '/..' . '/trustedlogin/client/tests/test-encryption.php',
175
+		'TrustedLogin\\TrustedLoginLoggingTest' => __DIR__ . '/..' . '/trustedlogin/client/tests/test-logging.php',
176
+		'TrustedLogin\\TrustedLoginRemoteTest' => __DIR__ . '/..' . '/trustedlogin/client/tests/test-remote.php',
177
+		'TrustedLogin\\TrustedLoginSiteAccessTest' => __DIR__ . '/..' . '/trustedlogin/client/tests/test-siteaccess.php',
178
+		'TypeError' => __DIR__ . '/..' . '/paragonie/random_compat/lib/error_polyfill.php',
179
+	);
180 180
 
181
-    public static function getInitializer(ClassLoader $loader)
182
-    {
183
-        return \Closure::bind(function () use ($loader) {
184
-            $loader->prefixLengthsPsr4 = ComposerStaticInit984ed95bef2b0e3d4eeb0208a88dc67d::$prefixLengthsPsr4;
185
-            $loader->prefixDirsPsr4 = ComposerStaticInit984ed95bef2b0e3d4eeb0208a88dc67d::$prefixDirsPsr4;
186
-            $loader->classMap = ComposerStaticInit984ed95bef2b0e3d4eeb0208a88dc67d::$classMap;
181
+	public static function getInitializer(ClassLoader $loader)
182
+	{
183
+		return \Closure::bind(function () use ($loader) {
184
+			$loader->prefixLengthsPsr4 = ComposerStaticInit984ed95bef2b0e3d4eeb0208a88dc67d::$prefixLengthsPsr4;
185
+			$loader->prefixDirsPsr4 = ComposerStaticInit984ed95bef2b0e3d4eeb0208a88dc67d::$prefixDirsPsr4;
186
+			$loader->classMap = ComposerStaticInit984ed95bef2b0e3d4eeb0208a88dc67d::$classMap;
187 187
 
188
-        }, null, ClassLoader::class);
189
-    }
188
+		}, null, ClassLoader::class);
189
+	}
190 190
 }
Please login to merge, or discard this patch.
vendor/composer/ClassLoader.php 1 patch
Indentation   +514 added lines, -514 removed lines patch added patch discarded remove patch
@@ -42,519 +42,519 @@  discard block
 block discarded – undo
42 42
  */
43 43
 class ClassLoader
44 44
 {
45
-    /** @var ?string */
46
-    private $vendorDir;
47
-
48
-    // PSR-4
49
-    /**
50
-     * @var array[]
51
-     * @psalm-var array<string, array<string, int>>
52
-     */
53
-    private $prefixLengthsPsr4 = array();
54
-    /**
55
-     * @var array[]
56
-     * @psalm-var array<string, array<int, string>>
57
-     */
58
-    private $prefixDirsPsr4 = array();
59
-    /**
60
-     * @var array[]
61
-     * @psalm-var array<string, string>
62
-     */
63
-    private $fallbackDirsPsr4 = array();
64
-
65
-    // PSR-0
66
-    /**
67
-     * @var array[]
68
-     * @psalm-var array<string, array<string, string[]>>
69
-     */
70
-    private $prefixesPsr0 = array();
71
-    /**
72
-     * @var array[]
73
-     * @psalm-var array<string, string>
74
-     */
75
-    private $fallbackDirsPsr0 = array();
76
-
77
-    /** @var bool */
78
-    private $useIncludePath = false;
79
-
80
-    /**
81
-     * @var string[]
82
-     * @psalm-var array<string, string>
83
-     */
84
-    private $classMap = array();
85
-
86
-    /** @var bool */
87
-    private $classMapAuthoritative = false;
88
-
89
-    /**
90
-     * @var bool[]
91
-     * @psalm-var array<string, bool>
92
-     */
93
-    private $missingClasses = array();
94
-
95
-    /** @var ?string */
96
-    private $apcuPrefix;
97
-
98
-    /**
99
-     * @var self[]
100
-     */
101
-    private static $registeredLoaders = array();
102
-
103
-    /**
104
-     * @param ?string $vendorDir
105
-     */
106
-    public function __construct($vendorDir = null)
107
-    {
108
-        $this->vendorDir = $vendorDir;
109
-    }
110
-
111
-    /**
112
-     * @return string[]
113
-     */
114
-    public function getPrefixes()
115
-    {
116
-        if (!empty($this->prefixesPsr0)) {
117
-            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
118
-        }
119
-
120
-        return array();
121
-    }
122
-
123
-    /**
124
-     * @return array[]
125
-     * @psalm-return array<string, array<int, string>>
126
-     */
127
-    public function getPrefixesPsr4()
128
-    {
129
-        return $this->prefixDirsPsr4;
130
-    }
131
-
132
-    /**
133
-     * @return array[]
134
-     * @psalm-return array<string, string>
135
-     */
136
-    public function getFallbackDirs()
137
-    {
138
-        return $this->fallbackDirsPsr0;
139
-    }
140
-
141
-    /**
142
-     * @return array[]
143
-     * @psalm-return array<string, string>
144
-     */
145
-    public function getFallbackDirsPsr4()
146
-    {
147
-        return $this->fallbackDirsPsr4;
148
-    }
149
-
150
-    /**
151
-     * @return string[] Array of classname => path
152
-     * @psalm-return array<string, string>
153
-     */
154
-    public function getClassMap()
155
-    {
156
-        return $this->classMap;
157
-    }
158
-
159
-    /**
160
-     * @param string[] $classMap Class to filename map
161
-     * @psalm-param array<string, string> $classMap
162
-     *
163
-     * @return void
164
-     */
165
-    public function addClassMap(array $classMap)
166
-    {
167
-        if ($this->classMap) {
168
-            $this->classMap = array_merge($this->classMap, $classMap);
169
-        } else {
170
-            $this->classMap = $classMap;
171
-        }
172
-    }
173
-
174
-    /**
175
-     * Registers a set of PSR-0 directories for a given prefix, either
176
-     * appending or prepending to the ones previously set for this prefix.
177
-     *
178
-     * @param string          $prefix  The prefix
179
-     * @param string[]|string $paths   The PSR-0 root directories
180
-     * @param bool            $prepend Whether to prepend the directories
181
-     *
182
-     * @return void
183
-     */
184
-    public function add($prefix, $paths, $prepend = false)
185
-    {
186
-        if (!$prefix) {
187
-            if ($prepend) {
188
-                $this->fallbackDirsPsr0 = array_merge(
189
-                    (array) $paths,
190
-                    $this->fallbackDirsPsr0
191
-                );
192
-            } else {
193
-                $this->fallbackDirsPsr0 = array_merge(
194
-                    $this->fallbackDirsPsr0,
195
-                    (array) $paths
196
-                );
197
-            }
198
-
199
-            return;
200
-        }
201
-
202
-        $first = $prefix[0];
203
-        if (!isset($this->prefixesPsr0[$first][$prefix])) {
204
-            $this->prefixesPsr0[$first][$prefix] = (array) $paths;
205
-
206
-            return;
207
-        }
208
-        if ($prepend) {
209
-            $this->prefixesPsr0[$first][$prefix] = array_merge(
210
-                (array) $paths,
211
-                $this->prefixesPsr0[$first][$prefix]
212
-            );
213
-        } else {
214
-            $this->prefixesPsr0[$first][$prefix] = array_merge(
215
-                $this->prefixesPsr0[$first][$prefix],
216
-                (array) $paths
217
-            );
218
-        }
219
-    }
220
-
221
-    /**
222
-     * Registers a set of PSR-4 directories for a given namespace, either
223
-     * appending or prepending to the ones previously set for this namespace.
224
-     *
225
-     * @param string          $prefix  The prefix/namespace, with trailing '\\'
226
-     * @param string[]|string $paths   The PSR-4 base directories
227
-     * @param bool            $prepend Whether to prepend the directories
228
-     *
229
-     * @throws \InvalidArgumentException
230
-     *
231
-     * @return void
232
-     */
233
-    public function addPsr4($prefix, $paths, $prepend = false)
234
-    {
235
-        if (!$prefix) {
236
-            // Register directories for the root namespace.
237
-            if ($prepend) {
238
-                $this->fallbackDirsPsr4 = array_merge(
239
-                    (array) $paths,
240
-                    $this->fallbackDirsPsr4
241
-                );
242
-            } else {
243
-                $this->fallbackDirsPsr4 = array_merge(
244
-                    $this->fallbackDirsPsr4,
245
-                    (array) $paths
246
-                );
247
-            }
248
-        } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
249
-            // Register directories for a new namespace.
250
-            $length = strlen($prefix);
251
-            if ('\\' !== $prefix[$length - 1]) {
252
-                throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
253
-            }
254
-            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
255
-            $this->prefixDirsPsr4[$prefix] = (array) $paths;
256
-        } elseif ($prepend) {
257
-            // Prepend directories for an already registered namespace.
258
-            $this->prefixDirsPsr4[$prefix] = array_merge(
259
-                (array) $paths,
260
-                $this->prefixDirsPsr4[$prefix]
261
-            );
262
-        } else {
263
-            // Append directories for an already registered namespace.
264
-            $this->prefixDirsPsr4[$prefix] = array_merge(
265
-                $this->prefixDirsPsr4[$prefix],
266
-                (array) $paths
267
-            );
268
-        }
269
-    }
270
-
271
-    /**
272
-     * Registers a set of PSR-0 directories for a given prefix,
273
-     * replacing any others previously set for this prefix.
274
-     *
275
-     * @param string          $prefix The prefix
276
-     * @param string[]|string $paths  The PSR-0 base directories
277
-     *
278
-     * @return void
279
-     */
280
-    public function set($prefix, $paths)
281
-    {
282
-        if (!$prefix) {
283
-            $this->fallbackDirsPsr0 = (array) $paths;
284
-        } else {
285
-            $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
286
-        }
287
-    }
288
-
289
-    /**
290
-     * Registers a set of PSR-4 directories for a given namespace,
291
-     * replacing any others previously set for this namespace.
292
-     *
293
-     * @param string          $prefix The prefix/namespace, with trailing '\\'
294
-     * @param string[]|string $paths  The PSR-4 base directories
295
-     *
296
-     * @throws \InvalidArgumentException
297
-     *
298
-     * @return void
299
-     */
300
-    public function setPsr4($prefix, $paths)
301
-    {
302
-        if (!$prefix) {
303
-            $this->fallbackDirsPsr4 = (array) $paths;
304
-        } else {
305
-            $length = strlen($prefix);
306
-            if ('\\' !== $prefix[$length - 1]) {
307
-                throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
308
-            }
309
-            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
310
-            $this->prefixDirsPsr4[$prefix] = (array) $paths;
311
-        }
312
-    }
313
-
314
-    /**
315
-     * Turns on searching the include path for class files.
316
-     *
317
-     * @param bool $useIncludePath
318
-     *
319
-     * @return void
320
-     */
321
-    public function setUseIncludePath($useIncludePath)
322
-    {
323
-        $this->useIncludePath = $useIncludePath;
324
-    }
325
-
326
-    /**
327
-     * Can be used to check if the autoloader uses the include path to check
328
-     * for classes.
329
-     *
330
-     * @return bool
331
-     */
332
-    public function getUseIncludePath()
333
-    {
334
-        return $this->useIncludePath;
335
-    }
336
-
337
-    /**
338
-     * Turns off searching the prefix and fallback directories for classes
339
-     * that have not been registered with the class map.
340
-     *
341
-     * @param bool $classMapAuthoritative
342
-     *
343
-     * @return void
344
-     */
345
-    public function setClassMapAuthoritative($classMapAuthoritative)
346
-    {
347
-        $this->classMapAuthoritative = $classMapAuthoritative;
348
-    }
349
-
350
-    /**
351
-     * Should class lookup fail if not found in the current class map?
352
-     *
353
-     * @return bool
354
-     */
355
-    public function isClassMapAuthoritative()
356
-    {
357
-        return $this->classMapAuthoritative;
358
-    }
359
-
360
-    /**
361
-     * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
362
-     *
363
-     * @param string|null $apcuPrefix
364
-     *
365
-     * @return void
366
-     */
367
-    public function setApcuPrefix($apcuPrefix)
368
-    {
369
-        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
370
-    }
371
-
372
-    /**
373
-     * The APCu prefix in use, or null if APCu caching is not enabled.
374
-     *
375
-     * @return string|null
376
-     */
377
-    public function getApcuPrefix()
378
-    {
379
-        return $this->apcuPrefix;
380
-    }
381
-
382
-    /**
383
-     * Registers this instance as an autoloader.
384
-     *
385
-     * @param bool $prepend Whether to prepend the autoloader or not
386
-     *
387
-     * @return void
388
-     */
389
-    public function register($prepend = false)
390
-    {
391
-        spl_autoload_register(array($this, 'loadClass'), true, $prepend);
392
-
393
-        if (null === $this->vendorDir) {
394
-            return;
395
-        }
396
-
397
-        if ($prepend) {
398
-            self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
399
-        } else {
400
-            unset(self::$registeredLoaders[$this->vendorDir]);
401
-            self::$registeredLoaders[$this->vendorDir] = $this;
402
-        }
403
-    }
404
-
405
-    /**
406
-     * Unregisters this instance as an autoloader.
407
-     *
408
-     * @return void
409
-     */
410
-    public function unregister()
411
-    {
412
-        spl_autoload_unregister(array($this, 'loadClass'));
413
-
414
-        if (null !== $this->vendorDir) {
415
-            unset(self::$registeredLoaders[$this->vendorDir]);
416
-        }
417
-    }
418
-
419
-    /**
420
-     * Loads the given class or interface.
421
-     *
422
-     * @param  string    $class The name of the class
423
-     * @return true|null True if loaded, null otherwise
424
-     */
425
-    public function loadClass($class)
426
-    {
427
-        if ($file = $this->findFile($class)) {
428
-            includeFile($file);
429
-
430
-            return true;
431
-        }
432
-
433
-        return null;
434
-    }
435
-
436
-    /**
437
-     * Finds the path to the file where the class is defined.
438
-     *
439
-     * @param string $class The name of the class
440
-     *
441
-     * @return string|false The path if found, false otherwise
442
-     */
443
-    public function findFile($class)
444
-    {
445
-        // class map lookup
446
-        if (isset($this->classMap[$class])) {
447
-            return $this->classMap[$class];
448
-        }
449
-        if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
450
-            return false;
451
-        }
452
-        if (null !== $this->apcuPrefix) {
453
-            $file = apcu_fetch($this->apcuPrefix.$class, $hit);
454
-            if ($hit) {
455
-                return $file;
456
-            }
457
-        }
458
-
459
-        $file = $this->findFileWithExtension($class, '.php');
460
-
461
-        // Search for Hack files if we are running on HHVM
462
-        if (false === $file && defined('HHVM_VERSION')) {
463
-            $file = $this->findFileWithExtension($class, '.hh');
464
-        }
465
-
466
-        if (null !== $this->apcuPrefix) {
467
-            apcu_add($this->apcuPrefix.$class, $file);
468
-        }
469
-
470
-        if (false === $file) {
471
-            // Remember that this class does not exist.
472
-            $this->missingClasses[$class] = true;
473
-        }
474
-
475
-        return $file;
476
-    }
477
-
478
-    /**
479
-     * Returns the currently registered loaders indexed by their corresponding vendor directories.
480
-     *
481
-     * @return self[]
482
-     */
483
-    public static function getRegisteredLoaders()
484
-    {
485
-        return self::$registeredLoaders;
486
-    }
487
-
488
-    /**
489
-     * @param  string       $class
490
-     * @param  string       $ext
491
-     * @return string|false
492
-     */
493
-    private function findFileWithExtension($class, $ext)
494
-    {
495
-        // PSR-4 lookup
496
-        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
497
-
498
-        $first = $class[0];
499
-        if (isset($this->prefixLengthsPsr4[$first])) {
500
-            $subPath = $class;
501
-            while (false !== $lastPos = strrpos($subPath, '\\')) {
502
-                $subPath = substr($subPath, 0, $lastPos);
503
-                $search = $subPath . '\\';
504
-                if (isset($this->prefixDirsPsr4[$search])) {
505
-                    $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
506
-                    foreach ($this->prefixDirsPsr4[$search] as $dir) {
507
-                        if (file_exists($file = $dir . $pathEnd)) {
508
-                            return $file;
509
-                        }
510
-                    }
511
-                }
512
-            }
513
-        }
514
-
515
-        // PSR-4 fallback dirs
516
-        foreach ($this->fallbackDirsPsr4 as $dir) {
517
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
518
-                return $file;
519
-            }
520
-        }
521
-
522
-        // PSR-0 lookup
523
-        if (false !== $pos = strrpos($class, '\\')) {
524
-            // namespaced class name
525
-            $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
526
-                . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
527
-        } else {
528
-            // PEAR-like class name
529
-            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
530
-        }
531
-
532
-        if (isset($this->prefixesPsr0[$first])) {
533
-            foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
534
-                if (0 === strpos($class, $prefix)) {
535
-                    foreach ($dirs as $dir) {
536
-                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
537
-                            return $file;
538
-                        }
539
-                    }
540
-                }
541
-            }
542
-        }
543
-
544
-        // PSR-0 fallback dirs
545
-        foreach ($this->fallbackDirsPsr0 as $dir) {
546
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
547
-                return $file;
548
-            }
549
-        }
550
-
551
-        // PSR-0 include paths.
552
-        if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
553
-            return $file;
554
-        }
555
-
556
-        return false;
557
-    }
45
+	/** @var ?string */
46
+	private $vendorDir;
47
+
48
+	// PSR-4
49
+	/**
50
+	 * @var array[]
51
+	 * @psalm-var array<string, array<string, int>>
52
+	 */
53
+	private $prefixLengthsPsr4 = array();
54
+	/**
55
+	 * @var array[]
56
+	 * @psalm-var array<string, array<int, string>>
57
+	 */
58
+	private $prefixDirsPsr4 = array();
59
+	/**
60
+	 * @var array[]
61
+	 * @psalm-var array<string, string>
62
+	 */
63
+	private $fallbackDirsPsr4 = array();
64
+
65
+	// PSR-0
66
+	/**
67
+	 * @var array[]
68
+	 * @psalm-var array<string, array<string, string[]>>
69
+	 */
70
+	private $prefixesPsr0 = array();
71
+	/**
72
+	 * @var array[]
73
+	 * @psalm-var array<string, string>
74
+	 */
75
+	private $fallbackDirsPsr0 = array();
76
+
77
+	/** @var bool */
78
+	private $useIncludePath = false;
79
+
80
+	/**
81
+	 * @var string[]
82
+	 * @psalm-var array<string, string>
83
+	 */
84
+	private $classMap = array();
85
+
86
+	/** @var bool */
87
+	private $classMapAuthoritative = false;
88
+
89
+	/**
90
+	 * @var bool[]
91
+	 * @psalm-var array<string, bool>
92
+	 */
93
+	private $missingClasses = array();
94
+
95
+	/** @var ?string */
96
+	private $apcuPrefix;
97
+
98
+	/**
99
+	 * @var self[]
100
+	 */
101
+	private static $registeredLoaders = array();
102
+
103
+	/**
104
+	 * @param ?string $vendorDir
105
+	 */
106
+	public function __construct($vendorDir = null)
107
+	{
108
+		$this->vendorDir = $vendorDir;
109
+	}
110
+
111
+	/**
112
+	 * @return string[]
113
+	 */
114
+	public function getPrefixes()
115
+	{
116
+		if (!empty($this->prefixesPsr0)) {
117
+			return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
118
+		}
119
+
120
+		return array();
121
+	}
122
+
123
+	/**
124
+	 * @return array[]
125
+	 * @psalm-return array<string, array<int, string>>
126
+	 */
127
+	public function getPrefixesPsr4()
128
+	{
129
+		return $this->prefixDirsPsr4;
130
+	}
131
+
132
+	/**
133
+	 * @return array[]
134
+	 * @psalm-return array<string, string>
135
+	 */
136
+	public function getFallbackDirs()
137
+	{
138
+		return $this->fallbackDirsPsr0;
139
+	}
140
+
141
+	/**
142
+	 * @return array[]
143
+	 * @psalm-return array<string, string>
144
+	 */
145
+	public function getFallbackDirsPsr4()
146
+	{
147
+		return $this->fallbackDirsPsr4;
148
+	}
149
+
150
+	/**
151
+	 * @return string[] Array of classname => path
152
+	 * @psalm-return array<string, string>
153
+	 */
154
+	public function getClassMap()
155
+	{
156
+		return $this->classMap;
157
+	}
158
+
159
+	/**
160
+	 * @param string[] $classMap Class to filename map
161
+	 * @psalm-param array<string, string> $classMap
162
+	 *
163
+	 * @return void
164
+	 */
165
+	public function addClassMap(array $classMap)
166
+	{
167
+		if ($this->classMap) {
168
+			$this->classMap = array_merge($this->classMap, $classMap);
169
+		} else {
170
+			$this->classMap = $classMap;
171
+		}
172
+	}
173
+
174
+	/**
175
+	 * Registers a set of PSR-0 directories for a given prefix, either
176
+	 * appending or prepending to the ones previously set for this prefix.
177
+	 *
178
+	 * @param string          $prefix  The prefix
179
+	 * @param string[]|string $paths   The PSR-0 root directories
180
+	 * @param bool            $prepend Whether to prepend the directories
181
+	 *
182
+	 * @return void
183
+	 */
184
+	public function add($prefix, $paths, $prepend = false)
185
+	{
186
+		if (!$prefix) {
187
+			if ($prepend) {
188
+				$this->fallbackDirsPsr0 = array_merge(
189
+					(array) $paths,
190
+					$this->fallbackDirsPsr0
191
+				);
192
+			} else {
193
+				$this->fallbackDirsPsr0 = array_merge(
194
+					$this->fallbackDirsPsr0,
195
+					(array) $paths
196
+				);
197
+			}
198
+
199
+			return;
200
+		}
201
+
202
+		$first = $prefix[0];
203
+		if (!isset($this->prefixesPsr0[$first][$prefix])) {
204
+			$this->prefixesPsr0[$first][$prefix] = (array) $paths;
205
+
206
+			return;
207
+		}
208
+		if ($prepend) {
209
+			$this->prefixesPsr0[$first][$prefix] = array_merge(
210
+				(array) $paths,
211
+				$this->prefixesPsr0[$first][$prefix]
212
+			);
213
+		} else {
214
+			$this->prefixesPsr0[$first][$prefix] = array_merge(
215
+				$this->prefixesPsr0[$first][$prefix],
216
+				(array) $paths
217
+			);
218
+		}
219
+	}
220
+
221
+	/**
222
+	 * Registers a set of PSR-4 directories for a given namespace, either
223
+	 * appending or prepending to the ones previously set for this namespace.
224
+	 *
225
+	 * @param string          $prefix  The prefix/namespace, with trailing '\\'
226
+	 * @param string[]|string $paths   The PSR-4 base directories
227
+	 * @param bool            $prepend Whether to prepend the directories
228
+	 *
229
+	 * @throws \InvalidArgumentException
230
+	 *
231
+	 * @return void
232
+	 */
233
+	public function addPsr4($prefix, $paths, $prepend = false)
234
+	{
235
+		if (!$prefix) {
236
+			// Register directories for the root namespace.
237
+			if ($prepend) {
238
+				$this->fallbackDirsPsr4 = array_merge(
239
+					(array) $paths,
240
+					$this->fallbackDirsPsr4
241
+				);
242
+			} else {
243
+				$this->fallbackDirsPsr4 = array_merge(
244
+					$this->fallbackDirsPsr4,
245
+					(array) $paths
246
+				);
247
+			}
248
+		} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
249
+			// Register directories for a new namespace.
250
+			$length = strlen($prefix);
251
+			if ('\\' !== $prefix[$length - 1]) {
252
+				throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
253
+			}
254
+			$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
255
+			$this->prefixDirsPsr4[$prefix] = (array) $paths;
256
+		} elseif ($prepend) {
257
+			// Prepend directories for an already registered namespace.
258
+			$this->prefixDirsPsr4[$prefix] = array_merge(
259
+				(array) $paths,
260
+				$this->prefixDirsPsr4[$prefix]
261
+			);
262
+		} else {
263
+			// Append directories for an already registered namespace.
264
+			$this->prefixDirsPsr4[$prefix] = array_merge(
265
+				$this->prefixDirsPsr4[$prefix],
266
+				(array) $paths
267
+			);
268
+		}
269
+	}
270
+
271
+	/**
272
+	 * Registers a set of PSR-0 directories for a given prefix,
273
+	 * replacing any others previously set for this prefix.
274
+	 *
275
+	 * @param string          $prefix The prefix
276
+	 * @param string[]|string $paths  The PSR-0 base directories
277
+	 *
278
+	 * @return void
279
+	 */
280
+	public function set($prefix, $paths)
281
+	{
282
+		if (!$prefix) {
283
+			$this->fallbackDirsPsr0 = (array) $paths;
284
+		} else {
285
+			$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
286
+		}
287
+	}
288
+
289
+	/**
290
+	 * Registers a set of PSR-4 directories for a given namespace,
291
+	 * replacing any others previously set for this namespace.
292
+	 *
293
+	 * @param string          $prefix The prefix/namespace, with trailing '\\'
294
+	 * @param string[]|string $paths  The PSR-4 base directories
295
+	 *
296
+	 * @throws \InvalidArgumentException
297
+	 *
298
+	 * @return void
299
+	 */
300
+	public function setPsr4($prefix, $paths)
301
+	{
302
+		if (!$prefix) {
303
+			$this->fallbackDirsPsr4 = (array) $paths;
304
+		} else {
305
+			$length = strlen($prefix);
306
+			if ('\\' !== $prefix[$length - 1]) {
307
+				throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
308
+			}
309
+			$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
310
+			$this->prefixDirsPsr4[$prefix] = (array) $paths;
311
+		}
312
+	}
313
+
314
+	/**
315
+	 * Turns on searching the include path for class files.
316
+	 *
317
+	 * @param bool $useIncludePath
318
+	 *
319
+	 * @return void
320
+	 */
321
+	public function setUseIncludePath($useIncludePath)
322
+	{
323
+		$this->useIncludePath = $useIncludePath;
324
+	}
325
+
326
+	/**
327
+	 * Can be used to check if the autoloader uses the include path to check
328
+	 * for classes.
329
+	 *
330
+	 * @return bool
331
+	 */
332
+	public function getUseIncludePath()
333
+	{
334
+		return $this->useIncludePath;
335
+	}
336
+
337
+	/**
338
+	 * Turns off searching the prefix and fallback directories for classes
339
+	 * that have not been registered with the class map.
340
+	 *
341
+	 * @param bool $classMapAuthoritative
342
+	 *
343
+	 * @return void
344
+	 */
345
+	public function setClassMapAuthoritative($classMapAuthoritative)
346
+	{
347
+		$this->classMapAuthoritative = $classMapAuthoritative;
348
+	}
349
+
350
+	/**
351
+	 * Should class lookup fail if not found in the current class map?
352
+	 *
353
+	 * @return bool
354
+	 */
355
+	public function isClassMapAuthoritative()
356
+	{
357
+		return $this->classMapAuthoritative;
358
+	}
359
+
360
+	/**
361
+	 * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
362
+	 *
363
+	 * @param string|null $apcuPrefix
364
+	 *
365
+	 * @return void
366
+	 */
367
+	public function setApcuPrefix($apcuPrefix)
368
+	{
369
+		$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
370
+	}
371
+
372
+	/**
373
+	 * The APCu prefix in use, or null if APCu caching is not enabled.
374
+	 *
375
+	 * @return string|null
376
+	 */
377
+	public function getApcuPrefix()
378
+	{
379
+		return $this->apcuPrefix;
380
+	}
381
+
382
+	/**
383
+	 * Registers this instance as an autoloader.
384
+	 *
385
+	 * @param bool $prepend Whether to prepend the autoloader or not
386
+	 *
387
+	 * @return void
388
+	 */
389
+	public function register($prepend = false)
390
+	{
391
+		spl_autoload_register(array($this, 'loadClass'), true, $prepend);
392
+
393
+		if (null === $this->vendorDir) {
394
+			return;
395
+		}
396
+
397
+		if ($prepend) {
398
+			self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
399
+		} else {
400
+			unset(self::$registeredLoaders[$this->vendorDir]);
401
+			self::$registeredLoaders[$this->vendorDir] = $this;
402
+		}
403
+	}
404
+
405
+	/**
406
+	 * Unregisters this instance as an autoloader.
407
+	 *
408
+	 * @return void
409
+	 */
410
+	public function unregister()
411
+	{
412
+		spl_autoload_unregister(array($this, 'loadClass'));
413
+
414
+		if (null !== $this->vendorDir) {
415
+			unset(self::$registeredLoaders[$this->vendorDir]);
416
+		}
417
+	}
418
+
419
+	/**
420
+	 * Loads the given class or interface.
421
+	 *
422
+	 * @param  string    $class The name of the class
423
+	 * @return true|null True if loaded, null otherwise
424
+	 */
425
+	public function loadClass($class)
426
+	{
427
+		if ($file = $this->findFile($class)) {
428
+			includeFile($file);
429
+
430
+			return true;
431
+		}
432
+
433
+		return null;
434
+	}
435
+
436
+	/**
437
+	 * Finds the path to the file where the class is defined.
438
+	 *
439
+	 * @param string $class The name of the class
440
+	 *
441
+	 * @return string|false The path if found, false otherwise
442
+	 */
443
+	public function findFile($class)
444
+	{
445
+		// class map lookup
446
+		if (isset($this->classMap[$class])) {
447
+			return $this->classMap[$class];
448
+		}
449
+		if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
450
+			return false;
451
+		}
452
+		if (null !== $this->apcuPrefix) {
453
+			$file = apcu_fetch($this->apcuPrefix.$class, $hit);
454
+			if ($hit) {
455
+				return $file;
456
+			}
457
+		}
458
+
459
+		$file = $this->findFileWithExtension($class, '.php');
460
+
461
+		// Search for Hack files if we are running on HHVM
462
+		if (false === $file && defined('HHVM_VERSION')) {
463
+			$file = $this->findFileWithExtension($class, '.hh');
464
+		}
465
+
466
+		if (null !== $this->apcuPrefix) {
467
+			apcu_add($this->apcuPrefix.$class, $file);
468
+		}
469
+
470
+		if (false === $file) {
471
+			// Remember that this class does not exist.
472
+			$this->missingClasses[$class] = true;
473
+		}
474
+
475
+		return $file;
476
+	}
477
+
478
+	/**
479
+	 * Returns the currently registered loaders indexed by their corresponding vendor directories.
480
+	 *
481
+	 * @return self[]
482
+	 */
483
+	public static function getRegisteredLoaders()
484
+	{
485
+		return self::$registeredLoaders;
486
+	}
487
+
488
+	/**
489
+	 * @param  string       $class
490
+	 * @param  string       $ext
491
+	 * @return string|false
492
+	 */
493
+	private function findFileWithExtension($class, $ext)
494
+	{
495
+		// PSR-4 lookup
496
+		$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
497
+
498
+		$first = $class[0];
499
+		if (isset($this->prefixLengthsPsr4[$first])) {
500
+			$subPath = $class;
501
+			while (false !== $lastPos = strrpos($subPath, '\\')) {
502
+				$subPath = substr($subPath, 0, $lastPos);
503
+				$search = $subPath . '\\';
504
+				if (isset($this->prefixDirsPsr4[$search])) {
505
+					$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
506
+					foreach ($this->prefixDirsPsr4[$search] as $dir) {
507
+						if (file_exists($file = $dir . $pathEnd)) {
508
+							return $file;
509
+						}
510
+					}
511
+				}
512
+			}
513
+		}
514
+
515
+		// PSR-4 fallback dirs
516
+		foreach ($this->fallbackDirsPsr4 as $dir) {
517
+			if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
518
+				return $file;
519
+			}
520
+		}
521
+
522
+		// PSR-0 lookup
523
+		if (false !== $pos = strrpos($class, '\\')) {
524
+			// namespaced class name
525
+			$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
526
+				. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
527
+		} else {
528
+			// PEAR-like class name
529
+			$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
530
+		}
531
+
532
+		if (isset($this->prefixesPsr0[$first])) {
533
+			foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
534
+				if (0 === strpos($class, $prefix)) {
535
+					foreach ($dirs as $dir) {
536
+						if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
537
+							return $file;
538
+						}
539
+					}
540
+				}
541
+			}
542
+		}
543
+
544
+		// PSR-0 fallback dirs
545
+		foreach ($this->fallbackDirsPsr0 as $dir) {
546
+			if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
547
+				return $file;
548
+			}
549
+		}
550
+
551
+		// PSR-0 include paths.
552
+		if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
553
+			return $file;
554
+		}
555
+
556
+		return false;
557
+	}
558 558
 }
559 559
 
560 560
 /**
@@ -568,5 +568,5 @@  discard block
 block discarded – undo
568 568
  */
569 569
 function includeFile($file)
570 570
 {
571
-    include $file;
571
+	include $file;
572 572
 }
Please login to merge, or discard this patch.