Skip to content

Commit

Permalink
🐛 Fixing bugs in PHP 5.6 (#2)
Browse files Browse the repository at this point in the history
* 🐛 Fixing bugs in PHP 5.6
* 👷 Adding binary check
* 🔨 Updating model comments
* 💚 Fixing `php-stan` errors
* 🩹 Configuring crlf binary files
  • Loading branch information
ricardoapaes authored May 12, 2022
1 parent ee1411b commit a02c176
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto
docker-compose.yml eol=lf
bin/ide-helper text eol=lf
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,12 @@ jobs:
- name: Run PHP CS Fixer
if: matrix.PHP != '56'
run: |
docker-compose exec -T php composer fix:ci
docker-compose exec -T php composer fix:ci
- name: Run Bin with composer
run: |
docker-compose exec -T php composer ide-helper
- name: Run Bin directly
run: |
docker-compose exec -T php bin/ide-helper
3 changes: 2 additions & 1 deletion bin/ide-helper
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ use Like\Eloquent\IdeHelper\Application;
include __DIR__ . '/../src/laravel-functions.php';

if (! class_exists(Application::class)) {
include $_composer_autoload_path ?? __DIR__ . '/../vendor/autoload.php';
echo "hhhh";
include isset($_composer_autoload_path) ? $_composer_autoload_path : __DIR__ . '/../vendor/autoload.php';
}

$app = new Application();
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"fix": "php-cs-fixer fix",
"fix:ci": "php-cs-fixer fix --dry-run --stop-on-violation",
"test": "phpunit",
"analyse": "phpstan analyse"
"analyse": "phpstan analyse",
"ide-helper": "ide-helper"
},
"config": {
"allow-plugins": {
Expand Down
15 changes: 9 additions & 6 deletions tests/Models/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@
* @property integer $subcategory_id
* @property string $name
* @property integer|null $reference
* @property float $price
* @property string $price
* @property-read \Like\Eloquent\IdeHelper\Tests\Models\Subcategory $subcategory
*
* @method static \Illuminate\Database\Eloquent\Builder|\Like\Eloquent\IdeHelper\Tests\Models\Product whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\Like\Eloquent\IdeHelper\Tests\Models\Product whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\Like\Eloquent\IdeHelper\Tests\Models\Product wherePrice($value)
* @method static \Illuminate\Database\Eloquent\Builder|\Like\Eloquent\IdeHelper\Tests\Models\Product whereReference($value)
* @method static \Illuminate\Database\Eloquent\Builder|\Like\Eloquent\IdeHelper\Tests\Models\Product whereSubcategoryId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Product newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Product newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Product query()
* @method static \Illuminate\Database\Eloquent\Builder|Product whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Product whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|Product wherePrice($value)
* @method static \Illuminate\Database\Eloquent\Builder|Product whereReference($value)
* @method static \Illuminate\Database\Eloquent\Builder|Product whereSubcategoryId($value)
*/
class Product extends Model {
protected $fillable = [];
Expand Down
7 changes: 5 additions & 2 deletions tests/Models/Subcategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
* @property integer $id
* @property string $name
*
* @method static \Illuminate\Database\Eloquent\Builder|\Like\Eloquent\IdeHelper\Tests\Models\Subcategory whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\Like\Eloquent\IdeHelper\Tests\Models\Subcategory whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|Subcategory newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Subcategory newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Subcategory query()
* @method static \Illuminate\Database\Eloquent\Builder|Subcategory whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Subcategory whereName($value)
*/
class Subcategory extends Model {
protected $fillable = [];
Expand Down

0 comments on commit a02c176

Please sign in to comment.