Skip to content

Instantly share code, notes, and snippets.

Adam Culp adamculp

View GitHub Profile
@adamculp
adamculp / Bank.php
Last active November 20, 2018 15:28 — forked from jwage/Banks.php
Working example of PHP Doctrine 2 ManyToOne with corresponding OneToMany association.
<?php
declare(strict_types=1);
namespace Banks\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Branches\Entity\Branch;
@adamculp
adamculp / beachcasts_project_ideas_2020.md
Last active January 7, 2020 19:28
Brainstorming on ideas for projects on Beachcasts

Project ideas for Beachcasts 2020

  • Laravel
  • Upgrade to v6+
  • ACL
  • Chartjs
  • Doctrine migrations
  • Laminas - Mezzio Swoole
  • QA testing
  • code quality
@adamculp
adamculp / replace_php_short_tags.sh
Last active February 24, 2023 15:53 — forked from ma2thieu/replace_php_short_tags.sh
replace php short tags (<?) with long one (<?php)
#!/bin/bash
# purpose of these lines are to change short PHP tags to the full "<?php" style tag version
# PHP version 7+ has deprecated short tags
# first short PHP tags with something that is not a letter after
find . -iname "*.php" -print0 | xargs -0 -I{} sed -i -r 's/(<\?)([^a-zA-Z])/\1php\2/g' '{}'
# then find short PHP tags at end of line
find . -iname "*.php" -print0 | xargs -0 -I{} sed -i -r 's/<\?$/<\?php/g' '{}'