| Conditions | 1 |
| Paths | 1 |
| Total Lines | 63 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php |
||
| 56 | private function getProsilverPageData() |
||
| 57 | { |
||
| 58 | $data = array( |
||
| 59 | 1 => array( |
||
| 60 | 'DATE' => 'Feb 8th 2004: The first interface concept', |
||
| 61 | 'TEXT' => 'Moving the info panel to the right-hand side so the focus is on the post content', |
||
| 62 | 'IMAGE' => 'prosilver_history01.jpg'), |
||
| 63 | 2 => array( |
||
| 64 | 'DATE' => 'Feb 14th 2004: The first admin concept', |
||
| 65 | 'TEXT' => 'Started to think about how the admin layout could be better organised. An exciting thing to do on Valentines day I know...', |
||
| 66 | 'IMAGE' => 'prosilver_history02.jpg'), |
||
| 67 | 3 => array( |
||
| 68 | 'DATE' => 'Feb 24th 2004: An example topic page ', |
||
| 69 | 'TEXT' => 'This page is trying different ideas with the side panel and links', |
||
| 70 | 'IMAGE' => 'prosilver_history03.jpg'), |
||
| 71 | 4 => array( |
||
| 72 | 'DATE' => 'June 2004: Board index', |
||
| 73 | 'TEXT' => 'There was quite a gap between the first flurry of activity and this board index design. Must have been busy with other stuff.', |
||
| 74 | 'IMAGE' => 'prosilver_history04.jpg'), |
||
| 75 | 5 => array( |
||
| 76 | 'DATE' => 'July 2004: Board index', |
||
| 77 | 'TEXT' => 'By now a fully marked-up version of this design was running on our super-sekrit testing forum that had frequent bug infestations...', |
||
| 78 | 'IMAGE' => 'prosilver_history05.jpg'), |
||
| 79 | 6 => array( |
||
| 80 | 'DATE' => 'July 2004: New smilies', |
||
| 81 | 'TEXT' => 'Why not have more face shaped smilies? I tried a few concepts of graphic elements for the new website. Also the first sign of a new logo idea.', |
||
| 82 | 'IMAGE' => 'prosilver_history06.jpg'), |
||
| 83 | 7 => array( |
||
| 84 | 'DATE' => 'August 2004: Colour variations', |
||
| 85 | 'TEXT' => 'Some half-hearted attempts at trying different colour schemes. Was never really that happy with the silver and beige shades.', |
||
| 86 | 'IMAGE' => 'prosilver_history07.jpg'), |
||
| 87 | 8 => array( |
||
| 88 | 'DATE' => 'November 2004: proSilver MkII', |
||
| 89 | 'TEXT' => 'I wasn\'t happy with the previous colour scheme, so MkII used a much stronger palette.', |
||
| 90 | 'IMAGE' => 'prosilver_history08.jpg'), |
||
| 91 | 9 => array( |
||
| 92 | 'DATE' => 'December 2004: proSilver MkII', |
||
| 93 | 'TEXT' => 'Read the topic content below for the explaination.', |
||
| 94 | 'IMAGE' => 'prosilver_history09.jpg'), |
||
| 95 | 10 => array( |
||
| 96 | 'DATE' => 'January 15th 2005: Logo concepts I', |
||
| 97 | 'TEXT' => 'Some logo variations were put to the vote to the wider phpBB team.', |
||
| 98 | 'IMAGE' => 'prosilver_history10.jpg'), |
||
| 99 | 11 => array( |
||
| 100 | 'DATE' => 'January 15th 2005: Logo concepts II', |
||
| 101 | 'TEXT' => 'More logo variations.', |
||
| 102 | 'IMAGE' => 'prosilver_history11.jpg'), |
||
| 103 | 12 => array( |
||
| 104 | 'DATE' => 'January 15th 2005: Olympus!', |
||
| 105 | 'TEXT' => 'The new name for phpBB3, and also the name of the largest mountain on Mars...', |
||
| 106 | 'IMAGE' => 'prosilver_history12.jpg'), |
||
| 107 | 13 => array( |
||
| 108 | 'DATE' => 'January 2005: Onwards', |
||
| 109 | 'TEXT' => 'A lot of time spent creating templates and marking up the new design.', |
||
| 110 | 'IMAGE' => 'prosilver_history13.gif'), |
||
| 111 | 14 => array( |
||
| 112 | 'DATE' => 'February 2006: phpBB3 website', |
||
| 113 | 'TEXT' => 'Design for new website created.', |
||
| 114 | 'IMAGE' => 'prosilver_history14.jpg' |
||
| 115 | )); |
||
| 116 | |||
| 117 | return $data; |
||
| 118 | } |
||
| 119 | } |
||
| 120 |