Skip to content

Commit 0123948

Browse files
committed
Applied recommendations to improve
1 parent 5b6b961 commit 0123948

3 files changed

Lines changed: 19 additions & 20 deletions

File tree

src/App/src/Fixture/CategoryLoader.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function load(ObjectManager $manager): void
2020
$contents = file_get_contents($jsonFile);
2121

2222
if ($contents === false) {
23-
throw new RuntimeException("Unable to read file: {$jsonFile}");
23+
throw new RuntimeException("Unable to read file: $jsonFile");
2424
}
2525

2626
$categories = json_decode($contents, true);
@@ -40,8 +40,7 @@ public function load(ObjectManager $manager): void
4040
}
4141

4242
$category->setName($cat['name']);
43-
$category->setVisibility((bool) ($cat['isVisible'] ?? true));
44-
43+
$category->setVisibility($cat['isVisible'] ?? true);
4544
$this->addReference('category_' . $cat['slug'], $category);
4645
}
4746

src/App/src/Fixture/articles_cleaned.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"name": "Dotkernel",
44
"slug": "dotkernel",
5-
"isVisible": 1,
5+
"isVisible": true,
66
"articles": [
77
{
88
"post_title": "DotKernel Database Naming Conventions for MySQL",
@@ -649,7 +649,7 @@
649649
{
650650
"name": "Javascript",
651651
"slug": "javascript",
652-
"isVisible": 0,
652+
"isVisible": false,
653653
"articles": [
654654
{
655655
"post_title": "Intro to jQuery",
@@ -686,7 +686,7 @@
686686
{
687687
"name": "Zend Framework",
688688
"slug": "zend-framework",
689-
"isVisible": 0,
689+
"isVisible": false,
690690
"articles": [
691691
{
692692
"post_title": "WURFL PHP API libraries , GPL versions",
@@ -773,7 +773,7 @@
773773
{
774774
"name": "PHP Development",
775775
"slug": "php-development",
776-
"isVisible": 1,
776+
"isVisible": true,
777777
"articles": [
778778
{
779779
"post_title": "PHP support back in Aptana 3.0",
@@ -980,7 +980,7 @@
980980
{
981981
"name": "How to's",
982982
"slug": "how-to",
983-
"isVisible": 1,
983+
"isVisible": true,
984984
"articles": [
985985
{
986986
"post_title": "What is PSR-7 and how to use it",
@@ -1127,7 +1127,7 @@
11271127
{
11281128
"name": "PHP Troubleshooting",
11291129
"slug": "php-troubleshooting",
1130-
"isVisible": 0,
1130+
"isVisible": false,
11311131
"articles": [
11321132
{
11331133
"post_title": "Where is the intl PHP extension? Problem solved!",
@@ -1154,7 +1154,7 @@
11541154
{
11551155
"name": "Dotkernel 3",
11561156
"slug": "dotkernel3",
1157-
"isVisible": 0,
1157+
"isVisible": false,
11581158
"articles": [
11591159
{
11601160
"post_title": "Development Report December 11, 2017",
@@ -1251,7 +1251,7 @@
12511251
{
12521252
"name": "Middleware",
12531253
"slug": "middleware",
1254-
"isVisible": 1,
1254+
"isVisible": true,
12551255
"articles": [
12561256
{
12571257
"post_title": "Handling dynamic routing using FastRoute in Dotkernel",
@@ -1288,7 +1288,7 @@
12881288
{
12891289
"name": "Best Practice",
12901290
"slug": "best-practice",
1291-
"isVisible": 1,
1291+
"isVisible": true,
12921292
"articles": [
12931293
{
12941294
"post_title": "SQL queries using Zend_Db – SELECT",
@@ -1425,7 +1425,7 @@
14251425
{
14261426
"name": "Android",
14271427
"slug": "android",
1428-
"isVisible": 0,
1428+
"isVisible": false,
14291429
"articles": [
14301430
{
14311431
"post_title": "Multiple broadcast receivers in the same app, for the same action",
@@ -1452,7 +1452,7 @@
14521452
{
14531453
"name": "Dotkernel API",
14541454
"slug": "dotkernel-api",
1455-
"isVisible": 1,
1455+
"isVisible": true,
14561456
"articles": [
14571457
{
14581458
"post_title": "DotKernel API Client Side Authorization",
@@ -1559,7 +1559,7 @@
15591559
{
15601560
"name": "PHPStorm",
15611561
"slug": "phpstorm",
1562-
"isVisible": 0,
1562+
"isVisible": false,
15631563
"articles": [
15641564
{
15651565
"post_title": "Code Quality: How to setup phpcs in PHPStorm",
@@ -1576,7 +1576,7 @@
15761576
{
15771577
"name": "Licensing",
15781578
"slug": "licensing",
1579-
"isVisible": 0,
1579+
"isVisible": false,
15801580
"articles": [
15811581
{
15821582
"post_title": "MIT versus LGPL in practice: Dotkernel case",
@@ -1593,7 +1593,7 @@
15931593
{
15941594
"name": "Architecture",
15951595
"slug": "architecture",
1596-
"isVisible": 1,
1596+
"isVisible": true,
15971597
"articles": [
15981598
{
15991599
"post_title": "Understanding Middleware",
@@ -1630,7 +1630,7 @@
16301630
{
16311631
"name": "Design Patterns",
16321632
"slug": "design-pattern",
1633-
"isVisible": 1,
1633+
"isVisible": true,
16341634
"articles": [
16351635
{
16361636
"post_title": "Naming pattern for PSR-15 handlers in Dotkernel applications",
@@ -1647,7 +1647,7 @@
16471647
{
16481648
"name": "Headless Platform",
16491649
"slug": "headless-platform",
1650-
"isVisible": 1,
1650+
"isVisible": true,
16511651
"articles": [
16521652
{
16531653
"post_title": "Dotkernel Headless Platform - The Whats, Hows and Whys",

src/Blog/templates/page/blog-resource/php-development/static-analysis-replacing-psalm-with-phpstan.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
<pre>
9898
{% verbatim %}
9999
on:
100-
- <push></push>
100+
- push
101101

102102
name: Run PHPStan checks
103103

0 commit comments

Comments
 (0)