@@ -21,14 +21,14 @@ discard block |
||
| 21 | 21 | * |
| 22 | 22 | * @var array |
| 23 | 23 | */ |
| 24 | - protected $services = []; |
|
| 24 | + protected $services = [ ]; |
|
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * The container's bucket items |
| 28 | 28 | * |
| 29 | 29 | * @var array |
| 30 | 30 | */ |
| 31 | - protected $bucket = []; |
|
| 31 | + protected $bucket = [ ]; |
|
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * Set the globally available instance of the container. |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public static function getInstance() |
| 39 | 39 | { |
| 40 | - if( is_null( static::$instance )) { |
|
| 40 | + if( is_null( static::$instance ) ) { |
|
| 41 | 41 | static::$instance = new static; |
| 42 | 42 | } |
| 43 | 43 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public function bind( $alias, $concrete ) |
| 56 | 56 | { |
| 57 | - $this->services[$alias] = $concrete; |
|
| 57 | + $this->services[ $alias ] = $concrete; |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /** |
@@ -68,14 +68,14 @@ discard block |
||
| 68 | 68 | */ |
| 69 | 69 | public function make( $abstract ) |
| 70 | 70 | { |
| 71 | - $service = isset( $this->services[$abstract] ) |
|
| 72 | - ? $this->services[$abstract] |
|
| 71 | + $service = isset( $this->services[ $abstract ] ) |
|
| 72 | + ? $this->services[ $abstract ] |
|
| 73 | 73 | : $this->addNamespace( $abstract ); |
| 74 | 74 | |
| 75 | - if( is_callable( $service )) { |
|
| 76 | - return call_user_func_array( $service, [$this] ); |
|
| 75 | + if( is_callable( $service ) ) { |
|
| 76 | + return call_user_func_array( $service, [ $this ] ); |
|
| 77 | 77 | } |
| 78 | - if( is_object( $service )) { |
|
| 78 | + if( is_object( $service ) ) { |
|
| 79 | 79 | return $service; |
| 80 | 80 | } |
| 81 | 81 | |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | */ |
| 93 | 93 | public function singleton( $abstract, $concrete ) |
| 94 | 94 | { |
| 95 | - $this->bind( $abstract, $this->make( $concrete )); |
|
| 95 | + $this->bind( $abstract, $this->make( $concrete ) ); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | /** |
@@ -104,8 +104,8 @@ discard block |
||
| 104 | 104 | */ |
| 105 | 105 | public function __get( $item ) |
| 106 | 106 | { |
| 107 | - return isset( $this->bucket[$item] ) |
|
| 108 | - ? $this->bucket[$item] |
|
| 107 | + return isset( $this->bucket[ $item ] ) |
|
| 108 | + ? $this->bucket[ $item ] |
|
| 109 | 109 | : null; |
| 110 | 110 | } |
| 111 | 111 | |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | */ |
| 120 | 120 | public function __set( $item, $value ) |
| 121 | 121 | { |
| 122 | - $this->bucket[$item] = $value; |
|
| 122 | + $this->bucket[ $item ] = $value; |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | /** |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | protected function addNamespace( $abstract ) |
| 143 | 143 | { |
| 144 | - if( strpos( $abstract, __NAMESPACE__ ) === false && !class_exists( $abstract )) { |
|
| 144 | + if( strpos( $abstract, __NAMESPACE__ ) === false && !class_exists( $abstract ) ) { |
|
| 145 | 145 | $abstract = __NAMESPACE__ . "\\$abstract"; |
| 146 | 146 | } |
| 147 | 147 | |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | return $this->notInstantiable( $concrete ); |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | - if( is_null(( $constructor = $reflector->getConstructor() ))) { |
|
| 186 | + if( is_null( ( $constructor = $reflector->getConstructor() ) ) ) { |
|
| 187 | 187 | return new $concrete; |
| 188 | 188 | } |
| 189 | 189 | |
@@ -218,11 +218,11 @@ discard block |
||
| 218 | 218 | */ |
| 219 | 219 | protected function resolveDependencies( array $dependencies ) |
| 220 | 220 | { |
| 221 | - $results = []; |
|
| 221 | + $results = [ ]; |
|
| 222 | 222 | |
| 223 | 223 | foreach( $dependencies as $dependency ) { |
| 224 | 224 | // If the class is null, the dependency is a string or some other primitive type |
| 225 | - $results[] = !is_null( $class = $dependency->getClass() ) |
|
| 225 | + $results[ ] = !is_null( $class = $dependency->getClass() ) |
|
| 226 | 226 | ? $this->resolveClass( $dependency ) |
| 227 | 227 | : null; |
| 228 | 228 | } |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | public function __construct() |
| 25 | 25 | { |
| 26 | - $this->file = realpath( dirname( dirname( __FILE__ )) . '/pollux.php' ); |
|
| 27 | - $this->gatekeeper = new GateKeeper( plugin_basename( $this->file )); |
|
| 26 | + $this->file = realpath( dirname( dirname( __FILE__ ) ) . '/pollux.php' ); |
|
| 27 | + $this->gatekeeper = new GateKeeper( plugin_basename( $this->file ) ); |
|
| 28 | 28 | |
| 29 | 29 | $data = get_file_data( $this->file, array( |
| 30 | 30 | 'id' => 'Text Domain', |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | { |
| 44 | 44 | Facade::clearResolvedInstances(); |
| 45 | 45 | Facade::setFacadeApplication( $this ); |
| 46 | - $this->config = (new Config( $this ))->get(); |
|
| 46 | + $this->config = ( new Config( $this ) )->get(); |
|
| 47 | 47 | $this->registerAliases(); |
| 48 | 48 | $classNames = array( |
| 49 | 49 | 'MetaBox', 'PostType', 'Taxonomy', 'Settings', |
@@ -60,10 +60,10 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | public function buildClassName( $name, $path = '' ) |
| 62 | 62 | { |
| 63 | - $className = array_map( 'ucfirst', array_map( 'strtolower', preg_split( '/[-_]/', $name ))); |
|
| 63 | + $className = array_map( 'ucfirst', array_map( 'strtolower', preg_split( '/[-_]/', $name ) ) ); |
|
| 64 | 64 | $className = implode( '', $className ); |
| 65 | 65 | return !empty( $path ) |
| 66 | - ? str_replace( '\\\\', '\\', sprintf( '%s\%s', $path, $className )) |
|
| 66 | + ? str_replace( '\\\\', '\\', sprintf( '%s\%s', $path, $className ) ) |
|
| 67 | 67 | : $className; |
| 68 | 68 | } |
| 69 | 69 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function buildMethodName( $name, $prefix = 'get' ) |
| 76 | 76 | { |
| 77 | - return lcfirst( $this->buildClassName( $prefix . '-' . $name )); |
|
| 77 | + return lcfirst( $this->buildClassName( $prefix . '-' . $name ) ); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | /** |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | public function environment( $checkFor = '' ) |
| 85 | 85 | { |
| 86 | 86 | $environment = defined( 'WP_ENV' ) ? WP_ENV : 'production'; |
| 87 | - if( !empty( $checkFor )) { |
|
| 87 | + if( !empty( $checkFor ) ) { |
|
| 88 | 88 | return $environment == $checkFor; |
| 89 | 89 | } |
| 90 | 90 | return $environment; |
@@ -101,10 +101,10 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | $controller = $this->make( 'Controller' ); |
| 103 | 103 | |
| 104 | - add_filter( 'admin_footer_text', array( $controller, 'filterWordPressFooter' )); |
|
| 105 | - add_action( 'admin_enqueue_scripts', array( $controller, 'registerAssets' )); |
|
| 106 | - add_action( 'admin_init', array( $controller, 'removeDashboardWidgets' )); |
|
| 107 | - add_action( 'wp_before_admin_bar_render', array( $controller, 'removeWordPressMenu' )); |
|
| 104 | + add_filter( 'admin_footer_text', array( $controller, 'filterWordPressFooter' ) ); |
|
| 105 | + add_action( 'admin_enqueue_scripts', array( $controller, 'registerAssets' ) ); |
|
| 106 | + add_action( 'admin_init', array( $controller, 'removeDashboardWidgets' ) ); |
|
| 107 | + add_action( 'wp_before_admin_bar_render', array( $controller, 'removeWordPressMenu' ) ); |
|
| 108 | 108 | |
| 109 | 109 | // Disallow indexing of the site on non-production environments |
| 110 | 110 | if( !$this->environment( 'production' ) && !is_admin() ) { |
@@ -153,6 +153,6 @@ discard block |
||
| 153 | 153 | */ |
| 154 | 154 | public function url( $path = '' ) |
| 155 | 155 | { |
| 156 | - return esc_url( plugin_dir_url( $this->file ) . ltrim( trim( $path ), '/' )); |
|
| 156 | + return esc_url( plugin_dir_url( $this->file ) . ltrim( trim( $path ), '/' ) ); |
|
| 157 | 157 | } |
| 158 | 158 | } |
@@ -18,8 +18,8 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | $this->plugin = $plugin; |
| 20 | 20 | |
| 21 | - add_action( 'activated_plugin', array( $this, 'deactivate' )); |
|
| 22 | - add_action( 'admin_notices', array( $this, 'deactivate' )); |
|
| 21 | + add_action( 'activated_plugin', array( $this, 'deactivate' ) ); |
|
| 22 | + add_action( 'admin_notices', array( $this, 'deactivate' ) ); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /** |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | : sprintf( __( 'Sorry, Pollux requires PHP %s or greater in order to work properly (your server is running PHP %s).', 'pollux' ), self::MIN_PHP_VERSION, PHP_VERSION ); |
| 62 | 62 | |
| 63 | 63 | $message2 = $this->checkPhpVersion() |
| 64 | - ? sprintf( '<a href="%s">%s</a>', admin_url( 'update-core.php' ), __( 'Update WordPress', 'pollux' )) |
|
| 64 | + ? sprintf( '<a href="%s">%s</a>', admin_url( 'update-core.php' ), __( 'Update WordPress', 'pollux' ) ) |
|
| 65 | 65 | : __( 'Please contact your hosting provider or server administrator to upgrade the version of PHP running on your server, or find an alternate plugin.', 'pollux' ); |
| 66 | 66 | |
| 67 | 67 | printf( '<div id="message" class="notice notice-error error is-dismissible"><p><strong>%s</strong></p><p>%s %s</p></div>', |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | filter_input( INPUT_GET, 'plugin_status' ), |
| 89 | 89 | filter_input( INPUT_GET, 'paged' ), |
| 90 | 90 | filter_input( INPUT_GET, 's' ) |
| 91 | - ))); |
|
| 91 | + ) ) ); |
|
| 92 | 92 | exit; |
| 93 | 93 | } |
| 94 | 94 | } |
@@ -27,15 +27,15 @@ discard block |
||
| 27 | 27 | */ |
| 28 | 28 | public function init() |
| 29 | 29 | { |
| 30 | - if( !is_plugin_active( 'meta-box/meta-box.php' ))return; |
|
| 30 | + if( !is_plugin_active( 'meta-box/meta-box.php' ) )return; |
|
| 31 | 31 | |
| 32 | 32 | $this->normalize(); |
| 33 | 33 | |
| 34 | - add_action( 'admin_menu', [$this, 'addPage'] ); |
|
| 35 | - add_action( 'pollux/settings/init', [$this, 'addSubmitMetaBox'] ); |
|
| 36 | - add_filter( 'pollux/settings/instruction', [$this, 'filterInstruction'], 10, 3 ); |
|
| 37 | - add_action( 'current_screen', [$this, 'register'] ); |
|
| 38 | - add_action( 'admin_footer-toplevel_page_' . self::ID, [$this, 'renderFooterScript'] ); |
|
| 34 | + add_action( 'admin_menu', [ $this, 'addPage' ] ); |
|
| 35 | + add_action( 'pollux/settings/init', [ $this, 'addSubmitMetaBox' ] ); |
|
| 36 | + add_filter( 'pollux/settings/instruction', [ $this, 'filterInstruction' ], 10, 3 ); |
|
| 37 | + add_action( 'current_screen', [ $this, 'register' ] ); |
|
| 38 | + add_action( 'admin_footer-toplevel_page_' . self::ID, [ $this, 'renderFooterScript' ] ); |
|
| 39 | 39 | |
| 40 | 40 | // add_filter( 'pollux/settings/save', [$this, 'save'] ); |
| 41 | 41 | } |
@@ -50,10 +50,10 @@ discard block |
||
| 50 | 50 | __( 'Site Settings', 'pollux' ), |
| 51 | 51 | 'edit_theme_options', |
| 52 | 52 | self::ID, |
| 53 | - [$this, 'renderPage'], |
|
| 53 | + [ $this, 'renderPage' ], |
|
| 54 | 54 | 'dashicons-screenoptions', |
| 55 | 55 | 1313 |
| 56 | - ])); |
|
| 56 | + ] ) ); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -64,11 +64,11 @@ discard block |
||
| 64 | 64 | call_user_func_array( 'add_meta_box', apply_filters( 'pollux/settings/metabox/submit', [ |
| 65 | 65 | 'submitdiv', |
| 66 | 66 | __( 'Save Settings', 'pollux' ), |
| 67 | - [ $this, 'renderSubmitMetaBox'], |
|
| 67 | + [ $this, 'renderSubmitMetaBox' ], |
|
| 68 | 68 | $this->hook, |
| 69 | 69 | 'side', |
| 70 | 70 | 'high', |
| 71 | - ])); |
|
| 71 | + ] ) ); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -85,16 +85,16 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function isVisible( $bool, array $metabox ) |
| 87 | 87 | { |
| 88 | - if( defined( 'DOING_AJAX' ) && DOING_AJAX || !isset( $metabox['condition'] )) { |
|
| 88 | + if( defined( 'DOING_AJAX' ) && DOING_AJAX || !isset( $metabox[ 'condition' ] ) ) { |
|
| 89 | 89 | return $bool; |
| 90 | 90 | } |
| 91 | - return $this->verifyMetaBoxCondition( $metabox['condition'] ); |
|
| 91 | + return $this->verifyMetaBoxCondition( $metabox[ 'condition' ] ); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
| 95 | 95 | * @return void |
| 96 | 96 | */ |
| 97 | - public function register( $metaboxes = [] ) |
|
| 97 | + public function register( $metaboxes = [ ] ) |
|
| 98 | 98 | { |
| 99 | 99 | if( get_current_screen()->id != $this->hook )return; |
| 100 | 100 | foreach( parent::register() as $metabox ) { |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | 'confirm' => __( 'Are you sure want to do this?', 'pollux' ), |
| 114 | 114 | 'hook' => $this->hook, |
| 115 | 115 | 'id' => self::ID, |
| 116 | - ]); |
|
| 116 | + ] ); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | /** |
@@ -123,10 +123,10 @@ discard block |
||
| 123 | 123 | { |
| 124 | 124 | // add_screen_option( 'layout_columns', ['max' => 2, 'default' => 2] ); |
| 125 | 125 | $this->render( 'settings/index', [ |
| 126 | - 'columns' => 2,//get_current_screen()->get_columns(), |
|
| 126 | + 'columns' => 2, //get_current_screen()->get_columns(), |
|
| 127 | 127 | 'id' => self::ID, |
| 128 | 128 | 'title' => __( 'Site Settings', 'pollux' ), |
| 129 | - ]); |
|
| 129 | + ] ); |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | /** |
@@ -135,15 +135,15 @@ discard block |
||
| 135 | 135 | public function renderSubmitMetaBox() |
| 136 | 136 | { |
| 137 | 137 | $query = [ |
| 138 | - '_wpnonce' => wp_create_nonce( sprintf( '%s-reset', self::ID )), |
|
| 138 | + '_wpnonce' => wp_create_nonce( sprintf( '%s-reset', self::ID ) ), |
|
| 139 | 139 | 'action' => 'reset_settings', |
| 140 | 140 | 'page' => self::ID, |
| 141 | 141 | ]; |
| 142 | 142 | $this->render( 'settings/submit', [ |
| 143 | 143 | 'reset' => __( 'Reset Settings', 'pollux' ), |
| 144 | - 'reset_url' => esc_url( add_query_arg( $query, admin_url( 'admin.php' ))), |
|
| 144 | + 'reset_url' => esc_url( add_query_arg( $query, admin_url( 'admin.php' ) ) ), |
|
| 145 | 145 | 'submit' => get_submit_button( __( 'Save', 'pollux' ), 'primary', 'submit', false ), |
| 146 | - ]); |
|
| 146 | + ] ); |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | /** |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | protected function getInstructions() |
| 153 | 153 | { |
| 154 | 154 | return array_filter( $this->metaboxes, function( $metabox ) { |
| 155 | - return $this->verifyMetaBoxCondition( $metabox['condition'] ); |
|
| 155 | + return $this->verifyMetaBoxCondition( $metabox[ 'condition' ] ); |
|
| 156 | 156 | }); |
| 157 | 157 | } |
| 158 | 158 | |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | */ |
| 162 | 162 | protected function getPostTypes() |
| 163 | 163 | { |
| 164 | - return []; |
|
| 164 | + return [ ]; |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | /** |
@@ -169,25 +169,25 @@ discard block |
||
| 169 | 169 | */ |
| 170 | 170 | protected function normalize() |
| 171 | 171 | { |
| 172 | - $this->metaboxes = []; |
|
| 173 | - foreach( $this->app->config['settings'] as $id => $metabox ) { |
|
| 174 | - unset( $metabox['post_types'], $metabox['pages'] ); |
|
| 172 | + $this->metaboxes = [ ]; |
|
| 173 | + foreach( $this->app->config[ 'settings' ] as $id => $metabox ) { |
|
| 174 | + unset( $metabox[ 'post_types' ], $metabox[ 'pages' ] ); |
|
| 175 | 175 | $defaults = [ |
| 176 | - 'condition' => [], |
|
| 177 | - 'fields' => [], |
|
| 176 | + 'condition' => [ ], |
|
| 177 | + 'fields' => [ ], |
|
| 178 | 178 | 'id' => $id, |
| 179 | 179 | 'slug' => $id, |
| 180 | 180 | ]; |
| 181 | - $this->metaboxes[] = $this->normalizeThis( $metabox, $defaults, $id ); |
|
| 181 | + $this->metaboxes[ ] = $this->normalizeThis( $metabox, $defaults, $id ); |
|
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | protected function normalizeFieldName( $name, array $data, $parentId ) |
| 186 | 186 | { |
| 187 | - if( !empty( $name )) { |
|
| 187 | + if( !empty( $name ) ) { |
|
| 188 | 188 | return $name; |
| 189 | 189 | } |
| 190 | - $name = str_replace( sprintf( '%s-%s-', self::ID, $parentId ), '', $data['id'] ); |
|
| 190 | + $name = str_replace( sprintf( '%s-%s-', self::ID, $parentId ), '', $data[ 'id' ] ); |
|
| 191 | 191 | return sprintf( '%s[%s][%s]', self::ID, $parentId, $name ); |
| 192 | 192 | } |
| 193 | 193 | |
@@ -30,14 +30,14 @@ discard block |
||
| 30 | 30 | * @param string $view |
| 31 | 31 | * @return void |
| 32 | 32 | */ |
| 33 | - public function render( $view, array $data = [] ) |
|
| 33 | + public function render( $view, array $data = [ ] ) |
|
| 34 | 34 | { |
| 35 | 35 | $file = apply_filters( 'pollux/views/file', |
| 36 | - $this->app->path( sprintf( 'views/%s.php', str_replace( '.php', '', $view ))), |
|
| 36 | + $this->app->path( sprintf( 'views/%s.php', str_replace( '.php', '', $view ) ) ), |
|
| 37 | 37 | $view, |
| 38 | 38 | $data |
| 39 | 39 | ); |
| 40 | - if( file_exists( $file )) { |
|
| 40 | + if( file_exists( $file ) ) { |
|
| 41 | 41 | extract( $data ); |
| 42 | 42 | return include $file; |
| 43 | 43 | } |
@@ -49,9 +49,9 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | protected function getClassname( $toLowerCase = true ) |
| 51 | 51 | { |
| 52 | - $paths = explode( '\\', get_class( $this )); |
|
| 52 | + $paths = explode( '\\', get_class( $this ) ); |
|
| 53 | 53 | return wp_validate_boolean( $toLowerCase ) |
| 54 | - ? strtolower( end( $paths )) |
|
| 54 | + ? strtolower( end( $paths ) ) |
|
| 55 | 55 | : end( $paths ); |
| 56 | 56 | } |
| 57 | 57 | |
@@ -64,8 +64,8 @@ discard block |
||
| 64 | 64 | $data = wp_parse_args( $data, $defaults ); |
| 65 | 65 | foreach( $defaults as $key => $value ) { |
| 66 | 66 | $method = $this->app->buildMethodName( $key, 'normalize' ); |
| 67 | - if( method_exists( $this, $method )) { |
|
| 68 | - $data[$key] = $this->$method( $data[$key], $data, $id ); |
|
| 67 | + if( method_exists( $this, $method ) ) { |
|
| 68 | + $data[ $key ] = $this->$method( $data[ $key ], $data, $id ); |
|
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | return $data; |
@@ -45,10 +45,10 @@ |
||
| 45 | 45 | */ |
| 46 | 46 | protected function normalize( array $options, $key, $fallback ) |
| 47 | 47 | { |
| 48 | - if( !array_key_exists( $key, $options )) { |
|
| 48 | + if( !array_key_exists( $key, $options ) ) { |
|
| 49 | 49 | return $fallback; |
| 50 | 50 | } |
| 51 | - $option = $options[$key]; |
|
| 51 | + $option = $options[ $key ]; |
|
| 52 | 52 | $option = is_array( $option ) |
| 53 | 53 | ? array_filter( $option ) |
| 54 | 54 | : trim( $option ); |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public static function clearResolvedInstances() |
| 50 | 50 | { |
| 51 | - static::$resolvedInstance = []; |
|
| 51 | + static::$resolvedInstance = [ ]; |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |
@@ -102,14 +102,14 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | protected static function resolveFacadeInstance( $name ) |
| 104 | 104 | { |
| 105 | - if( is_object( $name )) { |
|
| 105 | + if( is_object( $name ) ) { |
|
| 106 | 106 | return $name; |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | - if( isset( static::$resolvedInstance[$name] )) { |
|
| 110 | - return static::$resolvedInstance[$name]; |
|
| 109 | + if( isset( static::$resolvedInstance[ $name ] ) ) { |
|
| 110 | + return static::$resolvedInstance[ $name ]; |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | - return static::$resolvedInstance[$name] = static::$app->make( $name ); |
|
| 113 | + return static::$resolvedInstance[ $name ] = static::$app->make( $name ); |
|
| 114 | 114 | } |
| 115 | 115 | } |