Completed
Push — master ( c1c82d...7206f2 )
by Jared
18:17
created
lib/image/timber-image-operation-resize.php 1 patch
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,6 +41,10 @@  discard block
 block discarded – undo
41 41
 		return $result;
42 42
 	}
43 43
 
44
+	/**
45
+	 * @param string $load_filename
46
+	 * @param string $save_filename
47
+	 */
44 48
 	protected function run_animated_gif( $load_filename, $save_filename ) {
45 49
 		$image = wp_get_image_editor( $load_filename );
46 50
 		$current_size = $image->get_size();
@@ -130,7 +134,7 @@  discard block
 block discarded – undo
130 134
 	 *                               (ex: /src/var/www/wp-content/uploads/my-pic.jpg)
131 135
 	 * @param  string $save_filename filepath (not URL) where result file should be saved
132 136
 	 *                               (ex: /src/var/www/wp-content/uploads/my-pic-300x200-c-default.jpg)
133
-	 * @return bool                  true if everything went fine, false otherwise
137
+	 * @return boolean|null                  true if everything went fine, false otherwise
134 138
 	 */
135 139
 	public function run($load_filename, $save_filename) {
136 140
 		//should be resized by gif resizer
Please login to merge, or discard this patch.
lib/image/timber-image-operation-tojpg.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -48,6 +48,7 @@
 block discarded – undo
48 48
 	}
49 49
 
50 50
 	/**
51
+	 * @param string $filename
51 52
 	 * @return resource an image identifier representing the image obtained from the given filename
52 53
 	 *                  will return the same data type regardless of whether the source is gif or png
53 54
 	 */
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 	 *                               (ex: /src/var/www/wp-content/uploads/my-pic.png)
36 36
 	 * @return bool                  true if everything went fine, false otherwise
37 37
 	 */
38
-	function run($load_filename, $save_filename){
38
+	function run($load_filename, $save_filename) {
39 39
 		$input = self::image_create( $load_filename );
40 40
 		list( $width, $height ) = getimagesize( $load_filename );
41 41
 		$output = imagecreatetruecolor( $width, $height );
Please login to merge, or discard this patch.
lib/timber-comment.php 2 patches
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -240,8 +240,6 @@
 block discarded – undo
240 240
 	 * Enqueue the WP threaded comments javascript,
241 241
 	 * and fetch the reply link for various comments.
242 242
 	 * @api
243
-	 * @param int $comment_id
244
-	 * @param int $post_id
245 243
 	 * @return string
246 244
 	 */
247 245
 	public function reply_link( $reply_text = 'Reply' ) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 		$this->init($cid);
45 45
 	}
46 46
 
47
-	function __toString(){
47
+	function __toString() {
48 48
 		return $this->content();
49 49
 	}
50 50
 
Please login to merge, or discard this patch.
lib/timber-helper.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 *
177 177
 	 *
178 178
 	 * @param mixed $arg that you want to error_log
179
-	 * @return void
179
+	 * @return null|boolean
180 180
 	 */
181 181
 	public static function error_log( $arg ) {
182 182
 		if ( !WP_DEBUG ) {
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 	 *
209 209
 	 * @param string  $text
210 210
 	 * @param int     $num_words
211
-	 * @param string|null|false  $more text to appear in "Read more...". Null to use default, false to hide
211
+	 * @param boolean  $more text to appear in "Read more...". Null to use default, false to hide
212 212
 	 * @param string  $allowed_tags
213 213
 	 * @return string
214 214
 	 */
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,9 @@
 block discarded – undo
48 48
 
49 49
 			// lock timeout shouldn't be higher than 5 seconds, unless
50 50
 			// remote calls with high timeouts are made here
51
-			if ( $enable_transients )
52
-				self::_lock_transient( $slug, $lock_timeout );
51
+			if ( $enable_transients ) {
52
+							self::_lock_transient( $slug, $lock_timeout );
53
+			}
53 54
 
54 55
 			$data = $callback();
55 56
 
Please login to merge, or discard this patch.
lib/timber-image-helper.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	 * Generates a new image with increased size, for display on Retina screens.
86 86
 	 *
87 87
 	 * @param string  $src
88
-	 * @param float   $multiplier
88
+	 * @param integer   $multiplier
89 89
 	 * @param boolean $force
90 90
 	 *
91 91
 	 * @return string url to the new image
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 	 * @param int     $h
137 137
 	 * @param string  $color
138 138
 	 * @param bool    $force
139
-	 * @return mixed|null|string
139
+	 * @return string
140 140
 	 */
141 141
 	public static function letterbox( $src, $w, $h, $color = '#000000', $force = false ) {
142 142
 		$op = new TimberImageOperationLetterbox($w, $h, $color);
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -325,7 +325,8 @@
 block discarded – undo
325 325
 		);
326 326
 		$upload_dir = wp_upload_dir();
327 327
 		$tmp = $url;
328
-		if ( 0 === strpos($tmp, ABSPATH) ) { // we've been given a dir, not an url
328
+		if ( 0 === strpos($tmp, ABSPATH) ) {
329
+// we've been given a dir, not an url
329 330
 			$result['absolute'] = true;
330 331
 			if ( 0 === strpos($tmp, $upload_dir['basedir']) ) {
331 332
 				$result['base']= self::BASE_UPLOADS; // upload based
Please login to merge, or discard this patch.
lib/timber-image.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -301,7 +301,7 @@
 block discarded – undo
301 301
 	 * 	   <img src="{{ post.thumbnail.src|resize(500) }}" alt="A sumo wrestler" />
302 302
 	 * {% endif %}
303 303
 	 * ```
304
-	 * @return float
304
+	 * @return integer
305 305
 	 */
306 306
 	public function aspect() {
307 307
 		$w = intval($this->width());
Please login to merge, or discard this patch.
lib/timber-menu-item.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
 	/**
150 150
 	 *
151 151
 	 * @internal
152
-	 * @return bool 
152
+	 * @return boolean|null 
153 153
 	 */
154 154
 	function update_child_levels() {
155 155
 		if (is_array($this->children)) {
Please login to merge, or discard this patch.
lib/timber-menu.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
 	public $title;
74 74
 
75 75
 	/**
76
-	 * @param int|string $slug
76
+	 * @param integer $slug
77 77
 	 */
78 78
 	function __construct($slug = 0) {
79 79
 		$locations = get_nav_menu_locations();
Please login to merge, or discard this patch.
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 		$menu = wp_get_nav_menu_items($menu_id);
102 102
 		if ($menu) {
103 103
 			_wp_menu_item_classes_by_context($menu);
104
-			if (is_array($menu)){
104
+			if (is_array($menu)) {
105 105
 				$menu = self::order_children($menu);
106 106
 			}
107 107
 			$this->items = $menu;
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 				$mi->__title = $mi->post_title;
124 124
 			}
125 125
 			_wp_menu_item_classes_by_context($menu);
126
-			if (is_array($menu)){
126
+			if (is_array($menu)) {
127 127
 				$menu = self::order_children($menu);
128 128
 			}
129 129
 			$this->items = $menu;
@@ -201,13 +201,13 @@  discard block
 block discarded – undo
201 201
 				$item->__title = $item->title;
202 202
 				unset($item->title);
203 203
 			}
204
-			if(isset($item->ID)){
205
-				if (is_object($item) && get_class($item) == 'WP_Post'){
204
+			if(isset($item->ID)) {
205
+				if (is_object($item) && get_class($item) == 'WP_Post') {
206 206
 					$old_menu_item = $item;
207 207
 					$item = new $this->PostClass($item);
208 208
 				}
209 209
 				$menu_item = new $this->MenuItemClass($item);
210
-				if (isset($old_menu_item)){
210
+				if (isset($old_menu_item)) {
211 211
 					$menu_item->import_classes($old_menu_item);
212 212
 				}
213 213
 				$index[$item->ID] = $menu_item;
Please login to merge, or discard this patch.
lib/timber-post-getter.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
 
88 88
 	/**
89 89
 	 * @param string|array $arg
90
-	 * @return bool
90
+	 * @return boolean|null
91 91
 	 */
92 92
 	static function is_post_class_or_class_map($arg){
93 93
 		if (is_string($arg) && class_exists($arg)) {
Please login to merge, or discard this patch.
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 			$query = false;
38 38
 		}
39 39
 
40
-		if (is_object($query) && !is_a($query, 'WP_Query') ){
40
+		if (is_object($query) && !is_a($query, 'WP_Query') ) {
41 41
 			// The only object other than a query is a type of post object
42 42
 			$query = array( $query );
43 43
 		}
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
 		}
53 53
 	}
54 54
 
55
-	static function get_pids($query){
55
+	static function get_pids($query) {
56 56
 		$posts = self::get_posts($query);
57 57
 		$pids = array();
58
-		foreach($posts as $post){
59
-			if (isset($post->ID)){
58
+		foreach($posts as $post) {
59
+			if (isset($post->ID)) {
60 60
 				$pids[] = $post->ID;
61 61
 			}
62 62
 		}
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	 * @param string|array $arg
90 90
 	 * @return bool
91 91
 	 */
92
-	static function is_post_class_or_class_map($arg){
92
+	static function is_post_class_or_class_map($arg) {
93 93
 		if (is_string($arg) && class_exists($arg)) {
94 94
 			return true;
95 95
 		}
Please login to merge, or discard this patch.