| Conditions | 3 | 
| Paths | 2 | 
| Total Lines | 19 | 
| Code Lines | 7 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 6 | ||
| Bugs | 0 | Features | 2 | 
| 1 | <?php | ||
| 64 | public function runStep($step) | ||
| 65 |     { | ||
| 66 | // Get settings | ||
| 67 | $settings = $this->getSettings(); | ||
| 68 | |||
| 69 | // Get element | ||
| 70 | $element = craft()->elements->getElementById($settings->id); | ||
| 71 | |||
| 72 | // Get asset | ||
| 73 | $asset = craft()->assets->getFileById($settings->assets[$step]); | ||
| 74 | |||
| 75 | // Check if element and asset still exists | ||
| 76 |         if (is_null($element) || is_null($asset)) { | ||
| 77 | return true; | ||
| 78 | } | ||
| 79 | |||
| 80 | // Return process status | ||
| 81 | return craft()->youTube->process($element, $asset, $settings->model->handle); | ||
| 82 | } | ||
| 83 | } | ||
| 84 |