Skip to content

Commit 865c98a

Browse files
committed
update worflows
1 parent 490e58e commit 865c98a

File tree

6 files changed

+53
-53
lines changed

6 files changed

+53
-53
lines changed

.github/workflows/formats.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,28 @@ jobs:
1717

1818
steps:
1919

20-
- name: Checkout
21-
uses: actions/checkout@v2
22-
23-
- name: Cache dependencies
24-
uses: actions/cache@v1
25-
with:
26-
path: ~/.composer/cache/files
27-
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
28-
29-
- name: Setup PHP
30-
uses: shivammathur/setup-php@v2
31-
with:
32-
php-version: ${{ matrix.php }}
33-
extensions: dom, mbstring, zip
34-
tools: prestissimo
35-
coverage: pcov
36-
37-
- name: Install Composer dependencies
38-
run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist
39-
40-
- name: Coding Style Checks
41-
run: composer test:lint
42-
43-
- name: Type Checks
44-
run: composer test:types
20+
- name: Checkout
21+
uses: actions/checkout@v2
22+
23+
- name: Cache dependencies
24+
uses: actions/cache@v1
25+
with:
26+
path: ~/.composer/cache/files
27+
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
28+
29+
- name: Setup PHP
30+
uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: ${{ matrix.php }}
33+
extensions: dom, mbstring, zip
34+
tools: prestissimo
35+
coverage: pcov
36+
37+
- name: Install Composer dependencies
38+
run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist
39+
40+
- name: Coding Style Checks
41+
run: composer test:lint
42+
43+
- name: Type Checks
44+
run: composer test:types

.github/workflows/tests.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@ jobs:
1616

1717
steps:
1818

19-
- name: Checkout
20-
uses: actions/checkout@v2
21-
22-
- name: Cache dependencies
23-
uses: actions/cache@v1
24-
with:
25-
path: ~/.composer/cache/files
26-
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
27-
28-
- name: Setup PHP
29-
uses: shivammathur/setup-php@v2
30-
with:
31-
php-version: ${{ matrix.php }}
32-
extensions: dom, mbstring, zip
33-
coverage: none
34-
35-
- name: Install Composer dependencies
36-
run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist
37-
38-
- name: Integration Tests
39-
run: php ./vendor/bin/pest
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
22+
- name: Cache dependencies
23+
uses: actions/cache@v1
24+
with:
25+
path: ~/.composer/cache/files
26+
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
27+
28+
- name: Setup PHP
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
php-version: ${{ matrix.php }}
32+
extensions: dom, mbstring, zip
33+
coverage: none
34+
35+
- name: Install Composer dependencies
36+
run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist
37+
38+
- name: Integration Tests
39+
run: php ./vendor/bin/pest

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
This is a framework-agnostic PHP client for [Cloudflare Images](https://developers.cloudflare.com/images/cloudflare-images/) built on the amazing [Saloon v2](https://docs.saloon.dev/) 🤠 library.
33

44
[![Latest Version on Packagist](https://img.shields.io/packagist/v/benbjurstrom/cloudflare-images-php.svg?style=flat-square)](https://packagist.org/packages/benbjurstrom/cloudflare-images-php)
5-
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/benbjurstrom/cloudflare-images-php/tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/benbjurstrom/cloudflare-images-php/actions?query=workflow%3tests+branch%3Amain)
5+
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/benbjurstrom/replicate-php/tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/benbjurstrom/cloudflare-images-php/actions?query=workflow%3tests+branch%3Amain)
66

77
## Table of contents
88
- [Quick Start](https://github.com/benbjurstrom/cloudflare-images-php#-quick-start)
@@ -31,7 +31,7 @@ composer require benbjurstrom/cloudflare-images-php
3131
```
3232
###
3333

34-
Use your Cloudflare API token and Account ID to create a new api instance.
34+
Create a new api instance.
3535
```php
3636
use BenBjurstrom\CloudflareImages\CloudflareImages;
3737
...
@@ -43,15 +43,15 @@ $api = new CloudflareImages(
4343
```
4444
###
4545

46-
Then use the api instance to get details about an existing image such as its file name, metadata, or available variants.
46+
Then use it to get details about an existing image.
4747
```php
4848
$id = '2cdc28f0-017a-49c4-9ed7-87056c83901'
4949
$data = $api->images()->get($id);
5050
$data->variants[0]; // https://imagedelivery.net/Vi7wi5KSItxGFsWRG2Us6Q/2cdc28f0-017a-49c4-9ed7-87056c83901/public
5151
```
5252
###
5353

54-
Or use the api to upload a new image from an image string.
54+
Or to upload a new image from an image string.
5555
```php
5656
$fileName = 'example.jpg';
5757
$file = file_get_contents($fileName);

src/Data/ImageData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static function fromResponse(Response $response): self
2929
throw new Exception('Invalid response');
3030
}
3131

32-
return new static(
32+
return new self(
3333
id: $data['id'],
3434
filename: $data['filename'],
3535
uploaded: $data['uploaded'],

src/Data/UploadUrlData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public static function fromResponse(Response $response): self
1919
throw new \Exception('Invalid response');
2020
}
2121

22-
return new static(
22+
return new self(
2323
id: $data['id'],
2424
uploadUrl: $data['uploadURL'],
2525
);

tests/FeatureTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
->withCustomId('97ed2d63-d1e3-43ca-95dd-35192ce278c7')
1818
->createFromUrl('https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg');
1919

20-
// $signed = $api->signUrl('https://imagedelivery.net/tlMUIgxBCDMUcIu6pbnihg/058aae72-20b6-4eb5-c75c-dd0ca9e87601/public');
20+
// $signed = $api->signUrl('https://imagedelivery.net/tlMUIgxBCDMUcIu6pbnihg/058aae72-20b6-4eb5-c75c-dd0ca9e87601/public');
2121

2222
dd($data);
2323
// dd($signed);

0 commit comments

Comments
 (0)