@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add language specification to code blocks

Summary: Add the language specification to code blocks in documentation.

Test Plan: Eyeball it.

Reviewers: chad, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13277

+11
+2
src/docs/contributor/css_coding_standards.diviner
··· 22 22 Phabricator's preprocessor provides some standard color variables. You can 23 23 reference these with `{$color}`. For example: 24 24 25 + lang=css 25 26 span.critical { 26 27 color: {$red}; 27 28 } ··· 78 79 Since many rules are specific to handheld devices, the `.device` class selects 79 80 either tablets or phones: 80 81 82 + lang=css 81 83 .device { 82 84 /* Phone or tablet (not desktop). */ 83 85 }
+9
src/docs/contributor/php_coding_standards.diviner
··· 67 67 68 68 **if/else:** 69 69 70 + lang=php 70 71 if ($some_variable > 3) { 71 72 // ... 72 73 } else if ($some_variable === null) { ··· 81 82 82 83 **for:** 83 84 85 + lang=php 84 86 for ($ii = 0; $ii < 10; $ii++) { 85 87 // ... 86 88 } ··· 90 92 91 93 **foreach:** 92 94 95 + lang=php 93 96 foreach ($map as $key => $value) { 94 97 // ... 95 98 } 96 99 97 100 **switch:** 98 101 102 + lang=php 99 103 switch ($value) { 100 104 case 1: 101 105 // ... ··· 115 119 116 120 **array literals:** 117 121 122 + lang=php 118 123 $junk = array( 119 124 'nuts', 120 125 'bolts', ··· 126 131 127 132 **operators:** 128 133 134 + lang=php 129 135 $a + $b; // Put spaces around operators. 130 136 $omg.$lol; // Exception: no spaces around string concatenation. 131 137 $arr[] = $element; // Couple [] with the array when appending. ··· 133 139 134 140 **function/method calls:** 135 141 142 + lang=php 136 143 // One line 137 144 eject($cargo); 138 145 ··· 143 150 144 151 **function/method definitions:** 145 152 153 + lang=php 146 154 function example_function($base_value, $additional_value) { 147 155 return $base_value + $additional_value; 148 156 } ··· 157 165 158 166 **class:** 159 167 168 + lang=php 160 169 class Dog extends Animal { 161 170 162 171 const CIRCLES_REQUIRED_TO_LIE_DOWN = 3;