@@ -211,7 +211,7 @@ |
||
| 211 | 211 | echo '<input type="hidden" name="permissions_success" value="true">'; |
| 212 | 212 | echo '<div class="text-left">'; |
| 213 | 213 | echo '<button type="submit" class="btn btn-success">Setup Database</button>'; |
| 214 | - echo '</div>'; |
|
| 214 | + echo '</div>'; |
|
| 215 | 215 | echo '</form>'; |
| 216 | 216 | echo '</div>'; |
| 217 | 217 | } |
@@ -1,114 +1,114 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | $error = false; |
| 3 | -if (!is_writable('../uploads/estimates')){ |
|
| 3 | +if (!is_writable('../uploads/estimates')) { |
|
| 4 | 4 | $error = true; |
| 5 | 5 | $requirement_estimates = "<span class='label label-danger'>No (Make uploads/estimates writable) - Permissions 0755</span>"; |
| 6 | 6 | } else { |
| 7 | 7 | $requirement_estimates = "<span class='label label-success'>Ok</span>"; |
| 8 | 8 | } |
| 9 | -if (!is_writable('../uploads/proposals')){ |
|
| 9 | +if (!is_writable('../uploads/proposals')) { |
|
| 10 | 10 | $error = true; |
| 11 | 11 | $requirement_proposals = "<span class='label label-danger'>No (Make uploads/proposals writable) - Permissions 0755</span>"; |
| 12 | 12 | } else { |
| 13 | 13 | $requirement_proposals = "<span class='label label-success'>Ok</span>"; |
| 14 | 14 | } |
| 15 | -if (!is_writable('../uploads/ticket_attachments')){ |
|
| 15 | +if (!is_writable('../uploads/ticket_attachments')) { |
|
| 16 | 16 | $error = true; |
| 17 | 17 | $requirement1 = "<span class='label label-danger'>No (Make uploads/ticket_attachments writable) - Permissions 0755</span>"; |
| 18 | 18 | } else { |
| 19 | 19 | $requirement1 = "<span class='label label-success'>Ok</span>"; |
| 20 | 20 | } |
| 21 | -if (!is_writable('../uploads/tasks')){ |
|
| 21 | +if (!is_writable('../uploads/tasks')) { |
|
| 22 | 22 | $error = true; |
| 23 | 23 | $requirement2 = "<span class='label label-danger'>No (Make uploads/tasks writable) - Permissions 0755</span>"; |
| 24 | 24 | } else { |
| 25 | 25 | $requirement2 = "<span class='label label-success'>Ok</span>"; |
| 26 | 26 | } |
| 27 | -if (!is_writable('../uploads/staff_profile_images')){ |
|
| 27 | +if (!is_writable('../uploads/staff_profile_images')) { |
|
| 28 | 28 | $error = true; |
| 29 | 29 | $requirement3 = "<span class='label label-danger'>No (Make uploads/staff_profile_images writable) - Permissions 0755</span>"; |
| 30 | 30 | } else { |
| 31 | 31 | $requirement3 = "<span class='label label-success'>Ok</span>"; |
| 32 | 32 | } |
| 33 | -if (!is_writable('../uploads/projects')){ |
|
| 33 | +if (!is_writable('../uploads/projects')) { |
|
| 34 | 34 | $error = true; |
| 35 | 35 | $requirement4 = "<span class='label label-danger'>No (Make uploads/projects writable) - Permissions 0755</span>"; |
| 36 | 36 | } else { |
| 37 | 37 | $requirement4 = "<span class='label label-success'>Ok</span>"; |
| 38 | 38 | } |
| 39 | -if (!is_writable('../uploads/newsfeed')){ |
|
| 39 | +if (!is_writable('../uploads/newsfeed')) { |
|
| 40 | 40 | $error = true; |
| 41 | 41 | $requirement5 = "<span class='label label-danger'>No (Make uploads/newsfeed writable) - Permissions 0755</span>"; |
| 42 | 42 | } else { |
| 43 | 43 | $requirement5 = "<span class='label label-success'>Ok</span>"; |
| 44 | 44 | } |
| 45 | -if (!is_writable('../uploads/leads')){ |
|
| 45 | +if (!is_writable('../uploads/leads')) { |
|
| 46 | 46 | $error = true; |
| 47 | 47 | $requirement6 = "<span class='label label-danger'>No (Make uploads/leads writable) - Permissions 0755</span>"; |
| 48 | 48 | } else { |
| 49 | 49 | $requirement6 = "<span class='label label-success'>Ok</span>"; |
| 50 | 50 | } |
| 51 | -if (!is_writable('../uploads/invoices')){ |
|
| 51 | +if (!is_writable('../uploads/invoices')) { |
|
| 52 | 52 | $error = true; |
| 53 | 53 | $requirement7 = "<span class='label label-danger'>No (Make uploads/invoices writable) - Permissions 0755</span>"; |
| 54 | 54 | } else { |
| 55 | 55 | $requirement7 = "<span class='label label-success'>Ok</span>"; |
| 56 | 56 | } |
| 57 | -if (!is_writable('../uploads/expenses')){ |
|
| 57 | +if (!is_writable('../uploads/expenses')) { |
|
| 58 | 58 | $error = true; |
| 59 | 59 | $requirement8 = "<span class='label label-danger'>No (Make uploads/expenses writable) - Permissions 0755</span>"; |
| 60 | 60 | } else { |
| 61 | 61 | $requirement8 = "<span class='label label-success'>Ok</span>"; |
| 62 | 62 | } |
| 63 | -if (!is_writable('../uploads/discussions')){ |
|
| 63 | +if (!is_writable('../uploads/discussions')) { |
|
| 64 | 64 | $error = true; |
| 65 | 65 | $requirement9 = "<span class='label label-danger'>No (Make uploads/discussions writable) - Permissions 0755</span>"; |
| 66 | 66 | } else { |
| 67 | 67 | $requirement9 = "<span class='label label-success'>Ok</span>"; |
| 68 | 68 | } |
| 69 | -if (!is_writable('../uploads/contracts')){ |
|
| 69 | +if (!is_writable('../uploads/contracts')) { |
|
| 70 | 70 | $error = true; |
| 71 | 71 | $requirement10 = "<span class='label label-danger'>No (Make uploads/contracts writable) - Permissions 0755</span>"; |
| 72 | 72 | } else { |
| 73 | 73 | $requirement10 = "<span class='label label-success'>Ok</span>"; |
| 74 | 74 | } |
| 75 | -if (!is_writable('../uploads/company')){ |
|
| 75 | +if (!is_writable('../uploads/company')) { |
|
| 76 | 76 | $error = true; |
| 77 | 77 | $requirement11 = "<span class='label label-danger'>No (Make uploads/company writable) - Permissions 0755</span>"; |
| 78 | 78 | } else { |
| 79 | 79 | $requirement11 = "<span class='label label-success'>Ok</span>"; |
| 80 | 80 | } |
| 81 | -if (!is_writable('../uploads/clients')){ |
|
| 81 | +if (!is_writable('../uploads/clients')) { |
|
| 82 | 82 | $error = true; |
| 83 | 83 | $requirement12 = "<span class='label label-danger'>No (Make uploads/clients writable) - Permissions 0755</span>"; |
| 84 | 84 | } else { |
| 85 | 85 | $requirement12 = "<span class='label label-success'>Ok</span>"; |
| 86 | 86 | } |
| 87 | -if (!is_writable('../uploads/client_profile_images')){ |
|
| 87 | +if (!is_writable('../uploads/client_profile_images')) { |
|
| 88 | 88 | $error = true; |
| 89 | 89 | $requirement13 = "<span class='label label-danger'>No (Make uploads/client_profile_images writable) - Permissions 0755</span>"; |
| 90 | 90 | } else { |
| 91 | 91 | $requirement13 = "<span class='label label-success'>Ok</span>"; |
| 92 | 92 | } |
| 93 | -if (!is_writable('../application/config')){ |
|
| 93 | +if (!is_writable('../application/config')) { |
|
| 94 | 94 | $error = true; |
| 95 | 95 | $requirement14 = "<span class='label label-danger'>No (Make application/config/ writable - Permissions 0755</span>"; |
| 96 | 96 | } else { |
| 97 | 97 | $requirement14 = "<span class='label label-success'>Ok</span>"; |
| 98 | 98 | } |
| 99 | -if (!is_writable('../application/config/config.php')){ |
|
| 99 | +if (!is_writable('../application/config/config.php')) { |
|
| 100 | 100 | $error = true; |
| 101 | 101 | $requirement15 = "<span class='label label-danger'>No (Make application/config/config.php writable) - Permissions 0644</span>"; |
| 102 | 102 | } else { |
| 103 | 103 | $requirement15 = "<span class='label label-success'>Ok</span>"; |
| 104 | 104 | } |
| 105 | -if (!is_writable('../application/config/app-config-sample.php')){ |
|
| 105 | +if (!is_writable('../application/config/app-config-sample.php')) { |
|
| 106 | 106 | $error = true; |
| 107 | 107 | $requirement16 = "<span class='label label-danger'>No (Make application/config/app-config-sample.php writable) - Permissions - 0644</span>"; |
| 108 | 108 | } else { |
| 109 | 109 | $requirement16 = "<span class='label label-success'>Ok</span>"; |
| 110 | 110 | } |
| 111 | -if (!is_writable('../temp')){ |
|
| 111 | +if (!is_writable('../temp')) { |
|
| 112 | 112 | $error = true; |
| 113 | 113 | $requirement17 = "<span class='label label-danger'>No (Make temp folder writable) - Permissions 0755</span>"; |
| 114 | 114 | } else { |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | </tbody> |
| 204 | 204 | </table> |
| 205 | 205 | <hr /> |
| 206 | -<?php if ($error == true){ |
|
| 206 | +<?php if ($error == true) { |
|
| 207 | 207 | echo '<div class="text-center alert alert-danger">You need to fix the requirements in order to install Perfex CRM</div>'; |
| 208 | 208 | } else { |
| 209 | 209 | echo '<div class="text-center">'; |
@@ -33,16 +33,16 @@ discard block |
||
| 33 | 33 | ]; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - public function add_requirement($requirement){
|
|
| 36 | + public function add_requirement($requirement) {
|
|
| 37 | 37 | |
| 38 | 38 | |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - public function is_installation_finished(){
|
|
| 41 | + public function is_installation_finished() {
|
|
| 42 | 42 | |
| 43 | - if ( file_exists($new_installation->config_path) && |
|
| 43 | + if (file_exists($new_installation->config_path) && |
|
| 44 | 44 | (!isset($_POST['step']) || isset($_POST['step']) |
| 45 | - && $_POST['step'] !== Install::$last_step)){
|
|
| 45 | + && $_POST['step'] !== Install::$last_step)) {
|
|
| 46 | 46 | |
| 47 | 47 | return true; |
| 48 | 48 | |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | } |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | - if (! $this->copy_app_config()) {
|
|
| 147 | + if (!$this->copy_app_config()) {
|
|
| 148 | 148 | $config_copy_failed = true; |
| 149 | 149 | } |
| 150 | 150 | |
@@ -2,18 +2,18 @@ |
||
| 2 | 2 | |
| 3 | 3 | $error = false; |
| 4 | 4 | |
| 5 | - // $req = { |
|
| 6 | - // $name => "PHP Version", |
|
| 7 | - // $check => (version_compare(PHP_VERSION, '7.2.5') >= 0) |
|
| 8 | - // } |
|
| 5 | + // $req = { |
|
| 6 | + // $name => "PHP Version", |
|
| 7 | + // $check => (version_compare(PHP_VERSION, '7.2.5') >= 0) |
|
| 8 | + // } |
|
| 9 | 9 | |
| 10 | 10 | |
| 11 | 11 | class Requirements{ |
| 12 | 12 | |
| 13 | 13 | |
| 14 | - __construct(){ |
|
| 14 | + __construct(){ |
|
| 15 | 15 | |
| 16 | - } |
|
| 16 | + } |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | if (version_compare(PHP_VERSION, '7.2.5') >= 0) { |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | // } |
| 9 | 9 | |
| 10 | 10 | |
| 11 | -class Requirements{ |
|
| 11 | +class Requirements { |
|
| 12 | 12 | |
| 13 | 13 | |
| 14 | 14 | __construct(){ |
@@ -47,10 +47,10 @@ |
||
| 47 | 47 | </div> |
| 48 | 48 | <?php } ?> |
| 49 | 49 | <?php if($step == 1){ |
| 50 | - include_once('requirements.php'); |
|
| 51 | - } else if($step == 2){ |
|
| 52 | - include_once('file_permissions.php'); |
|
| 53 | - } else if($step == 3){ ?> |
|
| 50 | + include_once('requirements.php'); |
|
| 51 | + } else if($step == 2){ |
|
| 52 | + include_once('file_permissions.php'); |
|
| 53 | + } else if($step == 3){ ?> |
|
| 54 | 54 | <?php echo '<form action="" method="post" accept-charset="utf-8">'; ?> |
| 55 | 55 | <?php echo '<input type="hidden" name="step" value="'.$step.'">'; ?> |
| 56 | 56 | <div class="form-group"> |
@@ -18,41 +18,41 @@ discard block |
||
| 18 | 18 | </div> |
| 19 | 19 | <div class="row" style="padding: 20px;padding-bottom: 0; |
| 20 | 20 | "> |
| 21 | - <div class="col-3 text-center <?php if($passed_steps[1] == true || $step == 1){echo 'bg-default';} ?> padding-10"> |
|
| 21 | + <div class="col-3 text-center <?php if ($passed_steps[1] == true || $step == 1) {echo 'bg-default'; } ?> padding-10"> |
|
| 22 | 22 | <h5>Requirements</h5> |
| 23 | 23 | </div> |
| 24 | - <div class="col-2 text-center <?php if($passed_steps[2] || $step == 2){echo 'bg-default';} else {echo 'bg-not-passed';} ?> padding-10"> |
|
| 24 | + <div class="col-2 text-center <?php if ($passed_steps[2] || $step == 2) {echo 'bg-default'; } else {echo 'bg-not-passed'; } ?> padding-10"> |
|
| 25 | 25 | <h5>Permissions</h5> |
| 26 | 26 | </div> |
| 27 | - <div class="col-3 text-center <?php if($passed_steps[3] || $step == 3){echo 'bg-default';} else {echo 'bg-not-passed';} ?> padding-10"> |
|
| 27 | + <div class="col-3 text-center <?php if ($passed_steps[3] || $step == 3) {echo 'bg-default'; } else {echo 'bg-not-passed'; } ?> padding-10"> |
|
| 28 | 28 | <h5> Database setup</h5> |
| 29 | 29 | </div> |
| 30 | - <div class="col-2 text-center <?php if($passed_steps[4] || $step == 4){echo 'bg-default';} else {echo 'bg-not-passed';} ?> padding-10"> |
|
| 30 | + <div class="col-2 text-center <?php if ($passed_steps[4] || $step == 4) {echo 'bg-default'; } else {echo 'bg-not-passed'; } ?> padding-10"> |
|
| 31 | 31 | <h5> Install</h5> |
| 32 | 32 | </div> |
| 33 | - <div class="finish col-2 text-center <?php if($step == 5){echo 'bg-success';}else {echo 'bg-not-passed';} ?> padding-10"> |
|
| 33 | + <div class="finish col-2 text-center <?php if ($step == 5) {echo 'bg-success'; } else {echo 'bg-not-passed'; } ?> padding-10"> |
|
| 34 | 34 | <h5> Finish</h5> |
| 35 | 35 | </div> |
| 36 | 36 | </div> |
| 37 | 37 | <div class="install-row"> |
| 38 | 38 | <p style="padding:20px 10px">This is a list of all system requirements to install <?php echo $this->software_name; ?>. Based on the test results, current status is listed below. Please fix any unfulfilled requirement to be able to proceed further. </p> |
| 39 | - <?php if($debug != ''){ ?> |
|
| 39 | + <?php if ($debug != '') { ?> |
|
| 40 | 40 | <p class="sql-debug-alert text-success" style="margin-bottom:20px;"> |
| 41 | 41 | <b><?php echo $debug; ?></b> |
| 42 | 42 | </p> |
| 43 | 43 | <?php } ?> |
| 44 | - <?php if(isset($error) && $error != ''){ ?> |
|
| 44 | + <?php if (isset($error) && $error != '') { ?> |
|
| 45 | 45 | <div class="alert alert-danger text-center"> |
| 46 | 46 | <?php echo $error; ?> |
| 47 | 47 | </div> |
| 48 | 48 | <?php } ?> |
| 49 | - <?php if($step == 1){ |
|
| 49 | + <?php if ($step == 1) { |
|
| 50 | 50 | include_once('requirements.php'); |
| 51 | - } else if($step == 2){ |
|
| 51 | + } else if ($step == 2) { |
|
| 52 | 52 | include_once('file_permissions.php'); |
| 53 | - } else if($step == 3){ ?> |
|
| 53 | + } else if ($step == 3) { ?> |
|
| 54 | 54 | <?php echo '<form action="" method="post" accept-charset="utf-8">'; ?> |
| 55 | - <?php echo '<input type="hidden" name="step" value="'.$step.'">'; ?> |
|
| 55 | + <?php echo '<input type="hidden" name="step" value="' . $step . '">'; ?> |
|
| 56 | 56 | <div class="form-group"> |
| 57 | 57 | <label for="hostname" class="control-label">Hostname</label> |
| 58 | 58 | <input type="text" class="form-control" name="hostname" value="localhost"> |
@@ -74,13 +74,13 @@ discard block |
||
| 74 | 74 | <button type="submit" class="btn btn-success">Check Database</button> |
| 75 | 75 | </div> |
| 76 | 76 | </form> |
| 77 | - <?php } else if($step == 4){ ?> |
|
| 77 | + <?php } else if ($step == 4) { ?> |
|
| 78 | 78 | <?php echo '<form action="" method="post" accept-charset="utf-8" id="installForm">'; ?> |
| 79 | - <?php echo '<input type="hidden" name="step" value="'.$step.'">'; ?> |
|
| 80 | - <?php echo '<input type="hidden" name="hostname" value="'.$_POST['hostname'].'">'; ?> |
|
| 81 | - <?php echo '<input type="hidden" name="username" value="'.$_POST['username'].'">'; ?> |
|
| 82 | - <?php echo '<input type="hidden" name="password" value="'.$_POST['password'].'">'; ?> |
|
| 83 | - <?php echo '<input type="hidden" name="database" value="'.$_POST['database'].'">'; ?> |
|
| 79 | + <?php echo '<input type="hidden" name="step" value="' . $step . '">'; ?> |
|
| 80 | + <?php echo '<input type="hidden" name="hostname" value="' . $_POST['hostname'] . '">'; ?> |
|
| 81 | + <?php echo '<input type="hidden" name="username" value="' . $_POST['username'] . '">'; ?> |
|
| 82 | + <?php echo '<input type="hidden" name="password" value="' . $_POST['password'] . '">'; ?> |
|
| 83 | + <?php echo '<input type="hidden" name="database" value="' . $_POST['database'] . '">'; ?> |
|
| 84 | 84 | <div class="form-group"> |
| 85 | 85 | <div class="form-group"> |
| 86 | 86 | <label for="base_url" class="control-label">Base URL <a href="https://help.perfexcrm.com/faq/what-is-base-url/" target="_blank">Read more...</a></label> |
@@ -128,9 +128,9 @@ discard block |
||
| 128 | 128 | <label for="timezone" class="control-label">Timezone</label> |
| 129 | 129 | <select name="timezone" data-live-search="true" id="timezone" class="form-control" required data-none-selected-text="Select system timezone"> |
| 130 | 130 | <option value=""></option> |
| 131 | - <?php foreach($this->get_timezones_list() as $key => $timezones){ ?> |
|
| 131 | + <?php foreach ($this->get_timezones_list() as $key => $timezones) { ?> |
|
| 132 | 132 | <optgroup label="<?php echo $key; ?>"> |
| 133 | - <?php foreach($timezones as $timezone){ ?> |
|
| 133 | + <?php foreach ($timezones as $timezone) { ?> |
|
| 134 | 134 | <option value="<?php echo $timezone; ?>"><?php echo $timezone; ?></option> |
| 135 | 135 | <?php } ?> |
| 136 | 136 | </optgroup> |
@@ -142,9 +142,9 @@ discard block |
||
| 142 | 142 | <button type="submit" class="btn btn-success" id="installBtn">Install</button> |
| 143 | 143 | </div> |
| 144 | 144 | </form> |
| 145 | - <?php } else if($step == 5){ ?> |
|
| 145 | + <?php } else if ($step == 5) { ?> |
|
| 146 | 146 | <h4 class="bold">Installation successful!</h4> |
| 147 | - <?php if(isset($config_copy_failed)){ ?> |
|
| 147 | + <?php if (isset($config_copy_failed)) { ?> |
|
| 148 | 148 | <p class="text-danger"> |
| 149 | 149 | Failed to copy application/config/app-config-sample.php. Please navigate to application/config/ and copy the file app-config-sample.php and rename it to app-config.php |
| 150 | 150 | </p> |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | <div class="col-2 text-center <?php if($passed_steps[4] || $step == 4){echo 'bg-default';} else {echo 'bg-not-passed';} ?> padding-10"> |
| 31 | 31 | <h5> Install</h5> |
| 32 | 32 | </div> |
| 33 | - <div class="finish col-2 text-center <?php if($step == 5){echo 'bg-success';}else {echo 'bg-not-passed';} ?> padding-10"> |
|
| 33 | + <div class="finish col-2 text-center <?php if($step == 5){echo 'bg-success';} else {echo 'bg-not-passed';} ?> padding-10"> |
|
| 34 | 34 | <h5> Finish</h5> |
| 35 | 35 | </div> |
| 36 | 36 | </div> |
@@ -114,7 +114,7 @@ |
||
| 114 | 114 | // Under GitHub Actions, we can set an ENV var named 'DB' |
| 115 | 115 | // so that we can test against multiple databases. |
| 116 | 116 | if ($group = getenv('DB')) { |
| 117 | - if (! empty(self::$dbConfig[$group])) { |
|
| 117 | + if (!empty(self::$dbConfig[$group])) { |
|
| 118 | 118 | $config['tests'] = self::$dbConfig[$group]; |
| 119 | 119 | } |
| 120 | 120 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | ]; |
| 28 | 28 | |
| 29 | 29 | // Return a faked entity |
| 30 | - public function fake(Generator &$faker) |
|
| 30 | + public function fake(Generator & $faker) |
|
| 31 | 31 | { |
| 32 | 32 | return (object) [ |
| 33 | 33 | 'name' => $faker->ipv4, |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | use CodeIgniter\CLI\CLI; |
| 5 | 5 | |
| 6 | 6 | return [ |
| 7 | - 'foo' => 'The command will use this as foo.', |
|
| 8 | - 'bar' => 'The command will use this as bar.', |
|
| 9 | - 'baz' => 'The baz is here.', |
|
| 10 | - 'bas' => CLI::color('bas', 'green') . (new App())->baseURL, |
|
| 7 | + 'foo' => 'The command will use this as foo.', |
|
| 8 | + 'bar' => 'The command will use this as bar.', |
|
| 9 | + 'baz' => 'The baz is here.', |
|
| 10 | + 'bas' => CLI::color('bas', 'green') . (new App())->baseURL, |
|
| 11 | 11 | ]; |
@@ -9,13 +9,13 @@ |
||
| 9 | 9 | * the LICENSE file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -if (! function_exists('autoload_foo')) { |
|
| 12 | +if (!function_exists('autoload_foo')) { |
|
| 13 | 13 | function autoload_foo(): string |
| 14 | 14 | { |
| 15 | 15 | return 'I am autoloaded by Autoloader through $files!'; |
| 16 | 16 | } |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | -if (! defined('AUTOLOAD_CONSTANT')) { |
|
| 19 | +if (!defined('AUTOLOAD_CONSTANT')) { |
|
| 20 | 20 | define('AUTOLOAD_CONSTANT', 'foo'); |
| 21 | 21 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | // We should never see this, so can't test it |
| 51 | 51 | // @codeCoverageIgnoreStart |
| 52 | - if (! (extension_loaded('imagick') || class_exists('Imagick'))) { |
|
| 52 | + if (!(extension_loaded('imagick') || class_exists('Imagick'))) { |
|
| 53 | 53 | throw ImageException::forMissingExtension('IMAGICK'); |
| 54 | 54 | } |
| 55 | 55 | // @codeCoverageIgnoreEnd |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function _resize(bool $maintainRatio = false) |
| 66 | 66 | { |
| 67 | - $source = ! empty($this->resource) ? $this->resource : $this->image()->getPathname(); |
|
| 67 | + $source = !empty($this->resource) ? $this->resource : $this->image()->getPathname(); |
|
| 68 | 68 | $destination = $this->getResourcePath(); |
| 69 | 69 | |
| 70 | 70 | $escape = '\\'; |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | */ |
| 92 | 92 | public function _crop() |
| 93 | 93 | { |
| 94 | - $source = ! empty($this->resource) ? $this->resource : $this->image()->getPathname(); |
|
| 94 | + $source = !empty($this->resource) ? $this->resource : $this->image()->getPathname(); |
|
| 95 | 95 | $destination = $this->getResourcePath(); |
| 96 | 96 | |
| 97 | 97 | $extent = ' '; |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | { |
| 119 | 119 | $angle = '-rotate ' . $angle; |
| 120 | 120 | |
| 121 | - $source = ! empty($this->resource) ? $this->resource : $this->image()->getPathname(); |
|
| 121 | + $source = !empty($this->resource) ? $this->resource : $this->image()->getPathname(); |
|
| 122 | 122 | $destination = $this->getResourcePath(); |
| 123 | 123 | |
| 124 | 124 | $action = ' ' . $angle . ' ' . escapeshellarg($source) . ' ' . escapeshellarg($destination); |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | { |
| 140 | 140 | $flatten = "-background 'rgb({$red},{$green},{$blue})' -flatten"; |
| 141 | 141 | |
| 142 | - $source = ! empty($this->resource) ? $this->resource : $this->image()->getPathname(); |
|
| 142 | + $source = !empty($this->resource) ? $this->resource : $this->image()->getPathname(); |
|
| 143 | 143 | $destination = $this->getResourcePath(); |
| 144 | 144 | |
| 145 | 145 | $action = ' ' . $flatten . ' ' . escapeshellarg($source) . ' ' . escapeshellarg($destination); |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | { |
| 161 | 161 | $angle = $direction === 'horizontal' ? '-flop' : '-flip'; |
| 162 | 162 | |
| 163 | - $source = ! empty($this->resource) ? $this->resource : $this->image()->getPathname(); |
|
| 163 | + $source = !empty($this->resource) ? $this->resource : $this->image()->getPathname(); |
|
| 164 | 164 | $destination = $this->getResourcePath(); |
| 165 | 165 | |
| 166 | 166 | $action = ' ' . $angle . ' ' . escapeshellarg($source) . ' ' . escapeshellarg($destination); |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | $this->supportedFormatCheck(); |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | - if (! preg_match('/convert$/i', $this->config->libraryPath)) { |
|
| 204 | + if (!preg_match('/convert$/i', $this->config->libraryPath)) { |
|
| 205 | 205 | $this->config->libraryPath = rtrim($this->config->libraryPath, '/') . '/convert'; |
| 206 | 206 | } |
| 207 | 207 | |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | { |
| 317 | 317 | switch ($this->image()->imageType) { |
| 318 | 318 | case IMAGETYPE_WEBP: |
| 319 | - if (! in_array('WEBP', Imagick::queryFormats(), true)) { |
|
| 319 | + if (!in_array('WEBP', Imagick::queryFormats(), true)) { |
|
| 320 | 320 | throw ImageException::forInvalidImageCreate(lang('images.webpNotSupported')); |
| 321 | 321 | } |
| 322 | 322 | break; |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | } |
| 348 | 348 | |
| 349 | 349 | // Font |
| 350 | - if (! empty($options['fontPath'])) { |
|
| 350 | + if (!empty($options['fontPath'])) { |
|
| 351 | 351 | $cmd .= " -font '{$options['fontPath']}'"; |
| 352 | 352 | } |
| 353 | 353 | |
@@ -405,7 +405,7 @@ discard block |
||
| 405 | 405 | // Text |
| 406 | 406 | $cmd .= " -annotate 0 '{$text}'"; |
| 407 | 407 | |
| 408 | - $source = ! empty($this->resource) ? $this->resource : $this->image()->getPathname(); |
|
| 408 | + $source = !empty($this->resource) ? $this->resource : $this->image()->getPathname(); |
|
| 409 | 409 | $destination = $this->getResourcePath(); |
| 410 | 410 | |
| 411 | 411 | $cmd = " '{$source}' {$cmd} '{$destination}'"; |