Passed
Push — develop ( 536ad8...f91847 )
by Paul
05:14 queued 02:20
created
src/MetaBox/Instruction.php 1 patch
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,8 +22,10 @@  discard block
 block discarded – undo
22 22
 	 */
23 23
 	protected function generateInstructions()
24 24
 	{
25
-		$instructions = array_reduce( $this->getInstructions(), function( $html, $metabox ) {
26
-			$fields = array_reduce( $metabox['fields'], function( $html, $field ) use( $metabox ) {
25
+		$instructions = array_reduce( $this->getInstructions(), function( $html, $metabox )
26
+		{
27
+			$fields = array_reduce( $metabox['fields'], function( $html, $field ) use( $metabox )
28
+			{
27 29
 				return $this->validate( $field['condition'] )
28 30
 					? $html . $this->filter( 'instruction', "PostMeta::get('{$field['slug']}');", $field, $metabox ) . PHP_EOL
29 31
 					: $html;
@@ -41,7 +43,8 @@  discard block
 block discarded – undo
41 43
 	 */
42 44
 	protected function getInstructions()
43 45
 	{
44
-		return array_filter( $this->metaboxes, function( $metabox ) {
46
+		return array_filter( $this->metaboxes, function( $metabox )
47
+		{
45 48
 			return $this->validate( $metabox['condition'] )
46 49
 				&& $this->hasPostType( $metabox );
47 50
 		});
@@ -52,7 +55,9 @@  discard block
 block discarded – undo
52 55
 	 */
53 56
 	protected function initInstructions()
54 57
 	{
55
-		if( !$this->showInstructions() )return;
58
+		if( !$this->showInstructions() ) {
59
+			return;
60
+		}
56 61
 		return [
57 62
 			'infodiv' => [
58 63
 				'context' => 'side',
@@ -73,7 +78,8 @@  discard block
 block discarded – undo
73 78
 	 */
74 79
 	protected function showInstructions()
75 80
 	{
76
-		return $this->filter( 'show/instructions', count( array_filter( $this->metaboxes, function( $metabox ) {
81
+		return $this->filter( 'show/instructions', count( array_filter( $this->metaboxes, function( $metabox )
82
+		{
77 83
 			return $this->show( false, $metabox );
78 84
 		})) > 0 );
79 85
 	}
Please login to merge, or discard this patch.