Passed
Branch dev (d5661a)
by Michael
22:34
created
factory/page_meta_box/_model/AdminPageFramework_Property_page_meta_box.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@
 block discarded – undo
145 145
      * @since       3.5.3
146 146
      * @return      string      The found page slug. An empty string if not found.
147 147
      * @remark      Do not return `null` when not found as some framework methods check the retuened value with `isset()` and if null is given, `isset()` yields `false` while it does `true` for an emtpy string ('').
148
-    */
148
+     */
149 149
     public function getCurrentPageSlug() {
150 150
         return $this->getHTTPQueryGET( 'page', '' );
151 151
     }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     /**
57 57
      * Sets up hooks and properties.
58 58
      */
59
-    public function __construct( $oCaller, $sClassName, $sCapability='manage_options', $sTextDomain='admin-page-framework', $sStructureType='page_meta_box' ) {
59
+    public function __construct( $oCaller, $sClassName, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework', $sStructureType = 'page_meta_box' ) {
60 60
 
61 61
         // Let them overload.
62 62
         unset(
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     public function _getScreenIDOfPage( $sPageSlug ) {
106 106
         $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug );
107 107
         return $_oAdminPage
108
-            ? $_oAdminPage->oProp->aPages[ $sPageSlug ][ '_page_hook' ] . ( is_network_admin() ? '-network' : '' )
108
+            ? $_oAdminPage->oProp->aPages[ $sPageSlug ][ '_page_hook' ].( is_network_admin() ? '-network' : '' )
109 109
             : '';
110 110
     }
111 111
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      * @since       3.0.0
116 116
      * @return      boolean     Returns true if it is of framework's added page; otherwise, false.
117 117
      */
118
-    public function isPageAdded( $sPageSlug='' ) {
118
+    public function isPageAdded( $sPageSlug = '' ) {
119 119
         $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug );
120 120
         return $_oAdminPage
121 121
             ? $_oAdminPage->oProp->isPageAdded( $sPageSlug )
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     public function isCurrentTab( $sTabSlug ) {
133 133
 
134 134
         $_sCurrentPageSlug = $this->getHTTPQueryGET( 'page' );
135
-        if ( ! $_sCurrentPageSlug ) {
135
+        if ( !$_sCurrentPageSlug ) {
136 136
             return false;
137 137
         }
138 138
         $_sCurrentTabSlug = $this->getHTTPQueryGET( 'tab', $this->getDefaultInPageTab( $_sCurrentPageSlug ) );
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
      */
180 180
     public function getDefaultInPageTab( $sPageSlug ) {
181 181
 
182
-        if ( ! $sPageSlug ) {
182
+        if ( !$sPageSlug ) {
183 183
             return '';
184 184
         }
185 185
         return ( $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ) )
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
      */
195 195
     public function getOptionKey( $sPageSlug ) {
196 196
 
197
-        if ( ! $sPageSlug ) {
197
+        if ( !$sPageSlug ) {
198 198
             return '';
199 199
         }
200 200
         return ( $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ) )
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
             $GLOBALS,
222 222
             array( 'aAdminPageFramework', 'aPageClasses' )
223 223
         );
224
-        foreach( $_aPageClasses as $_oAdminPage ) {
224
+        foreach ( $_aPageClasses as $_oAdminPage ) {
225 225
             if ( $_oAdminPage->oProp->isPageAdded( $sPageSlug ) ) {
226 226
                 return $_oAdminPage;
227 227
             }
Please login to merge, or discard this patch.
development/factory/post_type/AdminPageFramework_PostType_Model.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         if ( $this->oProp->bIsAdmin ) {
39 39
 
40
-            add_action( 'load_' . $this->oProp->sPostType, array( $this, '_replyToSetUpHooksForModel' ) );
40
+            add_action( 'load_'.$this->oProp->sPostType, array( $this, '_replyToSetUpHooksForModel' ) );
41 41
 
42 42
             if ( $this->oProp->sCallerPath ) {
43 43
                 new AdminPageFramework_PostType_Model__FlushRewriteRules( $this );
@@ -64,11 +64,11 @@  discard block
 block discarded – undo
64 64
 
65 65
         // Properties - sets translatable labels.
66 66
         $this->oProp->aColumnHeaders = array(
67
-            'cb'        => '<input type="checkbox" />',     // Checkbox for bulk actions.
68
-            'title'     => $this->oMsg->get( 'title' ),     // Post title. Includes "edit", "quick edit", "trash" and "view" links. If $mode (set from `$_REQUEST`['mode']) is 'excerpt', a post excerpt is included between the title and links.
69
-            'author'    => $this->oMsg->get( 'author' ),    // Post author.
67
+            'cb'        => '<input type="checkbox" />', // Checkbox for bulk actions.
68
+            'title'     => $this->oMsg->get( 'title' ), // Post title. Includes "edit", "quick edit", "trash" and "view" links. If $mode (set from `$_REQUEST`['mode']) is 'excerpt', a post excerpt is included between the title and links.
69
+            'author'    => $this->oMsg->get( 'author' ), // Post author.
70 70
             'comments'  => '<div class="comment-grey-bubble"></div>', // Number of pending comments.
71
-            'date'      => $this->oMsg->get( 'date' ),      // The date and publish status of the post.
71
+            'date'      => $this->oMsg->get( 'date' ), // The date and publish status of the post.
72 72
         );
73 73
 
74 74
     }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         echo $this->oUtil->addAndApplyFilter(
131 131
             $this,
132 132
             "cell_{$this->oProp->sPostType}_{$sColumnKey}",
133
-            '',  // value to be filtered - cell output
133
+            '', // value to be filtered - cell output
134 134
             $iPostID
135 135
         );
136 136
     }
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
      * @internal
180 180
      */
181 181
     public function _replyToRegisterTaxonomies() {
182
-        foreach( $this->oProp->aTaxonomies as $_sTaxonomySlug => $_aArguments ) {
182
+        foreach ( $this->oProp->aTaxonomies as $_sTaxonomySlug => $_aArguments ) {
183 183
             $this->_registerTaxonomy(
184 184
                 $_sTaxonomySlug,
185 185
                 $this->oUtil->getAsArray( $this->oProp->aTaxonomyObjectTypes[ $_sTaxonomySlug ] ), // object types
@@ -195,8 +195,8 @@  discard block
 block discarded – undo
195 195
      */
196 196
     public function _registerTaxonomy( $sTaxonomySlug, array $aObjectTypes, array $aArguments ) {
197 197
 
198
-        if ( ! in_array( $this->oProp->sPostType, $aObjectTypes ) ) {
199
-            $aObjectTypes[] = $this->oProp->sPostType;
198
+        if ( !in_array( $this->oProp->sPostType, $aObjectTypes ) ) {
199
+            $aObjectTypes[ ] = $this->oProp->sPostType;
200 200
         }
201 201
         register_taxonomy(
202 202
             $sTaxonomySlug,
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      */
235 235
     public function _replyToRemoveTexonomySubmenuPages() {
236 236
 
237
-        foreach( $this->oProp->aTaxonomyRemoveSubmenuPages as $sSubmenuPageSlug => $sTopLevelPageSlug ) {
237
+        foreach ( $this->oProp->aTaxonomyRemoveSubmenuPages as $sSubmenuPageSlug => $sTopLevelPageSlug ) {
238 238
 
239 239
             remove_submenu_page( $sTopLevelPageSlug, $sSubmenuPageSlug );
240 240
 
Please login to merge, or discard this patch.
factory/post_type/_model/AdminPageFramework_Property_post_type.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
         'title'     => 'Title', // Post title. Includes "edit", "quick edit", "trash" and "view" links. If $mode (set from `$_REQUEST[ 'mode' ]`) is 'excerpt', a post excerpt is included between the title and links.
74 74
         'author'    => 'Author', // Post author.
75 75
         'comments'  => '<div class="comment-grey-bubble"></div>', // Number of pending comments.
76
-        'date'      => 'Date',     // The date and publish status of the post.
76
+        'date'      => 'Date', // The date and publish status of the post.
77 77
     );
78 78
 
79 79
     /**
Please login to merge, or discard this patch.
factory/post_type/_view/AdminPageFramework_PageLoadInfo_post_type.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         if ( in_array( $oProp->sClassName, self::$aClassNames ) )
30 30
             return self::$_oInstance;
31 31
         
32
-        self::$aClassNames[] = $oProp->sClassName;
32
+        self::$aClassNames[ ] = $oProp->sClassName;
33 33
         self::$_oInstance = new AdminPageFramework_PageLoadInfo_post_type( $oProp, $oMsg );
34 34
         
35 35
         return self::$_oInstance;
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,8 +26,9 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public static function instantiate( $oProp, $oMsg ) {
28 28
         
29
-        if ( in_array( $oProp->sClassName, self::$aClassNames ) )
30
-            return self::$_oInstance;
29
+        if ( in_array( $oProp->sClassName, self::$aClassNames ) ) {
30
+                    return self::$_oInstance;
31
+        }
31 32
         
32 33
         self::$aClassNames[] = $oProp->sClassName;
33 34
         self::$_oInstance = new AdminPageFramework_PageLoadInfo_post_type( $oProp, $oMsg );
@@ -43,7 +44,8 @@  discard block
 block discarded – undo
43 44
     public function _replyToSetPageLoadInfoInFooter() {
44 45
 
45 46
         // Some users set `$_GET[ 'post_type' ]` element even in regular admin pages. In that case, do not load the style to avoid duplicates.
46
-        if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] ) {    // sanitization unnecessary
47
+        if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] ) {
48
+// sanitization unnecessary
47 49
             return;
48 50
         }
49 51
     
Please login to merge, or discard this patch.
development/factory/_common/_abstract/AdminPageFramework_Factory_Router.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -169,8 +169,8 @@  discard block
 block discarded – undo
169 169
         }
170 170
 
171 171
         // Call the user constructor.
172
-        $this->start();     // defined in the controller class.
173
-        $this->oUtil->addAndDoAction( $this, 'start_' . $this->oProp->sClassName, $this );
172
+        $this->start(); // defined in the controller class.
173
+        $this->oUtil->addAndDoAction( $this, 'start_'.$this->oProp->sClassName, $this );
174 174
 
175 175
     }
176 176
         /**
@@ -179,8 +179,8 @@  discard block
 block discarded – undo
179 179
          * @return      array
180 180
          */
181 181
         private function ___getSubClassNames() {
182
-            foreach( $this->_aSubClassPrefixes as $_sObjectVariableName => $_sPrefix ) {
183
-                $this->aSubClassNames[ $_sObjectVariableName ] = $_sPrefix . $this->_sStructureType;
182
+            foreach ( $this->_aSubClassPrefixes as $_sObjectVariableName => $_sPrefix ) {
183
+                $this->aSubClassNames[ $_sObjectVariableName ] = $_sPrefix.$this->_sStructureType;
184 184
             }
185 185
             return $this->aSubClassNames + $this->_aSubClassNames;
186 186
         }
@@ -194,15 +194,15 @@  discard block
 block discarded – undo
194 194
      */
195 195
     public function _replyToLoadComponents( /* $oScreen */ ) {
196 196
 
197
-        if ( ! $this->_isInThePage() ) {
197
+        if ( !$this->_isInThePage() ) {
198 198
             return;
199 199
         }
200 200
 
201
-        if ( ! isset( $this->oResource ) ) {
201
+        if ( !isset( $this->oResource ) ) {
202 202
             $this->oResource = $this->_replyTpSetAndGetInstance_oResource();
203 203
         }
204 204
 
205
-        if ( ! isset(  $this->oLink ) ) {
205
+        if ( !isset( $this->oLink ) ) {
206 206
             $this->oLink = $this->_replyTpSetAndGetInstance_oLink();
207 207
         }
208 208
 
@@ -216,10 +216,10 @@  discard block
 block discarded – undo
216 216
      * Calls the load method and callbacks.
217 217
      * @since       3.8.14
218 218
      */
219
-    protected function _load( $aActions=array() ) {
219
+    protected function _load( $aActions = array() ) {
220 220
         $aActions = empty( $aActions )
221 221
             ? array(
222
-                'load_' . $this->oProp->sClassName,
222
+                'load_'.$this->oProp->sClassName,
223 223
             )
224 224
             : $aActions;
225 225
         $this->load();
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
      */
232 232
     protected function _setUp() {
233 233
         $aActions = array(
234
-            'set_up_' . $this->oProp->sClassName,
234
+            'set_up_'.$this->oProp->sClassName,
235 235
         );
236 236
         $this->setUp();
237 237
         $this->oUtil->addAndDoActions( $this, $aActions, $this );
@@ -258,14 +258,14 @@  discard block
 block discarded – undo
258 258
          * @since   3.8.19
259 259
          */
260 260
         protected function _isWordPressCoreAjaxRequest() {
261
-            if ( ! isset( $GLOBALS[ 'pagenow' ] ) ) {
261
+            if ( !isset( $GLOBALS[ 'pagenow' ] ) ) {
262 262
                 return false;
263 263
             }
264 264
             if ( 'admin-ajax.php' !== $GLOBALS[ 'pagenow' ] ) {
265 265
                 return false;
266 266
             }
267 267
             return in_array(
268
-                isset( $_POST[ 'action' ] ) ? $_POST[ 'action' ] : '',  // sanitization unnecessary as just checking
268
+                isset( $_POST[ 'action' ] ) ? $_POST[ 'action' ] : '', // sanitization unnecessary as just checking
269 269
                 array( 'heartbeat', 'closed-postboxes', 'meta-box-order' ),
270 270
                 true
271 271
             );
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
      * @return  boolean
294 294
      */
295 295
     protected function _isValidAjaxReferrer() {
296
-        if ( ! $this->oProp->bIsAdminAjax ) {
296
+        if ( !$this->oProp->bIsAdminAjax ) {
297 297
             return false;
298 298
         }
299 299
         return true;
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      */
310 310
     public function _replyToDetermineToLoad() {
311 311
 
312
-        if ( ! $this->_isInThePage() ) {
312
+        if ( !$this->_isInThePage() ) {
313 313
             return;
314 314
         }
315 315
 
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
         // Set and return the sub class object instance.
376 376
         if ( isset( $this->aSubClassNames[ $sPropertyName ] ) ) {
377 377
             return call_user_func(
378
-                array( $this, "_replyTpSetAndGetInstance_{$sPropertyName}"  )
378
+                array( $this, "_replyTpSetAndGetInstance_{$sPropertyName}" )
379 379
             );
380 380
         }
381 381
 
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
          */
410 410
         public function _replyTpSetAndGetInstance_oMsg() {
411 411
             $this->oMsg = call_user_func_array(
412
-                array( $this->aSubClassNames[ 'oMsg' ], 'getInstance'),
412
+                array( $this->aSubClassNames[ 'oMsg' ], 'getInstance' ),
413 413
                 array( $this->oProp->sTextDomain )  // parameters
414 414
             );
415 415
             return $this->oMsg;
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
      *
475 475
      * @internal
476 476
      */
477
-    public function __call( $sMethodName, $aArguments=null ) {
477
+    public function __call( $sMethodName, $aArguments = null ) {
478 478
 
479 479
         $_mFirstArg = $this->oUtil->getElement( $aArguments, 0 );
480 480
 
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
 
505 505
             // Check if the method name does not contain a backslash.
506 506
             if ( false === strpos( $sMethodName, "\\" ) ) {
507
-                return $this->oUtil->getElement( $aArguments, 0 );  // the first element - the filter value
507
+                return $this->oUtil->getElement( $aArguments, 0 ); // the first element - the filter value
508 508
             }
509 509
 
510 510
             // If the method name contains a backslash, the user may be using a name space.
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
                     array( $this, $_sAutoCallbackMethodName ),
516 516
                     $aArguments
517 517
                 )
518
-                : $this->oUtil->getElement( $aArguments, 0 );   // the first argument
518
+                : $this->oUtil->getElement( $aArguments, 0 ); // the first argument
519 519
 
520 520
         }
521 521
 
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
          */
526 526
         private function _triggerUndefinedMethodWarning( $sMethodName ) {
527 527
             trigger_error(
528
-                AdminPageFramework_Registry::NAME . ': '
528
+                AdminPageFramework_Registry::NAME.': '
529 529
                     . sprintf(
530 530
                         __( 'The method is not defined: %1$s', $this->oProp->sTextDomain ),
531 531
                         $sMethodName
Please login to merge, or discard this patch.
factory/_common/_abstract/_model/AdminPageFramework_Property_Base.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
         'caller_id'                         => '',
321 321
         'structure_type'                    => '',
322 322
         'action_hook_form_registration'     => '',
323
-        'autoload_min_resource'             => true,    // will be overridden by the $bAutoloadMinifiedResource property.
323
+        'autoload_min_resource'             => true, // will be overridden by the $bAutoloadMinifiedResource property.
324 324
     );
325 325
 
326 326
     /**
@@ -328,14 +328,14 @@  discard block
 block discarded – undo
328 328
      * @since       3.7.0
329 329
      */
330 330
     public $aFormCallbacks = array(
331
-        'hfID'              => null,    // the input id attribute
332
-        'hfTagID'           => null,    // the field container id attribute
333
-        'hfName'            => null,    // the field name attribute
334
-        'hfNameFlat'        => null,    // the flat field name attribute
331
+        'hfID'              => null, // the input id attribute
332
+        'hfTagID'           => null, // the field container id attribute
333
+        'hfName'            => null, // the field name attribute
334
+        'hfNameFlat'        => null, // the flat field name attribute
335 335
         // @todo Document the differences between `hfName` and `hfInputName`
336
-        'hfInputName'       => null,    // 3.6.0+   the field input name attribute
337
-        'hfInputNameFlat'   => null,    // 3.6.0+   the flat field input name
338
-        'hfClass'           => null,    // the class attribute
336
+        'hfInputName'       => null, // 3.6.0+   the field input name attribute
337
+        'hfInputNameFlat'   => null, // 3.6.0+   the flat field input name
338
+        'hfClass'           => null, // the class attribute
339 339
     );
340 340
 
341 341
     /**
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
              * @internal
469 469
              */
470 470
             private function ___getURLQuery() {
471
-                if ( ! $this->bIsAdminAjax ) {
471
+                if ( !$this->bIsAdminAjax ) {
472 472
                     return $this->getHTTPQueryGET( array(), array() );
473 473
                 }
474 474
                 parse_str(
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
          * @since       3.7.9
484 484
          */
485 485
         private function ___setGlobals() {
486
-            if ( ! isset( $GLOBALS[ 'aAdminPageFramework' ] ) ) {
486
+            if ( !isset( $GLOBALS[ 'aAdminPageFramework' ] ) ) {
487 487
                 $GLOBALS[ 'aAdminPageFramework' ] = array(
488 488
                     'aFieldFlags' => array()
489 489
                 );
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
             'action_hook_form_registration'     => $this->bIsAdminAjax
512 512
                 ? 'admin_init'  // 3.8.14
513 513
                 : $this->_sFormRegistrationHook,
514
-            'autoload_min_resource'             => $this->bAutoloadMinifiedResource,    // [3.8.31]
514
+            'autoload_min_resource'             => $this->bAutoloadMinifiedResource, // [3.8.31]
515 515
         ) + $this->aFormArguments;
516 516
     }
517 517
     /**
@@ -555,8 +555,8 @@  discard block
 block discarded – undo
555 555
             'hfTagID'                           => array( $this->oCaller, '_replyToGetInputTagIDAttribute' ), // the fields & fieldset & field row container id attribute
556 556
             'hfName'                            => array( $this->oCaller, '_replyToGetFieldNameAttribute' ), // the input name attribute
557 557
             'hfNameFlat'                        => array( $this->oCaller, '_replyToGetFlatFieldName' ), // the flat input name attribute
558
-            'hfInputName'                       => array( $this->oCaller, '_replyToGetInputNameAttribute' ),    // 3.6.0+   the field input name attribute
559
-            'hfInputNameFlat'                   => array( $this->oCaller, '_replyToGetFlatInputName' ),    // 3.6.0+   the flat field input name
558
+            'hfInputName'                       => array( $this->oCaller, '_replyToGetInputNameAttribute' ), // 3.6.0+   the field input name attribute
559
+            'hfInputNameFlat'                   => array( $this->oCaller, '_replyToGetFlatInputName' ), // 3.6.0+   the flat field input name
560 560
             'hfClass'                           => array( $this->oCaller, '_replyToGetInputClassAttribute' ), // the class attribute
561 561
             'hfSectionName'                     => array( $this->oCaller, '_replyToGetSectionName' ), // 3.6.0+
562 562
         ) + $this->aFormCallbacks;
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
      * @remark      The information can be used to embed into the footer etc.
631 631
      * @return      array       The information of the script.
632 632
      */
633
-    protected function getCallerInfo( $sCallerPath='' ) {
633
+    protected function getCallerInfo( $sCallerPath = '' ) {
634 634
 
635 635
         if ( isset( self::$_aScriptDataCaches[ $sCallerPath ] ) ) {
636 636
             return self::$_aScriptDataCaches[ $sCallerPath ];
@@ -748,11 +748,11 @@  discard block
 block discarded – undo
748 748
 
749 749
         // 3.7.9 Moved from the constructor to make it lighter.
750 750
         if ( 'sClassHash' === $sName ) {
751
-            $this->sClassHash       = md5( $this->sClassName );
751
+            $this->sClassHash = md5( $this->sClassName );
752 752
             return $this->sClassHash;
753 753
         }
754 754
         if ( 'sScriptType' === $sName ) {
755
-            $this->sScriptType      = $this->_getCallerType( $this->sCallerPath );    // 3.7.6+
755
+            $this->sScriptType = $this->_getCallerType( $this->sCallerPath ); // 3.7.6+
756 756
             return $this->sScriptType;
757 757
         }
758 758
         if ( 'oUtil' === $sName ) {
Please login to merge, or discard this patch.
development/factory/_common/_abstract/_model/AdminPageFramework_Message.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -83,11 +83,11 @@  discard block
 block discarded – undo
83 83
         'nonce_verification_failed'             => 'A problem occurred while processing the form data. Please try again.',
84 84
         'check_max_input_vars'                  => 'Not all form fields could not be sent. '
85 85
             . 'Please check your server settings of PHP <code>max_input_vars</code> and consult the server administrator to increase the value. '
86
-            . '<code>max input vars</code>: %1$s. <code>$_POST</code> count: %2$s',  // 3.5.11+ // sanitization unnecessary as it is just a literal string
87
-        'send_email'                            => 'Is it okay to send the email?',     // 3.3.0+
88
-        'email_sent'                            => 'The email has been sent.',  // 3.3.0+, 3.3.5+ deprecated, 3.8.32 Re-added
86
+            . '<code>max input vars</code>: %1$s. <code>$_POST</code> count: %2$s', // 3.5.11+ // sanitization unnecessary as it is just a literal string
87
+        'send_email'                            => 'Is it okay to send the email?', // 3.3.0+
88
+        'email_sent'                            => 'The email has been sent.', // 3.3.0+, 3.3.5+ deprecated, 3.8.32 Re-added
89 89
         'email_scheduled'                       => 'The email has been scheduled.', // 3.3.5+, 3.8.32 deprecated
90
-        'email_could_not_send'                  => 'There was a problem sending the email',     // 3.3.0+
90
+        'email_could_not_send'                  => 'There was a problem sending the email', // 3.3.0+
91 91
 
92 92
         // AdminPageFramework_PostType
93 93
         'title'                                 => 'Title',
@@ -114,14 +114,14 @@  discard block
 block discarded – undo
114 114
         'upload_file'                           => 'Upload File',
115 115
         'use_this_file'                         => 'Use This File',
116 116
         'select_file'                           => 'Select File',
117
-        'remove_value'                          => 'Remove Value',  // 3.2.0+
118
-        'select_all'                            => 'Select All',    // 3.3.0+
119
-        'select_none'                           => 'Select None',   // 3.3.0+
117
+        'remove_value'                          => 'Remove Value', // 3.2.0+
118
+        'select_all'                            => 'Select All', // 3.3.0+
119
+        'select_none'                           => 'Select None', // 3.3.0+
120 120
         'no_term_found'                         => 'No term found.', // 3.3.2+
121 121
 
122 122
         // AdminPageFramework_Form_View___Script_{...}
123 123
         'select'                                => 'Select', // 3.4.2+
124
-        'insert'                                => 'Insert',  // 3.4.2+
124
+        'insert'                                => 'Insert', // 3.4.2+
125 125
         'use_this'                              => 'Use This', // 3.4.2+
126 126
         'return_to_library'                     => 'Return to Library', // 3.4.2+
127 127
 
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
 
134 134
         // Repeatable sections & fields
135 135
         'repeatable_section_is_disabled'        => 'The ability to repeat sections is disabled.', // 3.8.13+
136
-        'repeatable_field_is_disabled'          => 'The ability to repeat fields is disabled.',   // 3.8.13+
137
-        'warning_caption'                       => 'Warning',   // 3.8.13+
136
+        'repeatable_field_is_disabled'          => 'The ability to repeat fields is disabled.', // 3.8.13+
137
+        'warning_caption'                       => 'Warning', // 3.8.13+
138 138
 
139 139
         // AdminPageFramework_FormField
140 140
         'allowed_maximum_number_of_fields'      => 'The allowed maximum number of fields is {0}.',
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
      * @remark      This class should be instantiated via this method.
217 217
      * @return      AdminPageFramework_Message
218 218
      */
219
-    public static function getInstance( $sTextDomain='admin-page-framework' ) {
219
+    public static function getInstance( $sTextDomain = 'admin-page-framework' ) {
220 220
 
221 221
         $_oInstance = isset( self::$_aInstancesByTextDomain[ $sTextDomain ] ) && ( self::$_aInstancesByTextDomain[ $sTextDomain ] instanceof AdminPageFramework_Message )
222 222
             ? self::$_aInstancesByTextDomain[ $sTextDomain ]
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
          * Ensures that only one instance of this class object exists. ( no multiple instances of this object )
230 230
          * @deprecated  3.2.0
231 231
          */
232
-        public static function instantiate( $sTextDomain='admin-page-framework' ) {
232
+        public static function instantiate( $sTextDomain = 'admin-page-framework' ) {
233 233
             return self::getInstance( $sTextDomain );
234 234
         }
235 235
 
@@ -237,14 +237,14 @@  discard block
 block discarded – undo
237 237
      * Sets up properties.
238 238
      * @param string $sTextDomain
239 239
      */
240
-    public function __construct( $sTextDomain='admin-page-framework' ) {
240
+    public function __construct( $sTextDomain = 'admin-page-framework' ) {
241 241
 
242 242
         $this->_sTextDomain = $sTextDomain;
243 243
 
244 244
         // Fill the $aMessages property with the keys extracted from the $aDefaults property
245 245
         // with the value of null.  The null is set to let it trigger the __get() method
246 246
         // so that each translation item gets processed individually.
247
-        $this->aMessages    = array_fill_keys(
247
+        $this->aMessages = array_fill_keys(
248 248
             array_keys( $this->aDefaults ),
249 249
             null
250 250
         );
@@ -279,13 +279,13 @@  discard block
 block discarded – undo
279 279
      * @param       string       $sKey
280 280
      * @return      string|array
281 281
      */
282
-    public function get( $sKey='' ) {
283
-        if ( ! $sKey ) {
282
+    public function get( $sKey = '' ) {
283
+        if ( !$sKey ) {
284 284
             return $this->_getAllMessages();
285 285
         }
286 286
         return isset( $this->aMessages[ $sKey ] )
287 287
             ? __( $this->aMessages[ $sKey ], $this->_sTextDomain )
288
-            : __( $this->{$sKey}, $this->_sTextDomain );     // triggers __get()
288
+            : __( $this->{$sKey}, $this->_sTextDomain ); // triggers __get()
289 289
     }
290 290
         /**
291 291
          * Returns the all registered messag items.
Please login to merge, or discard this patch.
factory/_common/form/notice/AdminPageFramework_Form___SubmitNotice.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
          * @return      string
41 41
          */
42 42
         private function _getTransientKey() {
43
-            return 'apf_ntc_' . get_current_user_id();
43
+            return 'apf_ntc_'.get_current_user_id();
44 44
         }
45 45
     
46 46
     /**
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
      * @param       string      $sType If empty, the method will check if a message exists in all types. Otherwise, it checks the existence of a message of the specified type.
53 53
      * @return      boolean     True if a setting notice is set; otherwise, false.
54 54
      */
55
-    public function hasNotice( $sType='' ) {
55
+    public function hasNotice( $sType = '' ) {
56 56
                 
57
-        if ( ! $sType ) {
57
+        if ( !$sType ) {
58 58
             return ( boolean ) count( self::$_aNotices );
59 59
         }
60 60
         
61 61
         // Check if there is a message of the type.
62
-        foreach( self::$_aNotices as $_aNotice ) {
62
+        foreach ( self::$_aNotices as $_aNotice ) {
63 63
             $_sClassAttribute = $this->getElement( 
64 64
                 $_aNotice, 
65 65
                 array( 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      * @param        boolean     $bOverride      (optional) If true, only one message will be shown in the next page load. false: do not override when there is a message of the same id. true: override the previous one.
99 99
      * @return       void
100 100
      */
101
-    public function set( $sMessage, $sType='error', $asAttributes=array(), $bOverride=true ) {
101
+    public function set( $sMessage, $sType = 'error', $asAttributes = array(), $bOverride = true ) {
102 102
         
103 103
         // If the array is empty, schedule the task of saving the array at shutdown.
104 104
         if ( empty( self::$_aNotices ) ) {
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         $_sID = md5( trim( $sMessage ) );
109 109
             
110 110
         // If the override is false and a message is already set, do not add.
111
-        if ( ! $bOverride && isset( self::$_aNotices[ $_sID ] ) ) {
111
+        if ( !$bOverride && isset( self::$_aNotices[ $_sID ] ) ) {
112 112
             return;
113 113
         }
114 114
 
@@ -118,14 +118,14 @@  discard block
 block discarded – undo
118 118
         }
119 119
         
120 120
         $_aAttributes = $this->getAsArray( $asAttributes );
121
-        if ( is_string( $asAttributes ) && ! empty( $asAttributes ) ) {
121
+        if ( is_string( $asAttributes ) && !empty( $asAttributes ) ) {
122 122
             $_aAttributes[ 'id' ] = $asAttributes;
123 123
         }
124 124
         self::$_aNotices[ $_sID ] = array(
125 125
             'sMessage'      => $sMessage,
126 126
             'aAttributes'   => $_aAttributes + array(
127 127
                 'class'     => $sType,
128
-                'id'        => 'form_submit_notice_' . $_sID,
128
+                'id'        => 'form_submit_notice_'.$_sID,
129 129
             ),
130 130
         );
131 131
 
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         }
167 167
             
168 168
         // By setting false to the 'settings-notice' key, it's possible to disable the notifications set with the framework.
169
-        if ( isset( $_GET[ 'settings-notice' ] ) && ! $_GET[ 'settings-notice' ] ) {    // sanitization unnecessary
169
+        if ( isset( $_GET[ 'settings-notice' ] ) && !$_GET[ 'settings-notice' ] ) {    // sanitization unnecessary
170 170
             return; 
171 171
         }
172 172
             
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
          * @return      void
142 142
          */
143 143
         public function _replyToSaveNotices() {
144
-            if ( empty( self::$_aNotices ) ) { 
144
+            if ( empty( self::$_aNotices ) ) {
145 145
                 return; 
146 146
             }            
147 147
             $_bResult = $this->setTransient( 
@@ -161,12 +161,13 @@  discard block
 block discarded – undo
161 161
         
162 162
         // Retrieve the notifications set in a transient.
163 163
         $_aNotices = $this->_getNotices();
164
-        if ( false === $_aNotices ) { 
164
+        if ( false === $_aNotices ) {
165 165
             return; 
166 166
         }
167 167
             
168 168
         // By setting false to the 'settings-notice' key, it's possible to disable the notifications set with the framework.
169
-        if ( isset( $_GET[ 'settings-notice' ] ) && ! $_GET[ 'settings-notice' ] ) {    // sanitization unnecessary
169
+        if ( isset( $_GET[ 'settings-notice' ] ) && ! $_GET[ 'settings-notice' ] ) {
170
+// sanitization unnecessary
170 171
             return; 
171 172
         }
172 173
             
Please login to merge, or discard this patch.
factory/_common/form/_model/AdminPageFramework_Form_Model___LastInput.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             $_sPageSlug = $this->getHTTPQueryGET( 'page', '' );
57 57
             $_sTabSlug  = $this->getHTTPQueryGET( 'tab', '' );
58 58
             $_sUserID   = get_current_user_id();
59
-            return "apf_li_" . md5(
59
+            return "apf_li_".md5(
60 60
                 $_sPageNow
61 61
                 . $_sPageSlug
62 62
                 . $_sTabSlug
@@ -94,13 +94,13 @@  discard block
 block discarded – undo
94 94
          * @return      void
95 95
          */
96 96
         public function _replyToSave() {
97
-            if ( ! isset( self::$_aLastInputs ) ) {
97
+            if ( !isset( self::$_aLastInputs ) ) {
98 98
                 return;
99 99
             }
100 100
             $this->setTransient(
101 101
                 $this->sTransientKey,
102 102
                 self::$_aLastInputs,
103
-                60*60     // store it for 1 hour
103
+                60 * 60     // store it for 1 hour
104 104
             );
105 105
         }
106 106
 
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
             $_aLastInputs = self::$_aCaches[ $this->sTransientKey ];
121 121
         } else {
122 122
             $_aLastInputs = $this->getTransient( $this->sTransientKey );
123
-            self::$_aCaches[ $this->sTransientKey ]  = $_aLastInputs;
123
+            self::$_aCaches[ $this->sTransientKey ] = $_aLastInputs;
124 124
             if ( false !== $_aLastInputs ) {
125
-                $this->delete();    // deletes at the end of the script.
125
+                $this->delete(); // deletes at the end of the script.
126 126
             }
127 127
         }
128 128
 
Please login to merge, or discard this patch.