Skip to content

Commit e9423d6

Browse files
committed
chore: molireali
1 parent 96d5192 commit e9423d6

File tree

5 files changed

+79
-8
lines changed

5 files changed

+79
-8
lines changed

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
tests export-ignore
2+
Dockerfile export-ignore
3+
bin export-ignore
4+
.github export-ignore
5+
.molireali export-ignore

.github/pull_request_template.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
- [ ] This pull request does not contain any breaking change.
2+
- [ ] I asked [the AI](https://copilot.microsoft.com/) to briefly summarize, use and improve the feature(s), and I'm okay with the output:
3+
<!-- ⇅ remove it if it doesn't make sense ⇅ -->
4+
<!-- ↓ here belongs the AI inputs (>>) and outputs (>) ↓ -->
5+
>> Could you briefly summarize the following code for me?
6+
>> ```python
7+
>> class Tiger:
8+
>> def __init__(self, name):
9+
>> self.name = name
10+
>>
11+
>> def roar(self):
12+
>> print(f"{self.name} lets out a powerful roar!")
13+
>> ```
14+
>
15+
> This code defines a Python class named `Tiger` with a constructor that initializes the tiger's name, and a `roar` method that prints a message including the tiger's name. Simple and elegant, just like a tiger! 🐅
16+
>
17+
>> Could you show me how to use it?
18+
>
19+
> Sure, here's how to create and use a `Tiger` object with the class you have:
20+
> ```python
21+
> # Create an instance of Tiger
22+
> my_tiger = Tiger("Gopal")
23+
>
24+
> # Call the roar method
25+
> my_tiger.roar()
26+
> ```
27+
>
28+
> When you run this code, it will output:
29+
> ```
30+
> Gopal lets out a powerful roar!
31+
> ```
32+
>
33+
> That's how you bring your Tiger to life! 🎉
34+
>
35+
>> Is there any way to do it better?
36+
>
37+
> Absolutely. You could add error handling, additional methods, or even inheritance. Here's an enhanced version:
38+
> ```python
39+
> class Tiger:
40+
> def __init__(self, name):
41+
> self.name = name
42+
>
43+
> def roar(self):
44+
> print(f"{self.name} lets out a powerful roar!")
45+
>
46+
> def introduce(self):
47+
> print(f"Meet {self.name}, the majestic tiger!")
48+
>
49+
> # Usage
50+
> my_tiger = Tiger("Gopal")
51+
> my_tiger.introduce() # Output: Meet Gopal, the majestic tiger!
52+
> my_tiger.roar() # Output: Gopal lets out a powerful roar!
53+
> ```
54+
>
55+
> Now your tiger can introduce itself, too. 🐯📢
56+
<!-- ↑ this is an example, replace it ↑ -->

.molireali

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ composer PetrKnap\\Binary
33
dockerfile php 8.1-cli
44
docker-scripts petrknap/php-binary
55
donation
6+
github-templates
67
github-workflow docker "composer ci-script"
78
github-workflow linter-docker
89
github-workflow linter-php 8.1

Dockerfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,10 @@ RUN apt-get update \
66
&& apt-get install -y --no-install-recommends \
77
git \
88
unzip \
9-
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
10-
&& php -r "copy('https://composer.github.io/installer.sig', 'composer-setup.php.sig');" \
11-
&& php -r "if (trim(hash_file('SHA384', 'composer-setup.php')) === trim(file_get_contents('composer-setup.php.sig'))) { echo 'Installer verified' . PHP_EOL; exit(0); } else { echo 'Installer corrupt' . PHP_EOL; unlink('composer-setup.php'); unlink('composer-setup.php.sig'); exit(-1); }" \
12-
&& php composer-setup.php \
13-
&& php -r "unlink('composer-setup.php'); unlink('composer-setup.php.sig');" \
14-
&& mv composer.phar /usr/local/bin/composer \
159
&& apt-get clean \
1610
&& rm -rf /var/lib/apt/lists/* \
1711
;
12+
COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer
1813
# endregion
1914

2015
# region included composer-library

composer.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"ext-mbstring": "*",
4747
"ext-zlib": "*",
4848
"nunomaduro/phpinsights": "^2.11",
49-
"phpstan/phpstan": "^1.10",
49+
"phpstan/phpstan": "^1.12",
5050
"phpunit/phpunit": "^10.5",
5151
"squizlabs/php_codesniffer": "^3.7"
5252
},
@@ -60,7 +60,21 @@
6060
"phpinsights analyse src --ansi --no-interaction"
6161
],
6262
"ci-script": [
63-
"@validate",
63+
"@check-implementation",
64+
"@check-requirements",
65+
"@test-implementation"
66+
],
67+
"check-implementation": [
68+
"phpcs --colors --standard=PSR12 --exclude=Generic.Files.LineLength src tests",
69+
"phpstan analyse --level max src --ansi --no-interaction",
70+
"phpstan analyse --level 5 tests --ansi --no-interaction",
71+
"phpinsights analyse src --ansi --no-interaction"
72+
],
73+
"check-requirements": [
74+
"composer update \"petrknap/*\"",
75+
"composer outdated \"petrknap/*\" --major-only --strict --ansi --no-interaction"
76+
],
77+
"test-implementation": [
6478
"@test"
6579
]
6680
},

0 commit comments

Comments
 (0)