Skip to content

Commit

Permalink
Merge pull request #35 from Appsero/feature/separate-updater
Browse files Browse the repository at this point in the history
Remove updater
  • Loading branch information
bdmehedi authored Dec 26, 2023
2 parents 3b68f17 + 79a7745 commit 57a9e33
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 294 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/wpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
name: Run PHPCS inspection
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -17,10 +17,10 @@ jobs:

- name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Setup cache
uses: pat-s/always-upload-cache@v1.1.4
uses: pat-s/always-upload-cache@v3.0.11
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -32,7 +32,8 @@ jobs:
- id: changes
run: |
URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files"
FILES=$(curl -s -X GET -G $URL | jq -r '.[] | .filename' | xargs)
echo "::set-output name=files::$FILES"
FILES=$(curl -s -X GET -G $URL | jq -r '.[] | select (.status!="removed") | .filename | select ( endswith(".php") )' | xargs)
echo "files=$FILES" >> $GITHUB_OUTPUT
- name: Detect coding standard violations
run: vendor/bin/phpcs ${{ steps.changes.outputs.files }} -q --report=checkstyle | cs2pr --graceful-warnings
27 changes: 0 additions & 27 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,6 @@ class Client {
*/
private $insights;

/**
* The Object of Updater Class
*
* @var object
*/
private $updater;

/**
* The Object of License Class
*
Expand Down Expand Up @@ -134,26 +127,6 @@ public function insights() {
return $this->insights;
}

/**
* Initialize plugin/theme updater
*
* @return Appsero\Updater
*/
public function updater() {
if ( ! class_exists( __NAMESPACE__ . '\Updater' ) ) {
require_once __DIR__ . '/Updater.php';
}

// if already instantiated, return the cached one
if ( $this->updater ) {
return $this->updater;
}

$this->updater = new Updater( $this );

return $this->updater;
}

/**
* Initialize license checker
*
Expand Down
262 changes: 0 additions & 262 deletions src/Updater.php

This file was deleted.

0 comments on commit 57a9e33

Please sign in to comment.