Completed
Branch dev (a3767f)
by Michael
40:38
created
development/factory/_abstract/AdminPageFramework_Factory_Model.php 3 patches
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -299,8 +299,6 @@
 block discarded – undo
299 299
      * @since       DEVVER      Changed back the visibility scope to protected as there is the `getFieldErrors()` public method.
300 300
      * @access      protected
301 301
      * @internal
302
-     * @param       string      $sID        deprecated
303
-     * @param       boolean     $bDelete    whether or not the transient should be deleted after retrieving it. 
304 302
      * @return      array
305 303
      * @deprecated  DEVVER      Use `getFieldErrors()` instead. Kept for backward compatibility.
306 304
      */
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             'title'      => null,
65 65
             'help_aside' => null,
66 66
         );
67
-        if ( ! $aFieldset[ 'help' ] ) {
67
+        if ( !$aFieldset[ 'help' ] ) {
68 68
             return;
69 69
         }
70 70
         $this->oHelpPane->_addHelpTextForFormFields( 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     public function _replyToModifySectionsets( $aSectionsets ) {        
97 97
         // Apply filters to added sectionsets.
98 98
         return $this->oUtil->addAndApplyFilter( 
99
-            $this,  // caller factory object
99
+            $this, // caller factory object
100 100
             "sections_{$this->oProp->sClassName}", 
101 101
             $aSectionsets
102 102
         );
@@ -113,14 +113,14 @@  discard block
 block discarded – undo
113 113
 // $aSectionsets can be used
114 114
 
115 115
         // Apply filters to added fieldsets
116
-        foreach( $aFieldsets as $_sSectionID => $_aFields ) {
116
+        foreach ( $aFieldsets as $_sSectionID => $_aFields ) {
117 117
             $aFieldsets[ $_sSectionID ] = $this->oUtil->addAndApplyFilter(
118 118
                 $this,
119 119
                 "fields_{$this->oProp->sClassName}_{$_sSectionID}",
120 120
                 $_aFields
121 121
             ); 
122 122
         }
123
-        $aFieldsets =  $this->oUtil->addAndApplyFilter( 
123
+        $aFieldsets = $this->oUtil->addAndApplyFilter( 
124 124
             $this,
125 125
             "fields_{$this->oProp->sClassName}",
126 126
             $aFieldsets
@@ -160,12 +160,12 @@  discard block
 block discarded – undo
160 160
      */
161 161
     public function _replyToModifyFieldsetDefinition( $aFieldset /*, $aSectionsets */ ) {
162 162
         
163
-        $_sFieldPart    = '_' . implode( '_', $aFieldset[ '_field_path_array' ] );
163
+        $_sFieldPart    = '_'.implode( '_', $aFieldset[ '_field_path_array' ] );
164 164
         $_sSectionPart  = implode( '_', $aFieldset[ '_section_path_array' ] );
165 165
         $_sSectionPart  = $this->oUtil->getAOrB(
166 166
             '_default' === $_sSectionPart,
167 167
             '',
168
-            '_' . $_sSectionPart
168
+            '_'.$_sSectionPart
169 169
         );
170 170
         return $this->oUtil->addAndApplyFilter(
171 171
             $this,
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
     public function _replyToGetSavedFormData() {
249 249
         return $this->oUtil->addAndApplyFilter(
250 250
             $this, // the caller factory object
251
-            'options_' . $this->oProp->sClassName,
251
+            'options_'.$this->oProp->sClassName,
252 252
             $this->oProp->aOptions      // subject value to be filtered
253 253
         );         
254 254
     }
@@ -377,16 +377,16 @@  discard block
 block discarded – undo
377 377
      */
378 378
     public function _setLastInputs( array $aLastInputs ) {
379 379
         return $this->oUtil->setTransient( 
380
-            'apf_tfd' . md5( 'temporary_form_data_' . $this->oProp->sClassName . get_current_user_id() ),
380
+            'apf_tfd'.md5( 'temporary_form_data_'.$this->oProp->sClassName.get_current_user_id() ),
381 381
             $aLastInputs, 
382
-            60*60 
382
+            60 * 60 
383 383
         );
384 384
     }
385 385
         /**
386 386
          * An alias of `_setLastInputs()`.
387 387
          * @deprecated      DEVVER
388 388
          */
389
-        public function _setLastInput( $aLastInputs )  {
389
+        public function _setLastInput( $aLastInputs ) {
390 390
             return $this->_setLastInputs( $aLastInputs );
391 391
         }
392 392
      
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * but it requires to call the setUp() method in the overridden method so it's not that useful.
46 46
      * @internal
47 47
      */
48
-    protected function _setUp() { 
48
+    protected function _setUp() {
49 49
         $this->setUp();
50 50
     }    
51 51
     
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      * @since       DEVVER
94 94
      * @return      array       The modified sectionsets definition array.
95 95
      */    
96
-    public function _replyToModifySectionsets( $aSectionsets ) {        
96
+    public function _replyToModifySectionsets( $aSectionsets ) {
97 97
         // Apply filters to added sectionsets.
98 98
         return $this->oUtil->addAndApplyFilter( 
99 99
             $this,  // caller factory object
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
      */
193 193
     public function _replyToFormatFieldsetDefinition( $aFieldset, $aSectionsets ) {
194 194
 
195
-        if ( empty( $aFieldset ) ) { 
195
+        if ( empty( $aFieldset ) ) {
196 196
             return $aFieldset; 
197 197
         }
198 198
         return $aFieldset;
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
          * An alias of `_setLastInputs()`.
387 387
          * @deprecated      DEVVER
388 388
          */
389
-        public function _setLastInput( $aLastInputs )  {
389
+        public function _setLastInput( $aLastInputs ) {
390 390
             return $this->_setLastInputs( $aLastInputs );
391 391
         }
392 392
      
Please login to merge, or discard this patch.
factory/_abstract/form/errors/AdminPageFramework_Form___FieldError.php 3 patches
Doc Comments   -5 removed lines patch added patch discarded remove patch
@@ -60,10 +60,6 @@  discard block
 block discarded – undo
60 60
      * `
61 61
      * @since        DEVVER
62 62
      * @access       public
63
-     * @param        string      $sMessage       the text message to be displayed.
64
-     * @param        string      $sType          (optional) the type of the message, either "error" or "updated"  is used.
65
-     * @param        array       $asAttributes   (optional) the tag attribute array applied to the message container HTML element. If a string is given, it is used as the ID attribute value.
66
-     * @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.
67 63
      * @return       void
68 64
      */
69 65
     public function set( $aErrors ) {
@@ -107,7 +103,6 @@  discard block
 block discarded – undo
107 103
      * Retrieves the settings error array set by the user in the validation callback.
108 104
      * 
109 105
      * @since       DEVVER
110
-     * @param       boolean     $bDelete    whether or not the transient should be deleted after retrieving it. 
111 106
      * @return      array
112 107
      */
113 108
     public function get() {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -91,11 +91,11 @@  discard block
 block discarded – undo
91 91
          * @return      void
92 92
          */ 
93 93
         public function _replyToSaveFieldErrors() {
94
-            if ( ! isset( self::$_aErrors ) ) { 
94
+            if ( !isset( self::$_aErrors ) ) { 
95 95
                 return; 
96 96
             }
97 97
             $this->setTransient( 
98
-                "apf_field_erros_" . get_current_user_id(),  
98
+                "apf_field_erros_".get_current_user_id(),  
99 99
                 self::$_aErrors, 
100 100
                 300     // store it for 5 minutes ( 60 seconds * 5 )
101 101
             );    
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         static $_aFieldErrors;
116 116
         
117 117
         // Find the transient.
118
-        $_sTransientKey = "apf_field_erros_" . get_current_user_id();
118
+        $_sTransientKey = "apf_field_erros_".get_current_user_id();
119 119
         $_sID           = md5( $this->sCallerID );
120 120
         
121 121
         $_aFieldErrors  = isset( $_aFieldErrors ) 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
          * @internal
146 146
          */
147 147
         public function _replyToDeleteFieldErrors() {
148
-            $this->deleteTransient( "apf_field_erros_" . get_current_user_id() );
148
+            $this->deleteTransient( "apf_field_erros_".get_current_user_id() );
149 149
         }                
150 150
         
151 151
 }
152 152
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
          * @return      void
92 92
          */ 
93 93
         public function _replyToSaveFieldErrors() {
94
-            if ( ! isset( self::$_aErrors ) ) { 
94
+            if ( ! isset( self::$_aErrors ) ) {
95 95
                 return; 
96 96
             }
97 97
             $this->setTransient( 
Please login to merge, or discard this patch.
factory/_abstract/_model/AdminPageFramework_BeautifiedVersionHeader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * If accessed from a console, include the registry class to laod 'AdminPageFramework_Registry_Base'.
12 12
  */
13 13
 if ( php_sapi_name() === 'cli' ) {
14
-    $_sFrameworkFilePath = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/admin-page-framework.php';
14
+    $_sFrameworkFilePath = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ).'/admin-page-framework.php';
15 15
     if ( file_exists( $_sFrameworkFilePath ) ) {
16 16
         include_once( $_sFrameworkFilePath );
17 17
     }
Please login to merge, or discard this patch.
factory/_abstract/_model/AdminPageFramework_InclusionClassFilesHeader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * If accessed from a console, include the registry class to laod 'AdminPageFramework_Registry_Base'.
12 12
  */
13 13
 if ( php_sapi_name() === 'cli' ) {
14
-    $_sFrameworkFilePath = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/admin-page-framework.php';
14
+    $_sFrameworkFilePath = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ).'/admin-page-framework.php';
15 15
     if ( file_exists( $_sFrameworkFilePath ) ) {
16 16
         include_once( $_sFrameworkFilePath );
17 17
     }
Please login to merge, or discard this patch.
development/factory/_abstract/form/AdminPageFramework_Form.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     /**
39 39
      * Stores section set definitions.
40 40
      */
41
-    public $aSectionsets  = array(
41
+    public $aSectionsets = array(
42 42
         '_default' => array(
43 43
             'section_id'    => '_default',
44 44
         ),
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
     /**
48 48
      * Stores field set definitions.
49 49
      */    
50
-    public $aFieldsets    = array();
50
+    public $aFieldsets = array();
51 51
     
52 52
     /**
53 53
      * Multi-dimensional array holding the saved form data.
54 54
      */
55
-    public $aSavedData    = array();
55
+    public $aSavedData = array();
56 56
         
57 57
     /**
58 58
      * The capability level of the form.
@@ -62,13 +62,13 @@  discard block
 block discarded – undo
62 62
      * Each secitonset and fieldset has individual capability. If they are not set,
63 63
      * This value will be applied.
64 64
      */            
65
-    public $sCapability = '';       // default - an empty string
65
+    public $sCapability = ''; // default - an empty string
66 66
     
67 67
     /**
68 68
      * Stores callback functions.
69 69
      * Each value will have a callback.
70 70
      */
71
-    public $aCallbacks    = array(
71
+    public $aCallbacks = array(
72 72
     
73 73
         /**
74 74
          * @return      string      The form default capability level.    
Please login to merge, or discard this patch.
development/factory/_abstract/form/AdminPageFramework_Form_View.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
             '' // default value
38 38
         );    
39 39
     
40
-        if ( ! $this->canUserView( $this->sCapability ) ) {
40
+        if ( !$this->canUserView( $this->sCapability ) ) {
41 41
             return '';
42 42
         }    
43 43
 
Please login to merge, or discard this patch.
_abstract/form/_view/css/AdminPageFramework_Form_View___CSS_Base.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Admin Page Framework
4
- * 
5
- * http://en.michaeluno.jp/admin-page-framework/
6
- * Copyright (c) 2013-2015 Michael Uno; Licensed MIT
7
- * 
8
- */
3
+         * Admin Page Framework
4
+         * 
5
+         * http://en.michaeluno.jp/admin-page-framework/
6
+         * Copyright (c) 2013-2015 Michael Uno; Licensed MIT
7
+         * 
8
+         */
9 9
 
10 10
 /**
11 11
  * Provides methods to handle importing options.
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @since   DEVVER
30 30
      */
31 31
     public function add( $sCSSRules ) {
32
-        $this->aAdded[] = $sCSSRules;
32
+        $this->aAdded[ ] = $sCSSRules;
33 33
     }
34 34
     
35 35
     /**
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function get() {
40 40
         
41
-        $_sCSSRules  = $this->_get() . PHP_EOL;
41
+        $_sCSSRules  = $this->_get().PHP_EOL;
42 42
         $_sCSSRules .= $this->_getVersionSpecific();
43 43
         $_sCSSRules .= implode( PHP_EOL, $this->aAdded );
44 44
         return $this->isDebugMode()
Please login to merge, or discard this patch.
_abstract/form/_view/css/AdminPageFramework_Form_View___CSS_FieldError.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      * @since       DEVVER
22 22
      * @return      string
23 23
      */
24
-    protected function _get() {        
24
+    protected function _get() {
25 25
         return $this->_getRules();
26 26
     }
27 27
         /**
Please login to merge, or discard this patch.
generator/field/AdminPageFramework_Form_View___Generate_FieldAddress.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      * @return      string      The generated field name model.
32 32
      */
33 33
     public function getModel() {
34
-        return $this->get() . '|' . $this->sIndexMark;
34
+        return $this->get().'|'.$this->sIndexMark;
35 35
     }
36 36
         
37 37
         /**
Please login to merge, or discard this patch.