SimpleApprovalWorkflowAction   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 6 1
1
<?php
2
/**
3
 * A simple approval step that waits for any assigned user to trigger one of the relevant
4
 * transitions
5
 *
6
 * A more complicated workflow might use a majority, quorum or other type of
7
 * approval functionality
8
 *
9
 * @author     [email protected]
10
 * @license    BSD License (http://silverstripe.org/bsd-license/)
11
 * @package    advancedworkflow
12
 * @subpackage actions
13
 */
14
class SimpleApprovalWorkflowAction extends WorkflowAction {
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
15
	
16
	public static $icon = 'advancedworkflow/images/approval.png';
17
18
	public function execute(WorkflowInstance $workflow) {
19
		// we don't need to do anything for this execution,
20
		// as we're relying on the fact that there's at least 2 outbound transitions
21
		// which will cause the workflow to block and wait. 
22
		return true;
23
	}
24
}
25